A big trawl for the Sybase database problem

Source: Internet
Author: User
Tags commit rollback sybase sybase database backup

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.