In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains how mssql automatically backs up and clears the log file server. Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn "mssql how to automatically backup and automatically clear log file server" bar!
1. Daily automatic backup strongly recommends qualified users to do this operation! 1. Open the enterprise manager, click the Microsoft SQL Server--SQL Server group in the root directory of the console-- double-click to open your server 2, then click the tools in the menu above-- Select the database maintenance planner 3, next select the data to be backed up automatically, update the data optimization information next, generally do not make a choice here-- check the data integrity next. Generally, do not select 4. Specify the database maintenance plan in the next step. The default is to back up once a week. Click change to select a point after backup every day. 5. Specify the backup disk directory in the next step, and select the specified directory. For example, you can create a new directory on disk D, such as: ddatabak, and then choose to use this directory here. If you have more databases, you'd better choose to establish a subdirectory for each database. Then choose to delete backups earlier than how many days ago. Generally, set 4Mel for 7 days, depending on your specific backup requirements. Backup file extension is generally bak. Specify the transaction log backup plan with the default 6. Next step, you need to make a choice-- the report to be generated in the next step is generally not selected-- the next step is to maintain the plan history. It is best to use the default option-the next step to complete 7. At this time, the database plan has been run successfully, and it will back up automatically according to your above settings. Modify the plan: open the enterprise manager, click the Microsoft SQL Server--SQL Server group in the root directory of the console, double-click to open your server, manage-database maintenance plan, and then you can see the plan you set, and you can modify or delete it.
2. Database log files are automatically cleaned regularly. Database log files grow over time. If they are not cleaned for a long time, the files will become very large, so they need to be emptied regularly, but the daily solstice files are an important basis for restoring the database. It is also unwise not to use log files. Manual removal of a single database is fine, but if there are more databases, or there is no time to clean them temporarily, the hard disk space may be full, affecting access. Therefore, it is practical to set up automatic cleaning of database log files. Manual cleaning method: right-click the database to be cleaned, select "Properties", on the "tab", set the fault recovery model to simple, determine and then close; then right-click the database, "all tasks"-"shrink database", confirm that you can clear the log file, and finally remember to re-select "Properties" to set the fault recovery model to complete. Automatic cleanup method: also use the sql server agent service to perform automatic jobs. Open the enterprise manager, go to "Administration"-"sql server Agent Service"-"Job", right-click in the right window, and select "New Job". In the "General" tab, fill in the job name, specific description, and note that the owner had better use sa or the default management account. Go to the "steps" tab, create a new job step, fill in the step name, type is script, and the database is the database that needs to be cleaned up. Fill in the following command in the following command: DUMP TRANSACTION database name WITH NO_LOG DBCC SHRINKFILE (database log file name, 1) fill in the database name to be maintained, database log file name fill in the corresponding log file name, note Not the name with the suffix seen in Explorer, but the name of the log in the log tab in the database properties in Enterprise Manager (usually just a suffix. ), and add a job step after confirmation If you need to maintain multiple databases, repeat the job steps using the above method, pay attention to the action after the success or failure of each step, and finally select the starting step. In the scheduling tab, similar to the backup maintenance plan, fill in the scheduling cycle, that is, the periodic cleaning cycle, without further details.
At this point, I believe you have a deeper understanding of "mssql how to automatically back up and automatically clear log file server". You might as well do it in practice. 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.