In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article focuses on "how to achieve DBCC SHRINKDATABASEMS SQL database log compression", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn how to achieve DBCC SHRINKDATABASEMS SQL database log compression bar!
MS SQL Database Log Compression method
MS SQL performance is very good, but after the database has been used for a period of time, the database becomes very large, the actual amount of data is not large. It is usually caused by the database log! Database logs can grow by hundreds of megabytes.
The MSSQL virtual host on the Internet is also expensive, so if you want to prevent the database from overcapacity, you have to compress the database log or delete the database log.
Next, I'd like to introduce you to a method.
1. Open Enterprise Manager
2. Open the database to be processed
3. Click menu > tools > SQL query Analyzer
4. Type in the input window:
DUMP TRANSACTION [database name] WITH NO_LOG
BACKUP LOG [database name] WITH NO_LOG
DBCC SHRINKDATABASE ([database name])
Click execute! In this way, the database operation is successful.
The methods in the program:
Compress database log
-1. Clear the log
Exec ('DUMP TRANSACTION [' @ dbname'] WITH NO_LOG')
-- 2. Truncate the transaction log:
Exec ('BACKUP LOG [' @ dbname'] WITH NO_LOG')
-3. Shrink the database file (if it is not compressed, the database file will not be reduced
Exec ('DBCC SHRINKDATABASE ([' @ dbname'])')
At this point, I believe that everyone on "how to achieve DBCC SHRINKDATABASEMS SQL database log compression" have a deeper understanding, might as well to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.