1、
--允许配置高级选项
EXEC sp_configure 'show advanced options',1
GO
RECONFIGURE
GO
2、
--开启xp_cmdshell服务
EXEC sp_configure 'xp_cmdshell',1
RECONFIGURE
GO
3、
--使用 xp_cmdshell
master..xp_cmdshell 'copy e:\databasebackup\test.bakm:'
4、
-- 允许配置高级选项
EXEC sp_configure 'show advanced options', 1
GO
RECONFIGURE
GO
-- 禁用xp_cmdshell
EXEC sp_configure 'xp_cmdshell', 0
GO
RECONFIGURE
GO
--允许配置高级选项
EXEC sp_configure 'show advanced options',1
GO
RECONFIGURE
GO
2、
--开启xp_cmdshell服务
EXEC sp_configure 'xp_cmdshell',1
RECONFIGURE
GO
3、
--使用 xp_cmdshell
master..xp_cmdshell 'copy e:\databasebackup\test.bakm:'
4、
-- 允许配置高级选项
EXEC sp_configure 'show advanced options', 1
GO
RECONFIGURE
GO
-- 禁用xp_cmdshell
EXEC sp_configure 'xp_cmdshell', 0
GO
RECONFIGURE
GO