Chinaunix首页 | 论坛 | 博客
  • 博客访问: 687614
  • 博文数量: 147
  • 博客积分: 5347
  • 博客等级: 大校
  • 技术积分: 1453
  • 用 户 组: 普通用户
  • 注册时间: 2005-06-06 11:11
文章分类

全部博文(147)

文章存档

2014年(4)

2012年(9)

2011年(5)

2010年(28)

2009年(21)

2008年(29)

2007年(15)

2006年(17)

2005年(19)

我的朋友

分类: 数据库开发技术

2006-02-05 10:20:20

详细步骤:
a. Change the database context to Master and allow updates to system tables:
 
   Use Master
   Go
   sp_configure 'allow updates', 1
   reconfigure with override
   Go
b. Set the database in Emergency (bypass recovery) mode:
  
   select * from sysdatabases where name = ''
   -- note the value of the status column for later use
   begin tran
   update sysdatabases set status = 32768 where name = ''
   -- Verify one row is updated before committing
   commit tran
c. Stop and restart SQL server.
d. The syntax for DBCC REBUILD_LOG is as follows:
   DBCC REBUILD_LOG('','')
 

Update master..sysdatabases set status = 0 where name = ‘
go

sp_configure 'allow', 0
go
reconfigure with override   

e. Set the database in single-user mode and run DBCC CHECKDB to validate physical
consistency:
  
-- Put database in single user mode and run CHECKDB.
   sp_dboption '', 'single user', 'true'
   DBCC CHECKDB('')
   Go
   -- Address any errors reported by CHECKDB.
   -- Take the database out of single user mode.
   sp_dboption '', 'single user', 'false'
f. Turn off the updates to system tables by using:
  
   sp_configure 'allow updates', 0
   reconfigure with override
   Go
 
阅读(2299) | 评论(0) | 转发(0) |
0

上一篇:ORACLE BACKUP AND RECOVERY

下一篇:一条信息

给主人留下些什么吧!~~