Retrieve the deleted system table from master Library

Source: Internet
Author: User

Any system tables in the master database are deleted by mistake in one of the database instances that you took over.

The most immediate effect is that when it comes to querying these system tables, an error occurs.

For example, when you right-click a data, the error appears as shown when you view the property:

So how do we get these tables back? One way is to find a normal instance, find these tables under the master database, and export the scripts for these tables,

Run these scripts in the deleted master Library, and then use Sp_ms_marksystemobject to identify the tables as system objects.

In fact, the scripts for these tables can also be found in SQL Server's installation package: Assuming the installation package path is e:\, the path is (here is an example of SQL Server 2008r2enterprise installation package):

E:\x64\Setup\sql_engine_core_inst_msi\PFiles\SqlServr\MSSQL. X\mssql\install

For example, spt_values and Spt_monitor scripts are U_tables.sql

Retrieve the deleted system table from master Library

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.