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.
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.