码迷,mamicode.com
首页 > 数据库 > 详细

数据库的恢复数据语句

时间:2015-10-16 16:51:28      阅读:167      评论:0      收藏:0      [点我收藏+]

标签:

-- sql server 2008 USE MASTER GO SP_CONFIGURE ‘ALLOW UPDATES‘,1 RECONFIGURE WITH OVERRIDE GO ALTER DATABASE MixiguoBizDB SET EMERGENCY GO sp_dboption ‘MixiguoBizDB‘, ‘single user‘, ‘true‘ GO DBCC CHECKDB(‘MixiguoBizDB‘,‘REPAIR_ALLOW_DATA_LOSS‘) GO ALTER DATABASE MixiguoBizDB SET ONLINE GO sp_configure ‘allow updates‘, 0 reconfigure with override GO sp_dboption ‘MixiguoBizDB‘, ‘single user‘, ‘false‘ GO

-- sql server 2012 USE MASTER GO SP_CONFIGURE ‘ALLOW UPDATES‘,1 RECONFIGURE WITH OVERRIDE GO ALTER DATABASE Tfs_DefaultCollection SET EMERGENCY GO alter database Tfs_DefaultCollection set SINGLE_USER with ROLLBACK IMMEDIATE --sp_dboption ‘Tfs_DefaultCollection‘, ‘single user‘, ‘true‘ GO DBCC CHECKDB(‘Tfs_DefaultCollection‘,‘REPAIR_ALLOW_DATA_LOSS‘) GO ALTER DATABASE Tfs_DefaultCollection SET ONLINE GO sp_configure ‘allow updates‘, 0 reconfigure with override GO --sp_dboption ‘Tfs_DefaultCollection‘, ‘single user‘, ‘false‘ alter database Tfs_DefaultCollection set MULTI_USER with ROLLBACK IMMEDIATE GO

数据库的恢复数据语句

标签:

原文地址:http://www.cnblogs.com/w1-y2-q5/p/4885605.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!