为什么master..xp_cmdshell 'wmic cpu get *'在2000中可以,在2005中没有结果呢?
是不是有哪里需要设置的呀?

解决方案 »

  1.   

    /*
    output
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    請稍候,正在安裝 WMIC。AddressWidth  Architecture  Availability  Caption                            ConfigManagerErrorCode  ConfigManagerUserConfig  CpuStatus  CreationClassName  CurrentClockSpeed  CurrentVoltage  DataWidth  Description                   
         DeviceID  ErrorCleared  ErrorDescription  ExtClock  Family  InstallDate  L2CacheSize  L2CacheSpeed  LastErrorCode  Level  LoadPercentage  Manufacturer  MaxClockSpeed  Name                                             OtherFamilyDescription  PNPDeviceI
    D  PowerManagementCapabilities  PowerManagementSupported  ProcessorId       ProcessorType  Revision  Role  SocketDesignation  Status  StatusInfo  Stepping  SystemCreationClassName  SystemName  UniqueId  UpgradeMethod  Version           VoltageCaps  32            0             3             x86 Family 6 Model 15 Stepping 13                                                   1          Win32_Processor    1599               20              32         x86 Family 6 Model 15 Stepping 13  CPU0              
                            200       2                    1024                                      6      6               GenuineIntel  1599           Intel(R) Pentium(R) Dual  CPU  E2140  @ 1.60GHz                                                           
             FALSE                     BFEBFBFF000006FD  3              3853      CPU   Socket 775         OK      3           13        Win32_ComputerSystem     GOLD-MIS06            4              型號 15,步驟 13               32            0             3             x86 Family 6 Model 15 Stepping 13                                                   1          Win32_Processor    1599               20              32         x86 Family 6 Model 15 Stepping 13  CPU1              
                            200       2                    1024                                      6      2               GenuineIntel  1599           Intel(R) Pentium(R) Dual  CPU  E2140  @ 1.60GHz                                                           
             FALSE                     BFEBFBFF000006FD  3              3853      CPU   Socket 775         OK      3           13        Win32_ComputerSystem     GOLD-MIS06            4              型號 15,步驟 13               NULL(11 個資料列受到影響)
    */
      

  2.   

    --开启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
      

  3.   

    用了下面语句:
    EXEC sp_configure 'show advanced options', 1;RECONFIGURE;EXEC sp_configure 'xp_cmdshell', 1;RECONFIGURE;-- dbcc addextendedproc("xp_cmdshell","xplog70.dll")  
      

  4.   

     还有问题:
    分析Mof文件:C:\WINDOWS\system32\wbem\Cli.mof(阶段错误-3)
    计算机返回错误 0x80041001
    NULL有没有哪位知道的.
      

  5.   

    先直接在cmd里面执行wmic cpu get *看看好使不
      

  6.   

    可能是 cim 存储库(cli.mof)被损坏,需要重建存储库。可以参考以下链接,
    http://www.microsoft.com/china/technet/community/scriptcenter/resources/wmifaq.mspx#EFH