SQL server 开启 cmdshell

 

EXEC sp_configure 'show advanced options', 1
GO
RECONFIGURE
GO

EXEC sp_configure 'xp_cmdshell',1
GO
RECONFIGURE
GO

EXEC master..xp_cmdshell 'net use Z: \\192.168.11.1\192.168.11.4BACKUP "bst123456" /user:192.168.11.1\shuiniao'
GO
exec master..xp_cmdshell 'net use \\192.168.11.1\192.168.11.4BACKUP /del'

 

posted @ 2013-08-01 17:04  StupidsCat  阅读(1419)  评论(0编辑  收藏  举报