----------启用xp_cmdshell存储过程----------------------
--检查xp_cmdshell是否启动
exec master..xp_cmdshell 'dir'
go
--启动xp_cmdshell存储过程
exec sp_configure 'show advanced options',1
go
reconfigure
go
exec sp_configure 'xp_cmdshell',1
go
reconfigure
go
--关闭xp_cmdshell存储过程
reconfigure
go
exec sp_configure 'xp_cmdshell',0
go
reconfigure
go
exec sp_configure 'show advanced options',0
go
SQL Server 中启用xp_cmdshell的sql语句
最新推荐文章于 2025-07-24 08:02:48 发布
3767

被折叠的 条评论
为什么被折叠?



