免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
1234
最近访问板块 发新帖
楼主: wf8801

误删除日志文件的问题 [复制链接]

论坛徽章:
0
发表于 2006-02-21 09:50 |显示全部楼层
1> dbcc dbrepair(cwbase3,dropdb)
2> go
Msg 2573, Level 16, State 1:
Server 'sybase1', Line 1:
Database 'cwbase3' is not marked suspect. You cannot drop it with DBCC.
DBCC execution completed. If DBCC printed error messages, contact a user with
System Administrator (SA) role.

论坛徽章:
0
发表于 2006-02-21 10:43 |显示全部楼层
update sysdatabases set status=256 where name="cwbase3"
go
dbcc dbrepair(cwbase3,dropdb)
go

将数据库标记为可疑状态,然后用dbcc dbrepair删除.
参见sybase手册第四卷系统表关于sysdatabases表的说明.

论坛徽章:
0
发表于 2006-02-21 13:21 |显示全部楼层
1> update sysdatabases set status=256 where name="cwbase3"
2> go
Msg 10321, Level 14, State 1:
Server 'sybase1', Line 1:
Ad-hoc updates to system catalogs not enabled. A user with System Security
Officer (SSO) role must reconfigure system to allow this.

论坛徽章:
0
发表于 2006-02-21 14:09 |显示全部楼层

问楼主一个问题

你怎么在运行的情况下删除的日志?

论坛徽章:
0
发表于 2006-02-21 14:32 |显示全部楼层
原帖由 wf8801 于 2006-2-21 13:21 发表
1> update sysdatabases set status=256 where name="cwbase3"
2> go
Msg 10321, Level 14, State 1:
Server 'sybase1', Line 1:
Ad-hoc updates to system catalogs not enabled. A user wi ...



sp_configure "allow updates to system tables",1
打开允许更新系统表配置.

论坛徽章:
0
发表于 2006-02-21 15:32 |显示全部楼层
1> sp_configure "allow updates to system tables",1
2> go
Parameter Name                 Default     Memory Used Config Value
         Run Value   Unit                 Type      
------------------------------ ----------- ----------- ------------
         ----------- -------------------- ----------
allow updates to system tables           0           0           1
                   1 switch               dynamic   

(1 row affected)
Configuration option changed. The SQL Server need not be rebooted since the
option is dynamic.
Changing the value of 'allow updates to system tables' does not increase the
amount of memory Adaptive Server uses.
(return status = 0)
1> update sysdatabases set status=256 where name="cwbase3"
2> go
(1 row affected)
1> dbcc dbrepair(cwbase3,dropdb)
2> go
Msg 2573, Level 16, State 1:
Server 'sybase1', Line 1:
Database 'cwbase3' is not marked suspect. You cannot drop it with DBCC.
DBCC execution completed. If DBCC printed error messages, contact a user with
System Administrator (SA) role.
1>

论坛徽章:
0
发表于 2006-02-21 16:14 |显示全部楼层
更改status后把sybase重启一遍再用dbcc repair删除.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP