This article is a mirror article of machine translation, please click here to jump to the original article.

View: 13937|Reply: 0

[Source] After MSSQL deletes a large number of table records, the database capacity does not decrease

[Copy link]
Posted on 2/9/2015 4:19:03 PM | | |
After inserting a large amount of data into a table today;

Then delete some useless tables, and find that the disk capacity occupied by the database has not decreased.

Then I found some tutorials on the Internet, and then executed the following SQL statement, and the capacity was reduced from 17G to 8G.

  1. BACKUP LOG 库名 WITH NO_LOG

  2. DBCC SHRINKDATABASE(库名)
Copy code





Previous:sql notes from recent days
Next:Copy tables and content from one database to another
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com