生成简单的sql Server备份脚本的sql语句(运行下面语句):
use master
select 'backup database '+name+' to disk=''F:\sqlserver_backup\'+name+'.bak'' with init' from sysdatabases ;
select 'backup database '+name+' to disk=''F:\sqlserver_backup\'+name+'.bak'' with init' from sysdatabases ;
生成备份脚本如下:
sql代码如下:
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
---- 来自jb51.cc
原文链接:https://www.f2er.com/mssql/530200.html