Rebldlog (Sybase数据库日志重建) -zt

How to rebuild db log
Note:This process may result in some inconsistency in the db

(1)    Grant sa as sybase_ts_role

1>     sp_role  ‘grant’, ‘sybase ts role’,sa
2>     go

(2)    set the database  as  “bypass”

1>     sp_configure  ‘ allow updates to system tables ’,1
2>     go
1>     use master
2>     go
1>     update sysdatabases
2>     set status=“-32768”  where dbid =“the  database  id”
3>     go
1>     shutdown with nowait
2>     go

(3)    rebuild the database log

1>     use master
2>     go
1>     dbcc rebuild_log(db_name,l,l)    (dbcc checkcatalog  针对sql server)
2>     go
1>     shutdown with nowait
2>     go

(4)    reboot the db and set the status to normal

1>     use master
2>     go
1>     update sysdatabases
2>     set status =0  where dbid = “the  database  id”
3>     go
1>     sp_configure  ‘ allow updates to system tables ’,0
2>     go
1>     shutdown
2>     go
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值