Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 340
  • Last Modified:

do users go with you

When you do a restore of 10 databases from a location to a new location , will the user ids and logins go with you.  How do you transfer all of the ids and logins?

0
gupshup
Asked:
gupshup
  • 4
  • 2
  • 2
1 Solution
 
arbertCommented:
The users go with the database.  However, the logins don't.  The logins are stored in the master database.  You can use sp_change_users_login to relink the login with the user.
0
 
gupshupAuthor Commented:
do you recommend me bringing over the master database?
0
 
plqCommented:
1. Ensure that the logins exist in the new database
2. Connect to the new database
3. Run
exec sp_revokedbaccess 'username'
4. Run
exec sp_grantdbaccess 'username'


repeat steps 3 and 4 for every user
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
plqCommented:
No don't bring over the master db, script the logins using generate sql scripts
0
 
gupshupAuthor Commented:
abert,

i can still run the sp that you recommended however the old server is gone.....it has crashed......so im assuming running the sp wont help...correct?
0
 
arbertCommented:
IT will help.  You have the users in the database and all the permissions are set for this user.  The stored proc will relink the user with a login.
0
 
arbertCommented:
Search in Books Online for sp_change_users_login
0
 
arbertCommented:
Gupshup, like I've suggested to you several times in the past--get a good book (http://www.amazon.com/exec/obidos/tg/detail/-/0130614300/qid=1081972369/sr=8-5/ref=pd_ka_5/002-1884116-6048004?v=glance&s=books&n=507846).

You're asking some very simple questions that you could save yourself a LOT of time and money on with a book....
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 4
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now