Does anybody know,
how to add same user to diff DBs on diff Servers?
something like this,
EXEC sp_adduser 'xxxxx'--add user to server1.DB1
EXEC server2.master.dbo. sp_adduser 'xxxxx'--add user to server2.DB2
or other ways?
Thanks.Since SQL Server uses logins at the server level and users at the database
level probably you would need to add the logins first. You can use the
Transfer Logins DTS Task or simply use Enterprise Manager/Management Studio.
This would add the login at the server level.
To add the user, just select the login name on 'Security, Logins',
right-click and select Properties. On the Database Access tab, select the
database and database roles.
Giving exactly the right permissions as the original database would require
scripting the original database.
Hope this helps,
Ben Nevarez, MCDBA, OCP
Database Administrator
"hh" wrote:
> Does anybody know,
> how to add same user to diff DBs on diff Servers?
> something like this,
> EXEC sp_adduser 'xxxxx'--add user to server1.DB1
> EXEC server2.master.dbo. sp_adduser 'xxxxx'--add user to server2.DB2
> or other ways?
> Thanks.|||Thanks Ben.
"Ben Nevarez" wrote:
> Since SQL Server uses logins at the server level and users at the database
> level probably you would need to add the logins first. You can use the
> Transfer Logins DTS Task or simply use Enterprise Manager/Management Studi
o.
> This would add the login at the server level.
> To add the user, just select the login name on 'Security, Logins',
> right-click and select Properties. On the Database Access tab, select the
> database and database roles.
> Giving exactly the right permissions as the original database would requir
e
> scripting the original database.
> Hope this helps,
> Ben Nevarez, MCDBA, OCP
> Database Administrator
>
> "hh" wrote:
>
No comments:
Post a Comment