--ERP Database Network Backup
exec master..xp_cmdshell 'net use X: /delete /y'
exec master..xp_cmdshell 'net use X: \\192.168.1.188\myback asdf;lkj1qaz /user:\ERP_backup'
declare @NetPath varchar(100)
declare @DBName varchar(100)
declare @FileName varchar(100)
------------- DB_01 -------------------------------------------
set @NetPath='\\192.168.1.188\myback\'
set @DBName='DB_01'
set @FileName=@NetPath+@DBName+'_'+convert(varchar,getdate(),112)+'.bak'
exec master..sp_addumpdevice 'disk',@DBName,@FileName
backup database @DBName to @DBName with init,nounload,noskip,stats=10,noformat
exec master..sp_dropdevice @DBName
--delete old backup
set @FileName='del '+@NetPath+@DBName+'_'+convert(varchar,getdate()-2,112)+'.bak'
exec master..xp_cmdshell @FileName
------------- SPC -------------------------------------------
set @NetPath='\\192.168.1.188\myback\'
set @DBName='SPC'
set @FileName=@NetPath+@DBName+'_'+convert(varchar,getdate(),112)+'.bak'
exec master..sp_addumpdevice 'disk',@DBName,@FileName
backup database @DBName to @DBName with init,nounload,noskip,stats=10,noformat
exec master..sp_dropdevice @DBName
--delete old backup
set @FileName='del '+@NetPath+@DBName+'_'+convert(varchar,getdate()-2,112)+'.bak'
exec master..xp_cmdshell @FileName
------------- SunSystem -------------------------------------------
set @NetPath='\\192.168.1.188\myback\'
set @DBName='SunSystem'
set @FileName=@NetPath+@DBName+'_'+convert(varchar,getdate(),112)+'.bak'
exec master..sp_addumpdevice 'disk',@DBName,@FileName
backup database @DBName to @DBName with init,nounload,noskip,stats=10,noformat
exec master..sp_dropdevice @DBName
--delete old backup
set @FileName='del '+@NetPath+@DBName+'_'+convert(varchar,getdate()-2,112)+'.bak'
exec master..xp_cmdshell @FileName
------------- OA -------------------------------------------
set @NetPath='\\192.168.1.188\myback\'
set @DBName='OA'
set @FileName=@NetPath+@DBName+'_'+convert(varchar,getdate(),112)+'.bak'
exec master..sp_addumpdevice 'disk',@DBName,@FileName
backup database @DBName to @DBName with init,nounload,noskip,stats=10,noformat
exec master..sp_dropdevice @DBName
--delete old backup
set @FileName='del '+@NetPath+@DBName+'_'+convert(varchar,getdate()-2,112)+'.bak'
exec master..xp_cmdshell @FileName
------------- wsxPLM -------------------------------------------
set @NetPath='\\192.168.1.188\myback\'
set @DBName='wsxPLM'
set @FileName=@NetPath+@DBName+'_'+convert(varchar,getdate(),112)+'.bak'
exec master..sp_addumpdevice 'disk',@DBName,@FileName
backup database @DBName to @DBName with init,nounload,noskip,stats=10,noformat
exec master..sp_dropdevice @DBName
--delete old backup
set @FileName='del '+@NetPath+@DBName+'_'+convert(varchar,getdate()-2,112)+'.bak'
exec master..xp_cmdshell @FileName
------------- DB_02 -------------------------------------------
set @NetPath='\\192.168.1.188\myback\'
set @DBName='DB_02'
set @FileName=@NetPath+@DBName+'_'+convert(varchar,getdate(),112)+'.bak'
exec master..sp_addumpdevice 'disk',@DBName,@FileName
backup database @DBName to @DBName with init,nounload,noskip,stats=10,noformat
exec master..sp_dropdevice @DBName
--delete old backup
set @FileName='del '+@NetPath+@DBName+'_'+convert(varchar,getdate()-2,112)+'.bak'
exec master..xp_cmdshell @FileName
------------- DB_03 -------------------------------------------
set @NetPath='\\192.168.1.188\myback\'
set @DBName='DB_03'
set @FileName=@NetPath+@DBName+'_'+convert(varchar,getdate(),112)+'.bak'
exec master..sp_addumpdevice 'disk',@DBName,@FileName
backup database @DBName to @DBName with init,nounload,noskip,stats=10,noformat
exec master..sp_dropdevice @DBName
--delete old backup
set @FileName='del '+@NetPath+@DBName+'_'+convert(varchar,getdate()-2,112)+'.bak'
exec master..xp_cmdshell @FileName
相关推荐
生产管理ERP系统-生产管理ERP系统-生产管理ERP系统-生产管理ERP系统-生产管理ERP系统-生产管理ERP系统-生产管理ERP系统-生产管理ERP系统-生产管理ERP系统-生产管理ERP系统-生产管理ERP系统-生产管理ERP系统 ...
通过宝塔面板安装-管伊佳ERP,方便大家安装部署到服务器。
redragon-redragon-erp-master_ERP.zip
Accenture作品----ERP咨询报告.RARAccenture作品----ERP咨询报告.RARAccenture作品----ERP咨询报告.RARAccenture作品----ERP咨询报告.RARAccenture作品----ERP咨询报告.RARAccenture作品----ERP咨询报告.RAR
redragon-redragon-erp-master_ERP_源码.zip
Accenture作品----ERP咨询报告 .
ERP---ERP工作原理.pptx
Net实战商用源码---征途ERP
ERP---ERP工作原理(PPT200页).pptx
ERP课程综合实习报告---电子沙盘ERP人机对抗
使用说明---信华ERP生产管理软件(广告行业版).doc
MF00217-大型ERP ERP管理系统源码
【推选】信息化--ERP--ERP产业之兴起应用与未来PPT资料.ppt
信息化 - ERP - ERP产业之兴起、应用与未来
二十一世纪的企业---ERP与SAP.pptx
ERP---ERP工作原理_CRM产品经理 需求规格说明书管理系统规格需求说明书模板.ppt
00605 ERP-ORACLE-ERP培训讲稿(PPT 186页).ppt
信息化 - ERP - ERP产业之兴起、应用与未来.pptx