Solved

do users go with you

Posted on 2004-04-14
8
331 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 8

Expert Comment

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

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

770 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