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!

Adding users to restored database on another server

Status
Not open for further replies.

web4fun

MIS
Oct 2, 2002
127
US
Scenario:

Restoring a full database from Server A on Server B. Both servers are running on SQL 2000. Have setup SQL agent jobs to accomplish the restore process and this works fine.

Problem:

I've tried to setup a separate SQL agent job job following the restore to add users to the restored database on Server B via 'exec sp_adduser 'foo'' and so on..but the job fails...which based on my research is due to the fact that the SP sp_adduser cannot be used in user defined transaction? If so, then can someone assist me? I need for this to automated as obviously manually adding users following the restore is not what is desired. Of course, sp_adduser works adding users individually via Query Analyzer but not within my job to add multiple users.

Thanks in advance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top