First we can refer to:
Http://blog.sina.com.cn/s/blog_816780b40101m4jb.html
Again, some of these errors need to be corrected, please refer to the specific commands:
All of these steps are:
650) this.width=650; "title=" SQL Server 1.png "src=" http://s3.51cto.com/wyfs02/M01/75/44/wKioL1Y0XOqxF3tKAAKxq_ 8nyti926.jpg "alt=" Wkiol1y0xoqxf3tkaakxq_8nyti926.jpg "/>
The first thing to edit is Backup_yeshare:
DECLARE @strPath NVARCHAR (200)
Set @strPath = Convert (NVARCHAR (+), GETDATE (), 120)
Set @strPath = REPLACE (@strPath, ': ', '-')
Set @strPath = ' D:\DB_BACKUP_AUTO\YESHARE\ ' + ' db_bak ' [email protected] + '. Bak '
BACKUP DATABASE yeshare to DISK = @strPath with Noinit, Nounload, noskip, STATS = ten, Noformat
Delete old backup 5day ago:
DECLARE @OLDDATE DATETIME
SELECT @OLDDATE = GETDATE ()-5
EXECUTE master.dbo.xp_delete_file 0,n ' D:\DB_BACKUP_AUTO\YESHARE\ ', N ' BAK ', @OLDDATE
In the Advanced tab, set to:
Go to the next step
The other one is:
DECLARE @strPath NVARCHAR (200)
Set @strPath = Convert (NVARCHAR (+), GETDATE (), 120)
Set @strPath = REPLACE (@strPath, ': ', '-')
Set @strPath = ' D:\DB_BACKUP_AUTO\IndustryTradeSystem\ ' + ' db_bak ' [email protected] + '. Bak '
BACKUP DATABASE industrytradesystem to DISK = @strPath with Noinit, Nounload, noskip, STATS = ten, Noformat
When the last execution is complete, select:
Quit the job reporting success
-----
After the above command is done, you need to set what time to execute these commands:
In the Schedules tab,
650) this.width=650; "title=" SQL Server 2.png "src=" http://s3.51cto.com/wyfs02/M02/75/44/wKioL1Y0X6DxQFjuAAOxS_ Wejxo984.jpg "alt=" Wkiol1y0x6dxqfjuaaoxs_wejxo984.jpg "/>
This article is from the "Sulan Network" blog, so be sure to keep this source http://zhangfang526.blog.51cto.com/8588740/1708336
SQL Server Backup