creation of userid with rights equal to sa login

  • Hi

    can anyone help me with the script for creation a new userid similar to sa

    rights . all the rights should be similar to sa. just to have two userid's for with sa rights.

    Thanks

     

     

  • Just make the new login a member of the sysadmin fixed server role.  We make the DBAs members of sysadmin so they can do all the SQL Server administration using they're domain logins.  Sa is never used.

    Greg

    Greg

  • thanks greg

  • You have asked for code snippet right below is the code sir

     

    USE

    [master]

    GO

    CREATE

    LOGIN [vp] FROM WINDOWS WITH DEFAULT_DATABASE=[master]

    GO

    EXEC

    master..sp_addsrvrolemember @loginame = N'vp', @rolename = N'sysadmin'

    GO

    USE

    [master]

    GO

    CREATE

    USER [vp] FOR LOGIN [vp]

    GO

    "vp" is the user created with windows authentication

    Regards,

    Venkatesan Prabu. J

    Thanks and Regards,
    Venkatesan Prabu, 😛
    My Blog:

    http://venkattechnicalblog.blogspot.com/

  • thankyou venkat

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

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