SQL Window Logins with [Domain\Window Login] format verses Windows Login (or user name) for database user.

  • We are running SQL Server 2012 on Windows 2008 Server. We (DBAs) created windows logins for sql server using the [Domain\Window Login] format and for the database user we just used the Windows Login (or user name). Then the vendor created some Window Logins for sql server using the [Domain\Window Login] format and for the database user the vendor used the [Domain\Windows Login] format instead of the Windows Login (or user name).

    What are the advantages/disadvantages of using [Domain\Window Login] format verses just the Windows Login (or user name) for the database user?

    We just like to be consistent with the format of the windows server login and database user names.

    Thanks, Kevin

  • its only a database user name, if you really wanty to enforce your standard then just inform the vendor

    Rename a user with the following

    alter user dbusername with name = [newdbusername]

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • It sounds to me like you created database users as loginless accounts when you created the database users. Is that what you are trying to achieve?

    Having loginless database users can be a means to a more secure server. That would be a big benefit.

    And the vendor likely assigned permissions to the database for the login upon creating the login based on Windows Auth (domain\account).

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • SQLRNNR (8/13/2014)


    It sounds to me like you created database users as loginless accounts when you created the database users.

    No, the vendor has simply create the database user as FredBloggs instead of Mydomain\FredBloggs, it's perfectly valid using

    create login [MyDomain\FredBloggs] from windows

    use [yourdb]

    create user FredBloggs for login [MyDomain\FredBloggs]

    To rename the user simply use

    use [yourdb]

    alter user FredBloggs with name = [MyDomain\FredBloggs]

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • Perry Whittle (8/13/2014)


    SQLRNNR (8/13/2014)


    It sounds to me like you created database users as loginless accounts when you created the database users.

    No, the vendor has simply create the database user as FredBloggs instead of Mydomain\FredBloggs, it's perfectly valid using

    create login [MyDomain\FredBloggs] from windows

    use [yourdb]

    create user FredBloggs for login [MyDomain\FredBloggs]

    To rename the user simply use

    use [yourdb]

    alter user FredBloggs with name = [MyDomain\FredBloggs]

    I think you mean the OP created the user as FredBloggs. The vendor is just mapping login to user exactly as the login appears.

    And yes I agree it is perfectly valid. I wasn't saying it wasn't valid. I used that as a lead-in to note a big benefit of creating the users differently than the Vendor had created - more specifically as loginless users.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • SQLRNNR (8/13/2014)


    I think you mean the OP created the user as FredBloggs.

    yes, sorry my bad.

    In the end it's just a database user and doesn't really matter what it's called. It's not a loginless user though.

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • Perry Whittle (8/13/2014)


    SQLRNNR (8/13/2014)


    I think you mean the OP created the user as FredBloggs.

    yes, sorry my bad.

    In the end it's just a database user and doesn't really matter what it's called. It's not a loginless user though.

    :hehe::cool:

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

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

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