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 set automatic backup policy in SQL Server database

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

This article will explain in detail how to set the automatic backup strategy in the SQL Server database. The content of the article is of high quality, so the editor will share it with you for reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.

one。 A brief introduction

SQL Server's own maintenance plan is a very useful maintenance tool that can accomplish most database maintenance tasks.

Database backup is also a very important part of daily work. There are many ways to back up.

Today, I will introduce the simplest way: directly through the SQL Server Management Studio graphical interface to set backup strategy.

Moreover, this mode of operation is the fastest to respond to the immediate backup requirements, and the backup strategy can be created directly through the graphical interface without writing code.

two。 Demand

Here is how to create a backup strategy combined with a specific work scenario.

For example, a backup of a production system is generally required as follows:

-1. A full backup every Saturday (this article only implements this requirement, the other two please refer to requirement 1)

-2. One incremental backup per day during weekdays

-3. All backups are deleted voluntarily after a month.

three。 Hands-on Activities

Operation steps

1. New maintenance plan

two。 Name the maintenance plan

3. The task of creating a maintenance plan

4. Set up tasks for the maintenance plan

5. Set up a subplan

6. Find the plan in the assignment and test it

7. After successful execution, the backup bak file is found in the backup file set up.

8. If the execution fails, check the history of the job and correct it (usually it may be the account permission to execute the job, please explore for yourself)

Realize the requirement of full backup every Saturday

1. New maintenance plan

two。 Name the maintenance plan, for example, here we call it "Saturday_full_backup"

3. Drag the toolbox to create a maintenance plan task

4. To set up the task, refer to the following figure (under win10, there is a problem with the interface display of the setting task. Here I cut the image of the server)

Set the backup type to: full (full)

5. After the task is set up, set the subplan

Set the execution time to: every Saturday, 22:00 in the evening

6. After the backup policy is set, find the backup policy you created in the sidebar on the left

SQL Server Agent-- > Job-- > Saturday_full_backup.Subplan_1 (backup strategy you just created)

7. Right-click the job and select "Job start step"

8. After the job is executed successfully, go to the backup folder you set up and view the backup task you just performed

On how to set up automatic backup strategy in the SQL Server database to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

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