Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to clean up database logs

2025-02-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

Today, I will talk to you about how to clean up the database logs, which may not be well understood by many people. in order to make you understand better, the editor has summarized the following contents for you. I hope you can get something according to this article.

Dear customer, how long has your software been in use? Do you feel that the running speed of the software is decreasing? Maybe you got hit, oh, maybe the data log is getting bigger and bigger, and the disk space is taking up a lot of space. Today, the editor will popularize for you how to clean up the data log.

01

Open SQL Server Management Studio

02

Log into the database

03

Fill in the sentence

➀new query (there will be a place to fill in the statement on the right)

➁ fill in the statement (change the account set into the account set you want to execute)

➂ click on the red exclamation point to execute (please do not do anything else during execution)

04

Each version of the database statement

2000

Please select the database name in the database query analyzer

Execute the following statement

Pay attention to changing the database name

Backup log [database name] with no_log

Clear database log

For example, the name of your account set is 2010, then the corresponding sentence is

Backup log [account set 2010] with no_log

2005

1. Need to execute in the database

2. Only applicable to SQL2005

3. You need to manually change the account set name to the corresponding account set name.

Alter DataBase account set name SET RECOVERY SIMPLE

Go

Dump Transaction account set name With No_Log

BackUp Log account set name With No_Log

DBcc ShrinkDataBase (account set name)

2008

1. Need to execute in the database

2. Only applicable to SQL2008

3. You need to manually change the account set name to the corresponding account set name * /

Alter DataBase account set name SET RECOVERY SIMPLE

Go

DBcc ShrinkDataBase (account set name)

Finally, the editor reminded: be sure to do a good data backup before operation, this step is very important!

After reading the above, do you have any further understanding of how to clean up the database log? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

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.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report