开发者

Backup sql server logins and users

开发者 https://www.devze.com 2023-01-14 11:41 出处:网络
Need to backup Database Users and Log开发者_如何学Goins for particular database from prod server and restore it to Dev server ?hw can i proceedsql-server-2005-backup-restore-and-orphaned-users

Need to backup Database Users and Log开发者_如何学Goins for particular database from prod server and restore it to Dev server ?hw can i proceed


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号