------------------------------启用xp_cmdshell命令(SQL2005中默认不启动)--------------------------- -- To allow advanced options to be changed. EXEC sp_configure 'show advanced options', 1 GO -- To update the currently configured value for advanced options. RECONFIGURE GO -- To enable the feature. EXEC sp_configure 'xp_cmdshell', 1 GO -- To update the currently configured value for this feature. RECONFIGURE GO
这项我启动了,还是不行,大家帮看看原因 exec master..xp_cmdshell 'net use z: \\192.168.0.10\e$\test "密码" /user:192.168.0.10\administrator'然后使用映射的文件用Z:\TEST.TXT 昨天SQL2000还能映射,可以找到文件,执行相关命令,今天2000和2005都不能运行了
-- To allow advanced options to be changed.
EXEC sp_configure 'show advanced options', 1
GO
-- To update the currently configured value for advanced options.
RECONFIGURE
GO
-- To enable the feature.
EXEC sp_configure 'xp_cmdshell', 1
GO
-- To update the currently configured value for this feature.
RECONFIGURE
GO
exec master..xp_cmdshell 'net use z: \\192.168.0.10\e$\test "密码" /user:192.168.0.10\administrator'然后使用映射的文件用Z:\TEST.TXT
昨天SQL2000还能映射,可以找到文件,执行相关命令,今天2000和2005都不能运行了