patd1
asked on
set the role_membership for this user after the restore
Using sql server 2012 std edition
I am restoring a database on another server as part of my sql job and then running some data processing jobs on the restored data.
The problem that I am facing is that the windows user that the data processing job runs under, loses the db_owner role_membership after the restore so the data processing job fails while running data reads.
How can I set the role membership for this windows user using t-sql after the restore step, and before data processing. I can run this t-sql under a different sql user.
Thanks.
I am restoring a database on another server as part of my sql job and then running some data processing jobs on the restored data.
The problem that I am facing is that the windows user that the data processing job runs under, loses the db_owner role_membership after the restore so the data processing job fails while running data reads.
How can I set the role membership for this windows user using t-sql after the restore step, and before data processing. I can run this t-sql under a different sql user.
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER