日死你在线视频,国产裸体视频BBBBB,国产精品全国免费播放,婷婷丁香六月天,久久精品成人欧美大片yy,在线小视频亚洲欧洲,老熟女喷水,天天干夜夜操时时干,国产99视频 精品免费

Rss & SiteMap

昂捷論壇 http://www.yzsenyi.com

中國零售業界精英論壇!
共2 條記錄, 每頁顯示 15 條, 頁簽: [1]
[瀏覽完整版]

標題:問:簡單做異地備份的腳本是怎樣的?

1樓
飛絮 發表于:2008/6/3 22:18:23

答:在數據庫任務中以以下腳本可實現數據庫的定時備份:

 


-- 異地備份

 

-- 第一步:使用net命令連接異地服務器
-- To allow advanced options to be changed.
EXEC sp_configure 'show advanced options', 1
GO
-- To update the currently configured value for advanced options.
RECONFIGURE
GO
-- To enable the feature.
EXEC sp_configure 'xp_cmdshell', 1
GO
-- To update the currently configured value for this feature.
RECONFIGURE
GO

EXEC xp_cmdshell 'net use \\192.168.1.6\d$\shq_bak password /user:administrator',no_output

-- 第二步:執行備份

declare @day int
set @day = datepart(weekday,getdate())
if (@day in (3,5,7)) begin
 backup database enjoy_shq to disk='\\192.168.1.6\d$\shq_bak\enjoy_shq01.bak' with init
end else if (@day in (2,4,6)) begin
 backup database enjoy_shq to disk='\\192.168.1.6\d$\shq_bak\enjoy_shq02.bak' with init
end else begin
 backup database enjoy_shq to disk='\\192.168.1.6\d$\shq_bak\enjoy_shq01.bak' with init
end

共2 條記錄, 每頁顯示 15 條, 頁簽: [1]

Copyright © 2006-2010 EnjoyIT.com.cn
網友言論或觀點與昂捷公司無關!涉及版權/著作權問題請與發帖者直接聯系
Powered By Dvbbs Version 8.2.0
Processed in 0.18750 s, 2 queries.