1.打開XP_CMDSHELL指令
EXEC master.dbo.sp_configure 'show advanced options', 1;
RECONFIGURE WITH OVERRIDE;
EXEC master.dbo.sp_configure 'xp_cmdshell', 1;
RECONFIGURE WITH OVERRIDE;
2.設定網路磁碟機
exec xp_cmdshell 'net use T: \\192.168.1.94\backup "password" /user:simon /y'
3.加入sql server 排程