Teach you how to attach a separate query database

Source: Internet
Author: User
Tags log one table

Brief introduction

Some time, due to log corruption and other reasons, caused the database query. If you detach the database at this point, you will find that you can no longer attach the database, and the consequences are serious. Therefore, this article provides a way to make the database query and isolate the instance, still can use a hack method to attach.

Specific steps

There is currently a database attchsuspectdatabase with only one table test, with only one column of int, where the data is currently 1, 2. We make the database questionable, as shown in Figure 1.

Figure 1. Database questioning

At this point, we detach the database. Attempt to attach, display failed, as shown in Figure 2.

Figure 2. The database is no longer attached

Even if we use the method of rebuilding the log, we find that it is still not attached, as shown in Figure 3.

Figure 3. Attempt to rebuild log method append, still invalid

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/database/SQLServer/

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.