Skip to content

数据库基础命令 ​

MSSQL ​

开启xp_cmdshell并执行命令 ​

sql
# 开启xp_cmdshell,若关闭修改第二个1为0

sp_configure 'show advanced options',1
reconfigure
go
sp_configure 'xp_cmdshell',1
reconfigure
go

# 执行命令

exec master..xp_cmdshell 'whoami'