How to contract a database (SQL Server Management Studio)

Source: Internet
Author: User

This topic describes how to use the object Resource Manager in SQL Server Management Studio to contract a database. The size of the scaled-down database cannot be smaller than the minimum size of the database. The minimum size is the size specified at the initial creation of the database, or the explicit size set last time you used the file size change operation (such as dbcc shrinkfile. For example, if the initial size of a database is 10 MB and then increases to 100 MB, the minimum size of the database can be reduced to 10 MB, even if all the data of the database has been deleted.

Shrink Database

  1. In the object Resource Manager, connect to the SQL Server 2005 database engine instance and expand the instance.

  2. Expand"Database", Right-click the database to be shrunk.

  3. Point"Task", Pointing"Contract"And then click"Database".

  4. Select"Reorganizing files before releasing unused space"Check box. If this check box is selected, it must be"Maximum available space in the compressed file"Value.

    This option is selected when dbcc shrinkdatabase is executed.Target_percentThe value is the same. Clearing this option is the same as running dbcc shrinkdatabase with the TRUNCATEONLY option. TRUNCATEONLY compresses the file to the last allocated area. This will reduce the file size without moving any data. By default, this option is cleared.

  5. Enter the maximum percentage of available space in the database file after shrinking the database. The value range is between 0 and 99. This option is only selected"Reorganizing files before releasing unused space".

  6. Click"OK".

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.