一般的情況下我們會選用SQL Server自帶的數(shù)據(jù)庫維護計劃來定義備份. 但有些時候,有的機器數(shù)據(jù)庫維護計劃不能成功實現(xiàn)備份. 錯誤原因可能不盡相同, 這時我們可以用簡單的SQL Server備份腳本來做備份. 生成簡單的SQL Server備份腳本的SQL語句: use master select 'backup database '+name+' to disk=''F:\sqlserver_backup\'+name+'.bak'' with init' from sysdatabases ------------------------------------------------------------------------------------------------- backup database master to disk='F:\sqlserver_backup\master.bak' with init backup database model to disk='F:\sqlserver_backup\model.bak' with init backup database msdb to disk='F:\sqlserver_backup\msdb.bak' with init backup database db_app1 to disk='F:\sqlserver_backup\db_app1.bak' with init backup database db_app2 to disk=F:\sqlserver_backup\db_app2.bak' with init