- 论坛徽章:
- 0
|
可以的﹐最近比較忙﹐自己寫寫吧。
刪除文件可以用
master.dbo.xp_cmdshell \'delete e:\\backup\\xzh040302.dat\'
創建備份設備﹑存儲過程﹑及JOB進行調度
USE master
EXEC sp_addumpdevice \'disk\', \'MyNwind_2\',
\'c:\\Program Files\\Microsoft SQL Server\\MSSQL\\BACKUP\\MyNwind_2.dat\'
--Create the log backup device.
USE master
EXEC sp_addumpdevice \'disk\', \'MyNwindLog1\',
\'c:\\Program Files\\Microsoft SQL Server\\MSSQL\\BACKUP\\MyNwindLog1.dat\'
-- Back up the full MyNwind database.
BACKUP DATABASE MyNwind TO MyNwind_2
-- Update activity has occurred since the full database backup.
-- Back up the log of the MyNwind database.
BACKUP LOG MyNwind
TO MyNwindLog1
用到的東西就這些啦﹐主要是如何靈活地哂盟鼈儭 |
|