In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
MS SQL SERVER database log compression method and code, I believe that many inexperienced people do not know what to do, so this paper summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.
MSSQL 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:
The code is as follows:
DUMPTRANSACTION [database name]
WITHNO_LOG BACKUPLOG [database name]
WITHNO_LOG DBCCSHRINKDATABASE ([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 ('DUMPTRANSACTION [' + @ dbname+'] WITHNO_LOG')
-- 2. Truncate transaction log: exec ('BACKUPLOG [' + @ dbname+'] WITHNO_LOG')
-3. Shrink database files (if not compressed, database files will not reduce exec ('DBCCSHRINKDATABASE ([' + @ dbname+'])')
After reading the above, have you mastered the MS SQL SERVER database log compression method and code method? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
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: 234
*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.