CREATE USER ..WITHOUT LOGIN

  • HI,

    What will happen when i create a user

    as

    CREATE USER testdbuser WITHOUT LOGIN

    thanks

    🙂

  • You get a database user that does not have an associated login. Since it has no login, it can only be used for impersonation, you can't connect to SQL using it.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • thanks,

    how it is useful in real time? i.e., when it is useful?

    🙂

  • As I said

    GilaMonster (10/20/2010)


    Since it has no login, it can only be used for impersonation

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • how impersonation can be used?

    if i have created a user(imporuser) with out login,

    then how that user can be used?

    we can use :

    EXECUTE AS imporuser

    exec dbo.testsp

    where this can be used in which scenario we can use this type of impersonation?

    can u give me a clarification

    Thanks,

    🙂

  • SQL* (10/20/2010)


    how impersonation can be used?

    if i have created a user(imporuser) with out login,

    then how that user can be used?

    Look up EXECUTE AS in SQL Books Online (hint, there are two ways at least this can be used). Once you've read Books Online, try a google search with the same keywords.

    where this can be used in which scenario we can use this type of impersonation?

    Any time you have a user with limited permissions that you want to temporarily and in specific circumstances elevate his permissions.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply