setting default user in sql server 2008

  • I want t-sql statement for setting default user

    at the time of creating database in sql server.

  • sej2008 (6/14/2012)


    I want t-sql statement for setting default user

    at the time of creating database in sql server.

    You can use...

    Exec sp_defaultdb @loginame='login', @defdb='database name'

  • ganeshnarim (6/14/2012)


    sej2008 (6/14/2012)


    I want t-sql statement for setting default user

    at the time of creating database in sql server.

    You can use...

    Exec sp_defaultdb @loginame='login', @defdb='database name'

    I'd be curious to know if this actually answered the OP question...

    What do you mean by "setting default user"?

  • I am sorry the sp that u sent is not working.

    I want to set default user at the creating database.

  • A database doesn't have a default user.

    The way to create a user is the CREATE USER command.

    CREATE USER someDatabaseUser FOR LOGIN someServerLogin;

    Nothing default about it.

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

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