1.在sp_configure 配置xp_cmdshell 可運作
2.建立一個賬号 test ,用來執行 xp_cmdshell 但是非sysadmin權限
3.用grant 把 xp_cmdshell 權限賦予 test
4.建立代理賬号,這個賬号是windows 賬号。
5.在sql server 中 設定代理賬号,右擊執行個體屬性 安全性下的代理中填入 windows 賬号密碼
或者使用 sp_xp_cmdshell_proxy_account 設定代理賬号
1.在sp_configure 配置xp_cmdshell 可運作
2.建立一個賬号 test ,用來執行 xp_cmdshell 但是非sysadmin權限
3.用grant 把 xp_cmdshell 權限賦予 test
4.建立代理賬号,這個賬号是windows 賬号。
5.在sql server 中 設定代理賬号,右擊執行個體屬性 安全性下的代理中填入 windows 賬号密碼
或者使用 sp_xp_cmdshell_proxy_account 設定代理賬号