SQL Server database implementation of automatic backup instance Solution

Source: Internet
Author: User
Tags what sql management studio sql server management sql server management studio

Steps for automatic backup in SQL Server 2005 database:
In the left Toolbox (if not, press Ctrl + Alt + X), drag the "backup database task" to the yellow area in the middle.

Double-click the task to be dragged out. The design attribute window is displayed.

In the database, select the database you want to back up, set the backup to there, and set the backup file name

After the design, click "OK", you can also click "T-SQL" to see what SQL statements will be used to deal with your needs.


Click "..." next to "Schedule" to set the scheduled time.

Save it.

Detailed instance operations
1. Open SQL Server Management Studio

2. Start the SQL Server proxy

3. Click job> create job.

4. Enter the job name in "regular"

5. Create a step, select the T-SQL type, and enter the following statement in the following command (the red part should be changed according to your actual situation, D: sql2005back to your own backup path, change sq_test to the name of the database to be backed up)

DECLARE @ strPath NVARCHAR (200)

Set @ strPath = convert (NVARCHAR (19), getdate (), 120)

Set @ strPath = REPLACE (@ strPath ,':','.')

Set @ strPath = 'd: sql2005back '+ @ strPath +'. Bak'

Backup database [sq_test] to disk = @ strPath with noinit, NOUNLOAD, NOSKIP, STATS = 10, NOFORMAT

6. Add a plan and set the frequency and time.

OK.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.