Set SQL Server timed automatic Database Backup

Source: Internet
Author: User

First, start the Database "SQL Server proxy". There are two startup methods: 1. Enable the SQL Server Agent in the SQL Server 2005 service by using the SQL database-Configuration tool-SQL servers Configuration Manager. 2. Right-click my computer-Manage-services and applicationsProgram-- Service, find the SQL Server Agent and enable it.
Start the SQL Server proxy
 
Click job> create job
"
Enter the job name in general.

Create step, type select T-SQL, enter the following statement in the following command

Declare @ strpath nvarchar (200)

Set @ strpath = convert (nvarchar (19), getdate (), 120)

Set @ strpath = Replace (@ strpath ,':','.')

Set @ strpath = 'd: \ Bak \ '+ 'databasename' + @ strpath +'. Bak'
Backup database [databasename] to disk = @ strpath with noinit, nounload, noskip, stats = 10, noformat
(Change D: \ Bak \ To your backup path, and change databasename to the name of the database you want to back up) Add a plan, set the frequency, time, and so on.
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.