如題目的問題exec xp_cmdshell 'dir c:\'SQL Server 已封鎖元件 'xp_cmdshell' 的 程序 'sys.xp_cmdshell' 之存取,因為此元件已經由此伺服器的安全性組態關閉。系統管理員可以使用 sp_configure 來啟用 'xp_cmdshell' 的使用。如需有關啟用 'xp_cmdshell' 的詳細資訊,請參閱《SQL Server 線上叢書》中的<介面區組態>(Surface Area Configuration)。sp_configure 'show advanced options', 1
reconfigure
exec sp_configure 'xp_cmdshell', 1
reconfigure設定選項 'xp_cmdshell' 不存在,或可能是一個進階選項。網上查詢解決辦法sp_dropextendedproc 'xp_cmdshell'
執行OK
sp_addextendedproc 'xp_cmdshell', 'xpsql70.dll'
執行OK
use master
select * from
dbo.sysobjects where id = object_id(N'[dbo].[xp_cmdshell]')
name                                                                                                                             id          xtype uid    info   status      base_schema_ver replinfo    parent_obj  crdate                  ftcatid schema_ver  stats_schema_ver type userstat sysstat indexdel refdate                 version     deltrig     instrig     updtrig     seltrig     category    cache
-------------------------------------------------------------------------------------------------------------------------------- ----------- ----- ------ ------ ----------- --------------- ----------- ----------- ----------------------- ------- ----------- ---------------- ---- -------- ------- -------- ----------------------- ----------- ----------- ----------- ----------- ----------- ----------- ------
xp_cmdshell                                                                                                                      -1008137134 X     4      0      0           0               0           0           2005-10-14 01:40:57.297 0       0           0                X    0        4       0        2005-10-14 01:40:57.297 0           0           0           0           0           2           0
問題依舊,,,
哪為大大help一下

解决方案 »

  1.   

    sp_configure 'show advanced options', 1 
    reconfigure 
    exec sp_configure 'xp_cmdshell', 1 
    reconfigure 
    这样了还不行?
      

  2.   

    我的題目就是
    exec sp_configure 'xp_cmdshell', 1 
    這個頗語句報的錯訊息 15123,層級 16,狀態 1,程序 sp_configure,行 51
    設定選項 'xp_cmdshell' 不存在,或可能是一個進階選項。
      

  3.   

    是啊,,,所以噁心,,,
    確定高級配置已打開
    sp_configure 'show advanced options', 1
    組態選項 'show advanced options' 從 1 變更為 1。請執行 RECONFIGURE 陳述式來安裝。
      

  4.   

    --开启xp_cmdshell
    --SQL Server blocked access to procedure 'xp_cmdshell'
    sp_configure 'show advanced options', 1
    go
    reconfigure
    go
    sp_configure 'xp_cmdshell', 1
    go
    reconfigure
    go--开启sp_OACreate
    --SQL Server blocked access to procedure 'sys.sp_OACreate'
    sp_configure 'show advanced options', 1;
    go
    reconfigure;
    go
    sp_configure 'ole automation procedures', 1;
    go
    reconfigure;
    go
    sp_configure 'Ad Hoc Distributed Queries',1;
    go
    reconfigure
    go
      

  5.   

    哦找到問題了,,,
    奶奶的我失誤了
    sp_configure 'show advanced options', 1
    go
    reconfigure  WITH OVERRIDE之前不加 WITH OVERRIDE都能用,,,這次就必須加樂,,,
      

  6.   

    http://social.technet.microsoft.com/Forums/ru-RU/sqlservermanagementzhcht/thread/36ac2be6-4595-4639-b6be-101568f61068参考下MSDN上的,你是以什么身份进去的
      

  7.   


    SQL Server 2005 中引入的 xp_cmdshell 选项是服务器配置选项,使系统管理员能够控制是否可以在系统上执行 xp_cmdshell 扩展存储过程。默认情况下,xp_cmdshell 选项在新安装的软件上处于禁用状态,但是可以通过使用外围应用配置器工具或运行 sp_configure 系统存储过程来启用它,如下面的代码示例所示:
    -- 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--具体的可以查看一下SQL SERVER的帮助文档