sybase :数据库不能打开的解决办法(状态装载或可疑)
2008-07-22 23:07
323 查看
平台资料:
操作系统平台: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 :数据库不能打开的解决办法(状态装载或可疑)
- ql server 2008评估期已到 不能打开数据库 解决办法
- 数据库不能读取也不能打开的解决办法
- wps最新版在APP应用打开文档后留在wps界面而不能返回APP界面的一种解决办法
- React native添加iOS远程通知点击通知打开APP在APP杀死状态下闪退解决办法
- Ubuntu“无法解析或打开软件包的列表或是状态文件”的解决办法。
- vs2012不能打开项目解决办法
- vc6.0不能打开文件-vc6.0 windows7下不能打开文件不能添加工程文件解决办法
- windows7下不能打开hlp帮助文件的解决办法
- 数据库_无法打开物理文件 XXX.mdf",操作系统错误 5:"5(拒绝访问。)"的解决办法
- firefox 3.6.12 不能打开gmail的buzz,setting和chat 解决办法
- 在VS2005中报"无法添加数据库连接 该项目不适于在指定状态下使用"的解决办法
- (数据库未打开错误)跟大家分享一个Oracle问题的解决办法
- ORACLE 11g 创建数据库时 Enterprise Manager配置失败的解决办法 无法打开OEM的解决办法
- WINXP+IIS5.1不能打开aspx文件的的问题之解决办法(一般为IIS安装顺序)
- 打开chm文件不能显示内容的解决办法
- 当IE不能打开新的网页解决办法
- Sql Server 2005/2008数据库被标记为“可疑”的解决办法
- Ubuntu“无法解析或打开软件包的列表或是状态文件”的解决办法。
- sybase sql anywhere 5.0 安装后sybase central中无法打开视图等的解决办法