Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy over users

Status
Not open for further replies.

twillett40

Technical User
Mar 6, 2003
21
US
Can someone tell me how to copy over the users from one database to another on the same server?
I used DTS to make a duplicate copy to a new database.
The problem is I do not know how to copy over the users.

Thanks,
TW
 
Thanks, but I am trying to copy over users between two databases on the same instance of SQL.

I see how what you suggested would facilitate moving between two different instances.

I'm just not sure how to do this between two databases.
I thought this would take place when I used DTS to copy the data from one database to another.
 
I'm thinking that copying sysusers probably won't work, but if you do a select against the sysusers from the starting database, and then create dynamic sql statement to add a user with the logon name from the query you should be good to go.

Hope it helps,
Dalton
 
Thanks,
druer
How do I create a dynamic sql statement to add a user with the logon name from the query.

Terry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top