EXEC sp_configure 'show advanced options', 1 GO -- 重新配置 RECONFIGURE GO -- 啟用xp_cmdshell EXEC sp_configure 'xp_cmdshell', 1 GO --重新配置 RECONFIGURE GO --EXEC xp_cmdshell 'net use y: \\目標ip\backup "password" /user:目標ip\administrator ' EXEC xp_cmdshell 'net use y: \\172.24.180.18\Share "password" /user:172.24.180.18\administrator ' backup database ctrl to disk='y:\ctrl.bak' EXEC xp_cmdshell 'net use /delete y:' -- 啟用xp_cmdshell EXEC sp_configure 'xp_cmdshell', 0 GO --重新配置 RECONFIGURE GO EXEC sp_configure 'show advanced options', 0 GO -- 重新配置 RECONFIGURE GO
|
|