导出TXT文件:EXEC master..xp_cmdshell 'bcp "select * from HANSUI.dbo.SRB在庫マスタ" queryout "F:\share\test_jwj\tt.txt" -c -S"172.16.1.1" -U"sa" -P"1qazXSW@"' sp_configure 是修改系统配置的存储过程 当设置 show advanced options 参数为 1 时,才允许修改系统配置中的某些高级选相 EXEC sp_configure 'show advanced options',1; RECONFIGURE; 恢复xp_cmdshell 命令 EXEC sp_configure 'xp_cmdshell',1;RECONFIGURE;