开启xp_cmdshell

--打开xp_cmdshell

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

use ConfigDB
go
spb_netuse_ntqa @device='V'

xp_cmdshell 'dir V:'

原文地址:https://www.cnblogs.com/justdba/p/5505768.html