sybase :数据库不能打开的解决办法(状态装载或可疑)
来源:互联网 发布:python mqtt 编辑:程序博客网 时间:2024/06/05 17:03
平台资料:
操作系统平台:Windows 2000 5.00.2195 Service Pack 4
数据库平台:Sysbase 12.5
server:db_jc,database:db_text,db_jd,db_jh,db_app
现象:
整个服务器正常运行,此服务器上的db_jd,db_jh运行正常,只有db_text不能打开(提示状态为装载或可疑状态)。
用Powerbuilder 6.0连接时报
Database 'db_jc' cannot be opened. An earlier attempt at recovery marked it 'suspect'. Check the SQL Server errorlog
for information as to the cause.
查看错误日志errorlog,发现有这么一段:
Keys of index id 1 for table 'systhresholds' in data page not in correct order. Drop and re-create the index. (index
page 337)
The total number of data pages in this table is 1.
Table has 2 data rows.
DBCC execution completed. If DBCC printed error messages, contact a user with System Administrator (SA) role.
分析:
数据库重新启动的时候报错,该应用数据库不能online,无法访问该数据库上的应用数据。
解决办法:
查手册的表述入下
Table 'systhresholds' in database '%.*s' is not in its
correct sort order. Either the clustered index is
missing or there is data corruption in the table.
和日志中表述一样,按照提示,执行dbcc
错误信息如下:
Keys of index id 1 for table 'systhresholds' in data page not in correct order. Drop and re-create the index. (index page
337)
The total number of data pages in this table is 1.
Table has 2 data rows.
DBCC execution completed. If DBCC printed error messages, contact a user with System Administrator (SA) role.
最后的解决办法是:
isql -Usa -P************ -Sdb_jc 进入isql环境 (后面带备注)
use master
go
dump database master to "/usr/sybase/master.dup" --备份master数据库
go
sp_configure "allow updates", 1 --允许sysdatabases可以被修改
go
update sysdatabases set status = -32768 where name = 'db_text' --状态标志修改
go
update sysdatabases set status2 = -32768 where name = 'db_text'
go
shutdown --服务器关闭
go
use db_text
go
select first from sysindexes where id = object_id("systhresholds") --获取索引页
go
select count(*) from systhresholds --获取数据行
go
dbcc traceon(3604)
go
dbcc delete_row('db_text',337;, row, 0) --删除坏行
go
dbcc delete_row('db_text',337, row, 1)
go
select count(*) from systhresholds --检查
go
use master
go
update sysdatabases set status = 0 where name = 'db_text' --标志复位
go
update sysdatabases set status2 = 0 where name = 'db_text'
go
sp_configure "allow updates", 0 --不允许sysdatabases可以被修改
go
shutdown with nowait
go
此时启动正常了。。做dbcc检查,没有报错!
操作系统平台:Windows 2000 5.00.2195 Service Pack 4
数据库平台:Sysbase 12.5
server:db_jc,database:db_text,db_jd,db_jh,db_app
现象:
整个服务器正常运行,此服务器上的db_jd,db_jh运行正常,只有db_text不能打开(提示状态为装载或可疑状态)。
用Powerbuilder 6.0连接时报
Database 'db_jc' cannot be opened. An earlier attempt at recovery marked it 'suspect'. Check the SQL Server errorlog
for information as to the cause.
查看错误日志errorlog,发现有这么一段:
Keys of index id 1 for table 'systhresholds' in data page not in correct order. Drop and re-create the index. (index
page 337)
The total number of data pages in this table is 1.
Table has 2 data rows.
DBCC execution completed. If DBCC printed error messages, contact a user with System Administrator (SA) role.
分析:
数据库重新启动的时候报错,该应用数据库不能online,无法访问该数据库上的应用数据。
解决办法:
查手册的表述入下
Table 'systhresholds' in database '%.*s' is not in its
correct sort order. Either the clustered index is
missing or there is data corruption in the table.
和日志中表述一样,按照提示,执行dbcc
错误信息如下:
Keys of index id 1 for table 'systhresholds' in data page not in correct order. Drop and re-create the index. (index page
337)
The total number of data pages in this table is 1.
Table has 2 data rows.
DBCC execution completed. If DBCC printed error messages, contact a user with System Administrator (SA) role.
最后的解决办法是:
isql -Usa -P************ -Sdb_jc 进入isql环境 (后面带备注)
use master
go
dump database master to "/usr/sybase/master.dup" --备份master数据库
go
sp_configure "allow updates", 1 --允许sysdatabases可以被修改
go
update sysdatabases set status = -32768 where name = 'db_text' --状态标志修改
go
update sysdatabases set status2 = -32768 where name = 'db_text'
go
shutdown --服务器关闭
go
use db_text
go
select first from sysindexes where id = object_id("systhresholds") --获取索引页
go
select count(*) from systhresholds --获取数据行
go
dbcc traceon(3604)
go
dbcc delete_row('db_text',337;, row, 0) --删除坏行
go
dbcc delete_row('db_text',337, row, 1)
go
select count(*) from systhresholds --检查
go
use master
go
update sysdatabases set status = 0 where name = 'db_text' --标志复位
go
update sysdatabases set status2 = 0 where name = 'db_text'
go
sp_configure "allow updates", 0 --不允许sysdatabases可以被修改
go
shutdown with nowait
go
此时启动正常了。。做dbcc检查,没有报错!
- sybase :数据库不能打开的解决办法(状态装载或可疑)
- SQLServer 数据库处于可疑状态下的解决办法
- 数据库置疑(可疑状态)的修复方法
- SQL SERVER 2005 数据库状态为“可疑”的解决方法(转)
- SQL SERVER 2005 数据库状态为“可疑”的解决方法
- SQL SERVER 2008 数据库状态为“可疑”的解决方法
- SQL SERVER 2005 数据库状态为“可疑”的解决方法
- SQL SERVER 2005 数据库状态为“可疑”的解决方法
- SQL SERVER 2005 数据库状态为“可疑”的解决方法
- SQL SERVER 2005 数据库状态为“可疑”的解决方法
- SQL SERVER 2005 数据库状态为“可疑”的解决方法
- SQL SERVER 2005 数据库状态为“可疑”的解决方法
- SQL SERVER 2005 数据库状态为“可疑”的解决方法【转】
- sybase 卸载后不能安装的解决办法
- 数据库可疑的解决方案
- 终于搞定Oracle 10g em登录提示“数据库状态当前不可用可能是因为数据库的状态为装载或不装载”问题
- oracle 10g EM登录后提示“数据库状态当前不可用可能是因为数据库的状态为装载或不装载”
- 数据库不能读取也不能打开的解决办法
- 利用ref cursor返回结果集的几种方法探讨
- Ganymede Around the world中我的名字
- JavaScript中external与active host之间的事件调用机制
- XML初识
- Dreamweaver设计视图中输入多个空格的方法
- sybase :数据库不能打开的解决办法(状态装载或可疑)
- IT职场:外企面试官最爱提的问题TOP10
- 用手机看在线视频
- 字体样式
- C#学习3——委托和事件
- 快速精通掌握FRAME的使用
- 庖丁解牛系列(一)
- 初涉项目管理
- OpenCV学习笔记(一)