Q. How do I solve one of the problems that the database is marked as "suspect" (general solution)?
 
A. Phenomenon: Error 926
 
Severity Level 14
 
Error message Text
 
Database ' xx ' cannot be opened-it has been marked suspect by recover explanation
 
(1) When you use the Transact_sql command to manipulate the data in this database, this information appears, which is a serious error if
 
You must correct this error if you want to use data from this database.
 
(2) Start Backup Server, backup master database
 
1>dump database Master to "/usr/sybase/master_dump.19991201"
 
2>go
 
(3) Login to SQL Server with isql, use sa account (this article takes PUBS2 database as an example)
 
1>sp_configure "Allow updates", 1
 
2>go
 
1>begin Tran
 
2>go
 
1>update Master. sysdatabases
 
2>set status =-32768
 
3>where name= "PUBS2"
 
4>go
 
If (1 row affected) is obtained, the
 
1>commit
 
2>go
 
Otherwise
 
1>rollback
 
2>go
 
(4.1) If conditions permit, bcp out user data or dump user database
 
(5.1) Restart SQL Server, and then have the SA account registered to SQL Server.
 
1>begin Tran
 
2>go
 
1>update Master. sysdatabases
 
2>set status=0
 
3>where name= "PUBS2"
 
4>go
 
If (1 row affected) is obtained, the
 
1>commit
 
2>go
 
Otherwise
 
1>rollback
 
2>go
 
1>sp_configure "Allow updates", 0
 
2>go