使用alter system set statistics_level = basic;的时候提示:
ORA-02097: 无法修改参数, 因为指定的值无效
ORA-00830: 启用自动优化 SGA 时无法将 statistics_level 设置为 BASIC请问高手是什么原因。查看了Oracle 10g的DBA手册,里面statistics_level有basic的选项的,为什么不行呢?

解决方案 »

  1.   

    SQL> alter system set statistics_level = basic scope=spfile;系统已更改。重启后就生效了
      

  2.   

    ORA-00830: cannot set statistics_level to BASIC with auto-tune SGA enabled 
    Cause: The user attempted to set statistics_level to BASIC with auto-tune SGA enabled which cannot be done because auto-tune SGA cannot work with statistics_level set to BASIC.
     
    Action: Disable auto-tune SGA and try setting the statistics_level to BASIC again. 
      

  3.   

    那如果scope=spfile重启后,SGA就不是自动调整了吗?
      

  4.   

    是的,使用自动调整需要STATISTICS_LEVEL为typical或all,并且sga_target设为0文档原文:
    Automatic Shared Memory Management simplifies the configuration of the SGA and is the recommended memory configuration. To use Automatic Shared Memory Management, set the SGA_TARGET initialization parameter to a nonzero value and set the STATISTICS_LEVEL initialization parameter to TYPICAL or ALL. 
      

  5.   

    上面打错了,应该是sga_target设为非0