Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Backing up and Restoring Logins

Status
Not open for further replies.

NAMARA

Instructor
Dec 7, 2012
8
UG
If I make a back up of a database, The Users folder in my database,carries the names of Users of my database.If I re Install SQL Server2000 and retore the databse, I will be able to see my Users in the users folder, but I can not see these names in the Security->Logins folder,when i try to recreate each of these,the System will complian of 'User already exists' and at that time it will create the user in the logins though! The user will lose his password but can login.
How can I back up these logins and simply restore them in a click of a button.
 
try that
1) Make a copy of my users with
use test
go

SELECT * INTO x FROM master.dbo.syslogins

2) To restore them afterward

use master
go

exec sp_configure 'allow updates', 1
RECONFIGURE WITH OVERRIDE
go

insert syslogins select * from test.dbo.x
exec sp_configure 'allow updates', 0
RECONFIGURE WITH OVERRIDE
go
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top