views:

24

answers:

1

Need to backup Database Users and Logins for particular database from prod server and restore it to Dev server ?hw can i proceed

A: 

sql-server-2005-backup-restore-and-orphaned-users

EDIT:

In this case, can you restore your production db on development db and flush all data from tables? If you can do this then use following script to do this.

EXEC sp_MSForEachTable 'ALTER TABLE ? NOCHECK CONSTRAINT ALL'
EXEC sp_MSForEachTable 'DELETE FROM ?'
EXEC sp_MSForEachTable 'ALTER TABLE ? CHECK CONSTRAINT ALL'

Empty all tables.

A better link: SQL Server Delete all data - Delete the data without resetting the identities - Delete the data and reset the identities

Muhammad Kashif Nadeem
HI Kashif, thnks for ur link but i have 140 users , how to use in that case any idea ??
Dhiva