Solved

do users go with you

Posted on 2004-04-14
8
324 Views
Last Modified: 2006-11-17
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
Comment
Question by:gupshup
  • 4
  • 2
  • 2
8 Comments
 
LVL 34

Expert Comment

by:arbert
ID: 10826872
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
 

Author Comment

by:gupshup
ID: 10826913
do you recommend me bringing over the master database?
0
 
LVL 8

Expert Comment

by:plq
ID: 10826923
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
 
LVL 8

Expert Comment

by:plq
ID: 10826931
No don't bring over the master db, script the logins using generate sql scripts
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 

Author Comment

by:gupshup
ID: 10826948
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
 
LVL 34

Accepted Solution

by:
arbert earned 20 total points
ID: 10827106
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
 
LVL 34

Expert Comment

by:arbert
ID: 10827110
Search in Books Online for sp_change_users_login
0
 
LVL 34

Expert Comment

by:arbert
ID: 10827144
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now