【翻译自mos文章】对于一个新建的db来说,对Dba_Feature_Usage_Statistics的查询返回零行

来源于:
No Rows Returned from Dba_Feature_Usage_Statistics For Newly Created Database (文档 ID 1943234.1)

适用于:
Oracle Database - Enterprise Edition - Version 10.2.0.1 and later
Information in this document applies to any platform.

症状:
在一个新建立的db中,Dba_Feature_Usage_Statistics没有rows

原因:
10g的输出
SQL> select *  from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
PL/SQL Release 10.2.0.5.0 - Production
CORE    10.2.0.5.0      Production
TNS for Linux: Version 10.2.0.5.0 - Production
NLSRTL Version 10.2.0.5.0 - Production


SQL> select count(*) from dba_feature_usage_statistics;
 COUNT(*)
----------
        0

11g 输出:
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
CORE    11.2.0.4.0      Production
TNS for Linux: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production


SQL> select count(*) from dba_feature_usage_statistics;


 COUNT(*)
----------
        0

12c的输出:
SQL> select * from v$version;


BANNER                                                                               CON_ID
-------------------------------------------------------------------------------- ----------
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production              0
PL/SQL Release 12.1.0.2.0 - Production                                                    0
CORE    12.1.0.2.0      Production                                                                0
TNS for Linux: Version 12.1.0.2.0 - Production                                            0
NLSRTL Version 12.1.0.2.0 - Production                                                    0




SQL> select count(*) from dba_feature_usage_statistics;


 COUNT(*)
----------
        0

解决方案:
这是预想的行为,可以查询sysl.wri$_dbu_usage_sample
SQL> select * from wri$_dbu_usage_sample;

     DBID VERSION           LAST_SAMPLE_DATE    LAST_SAMPLE_DATE_NUM LAST_SAMPLE_PERIOD TOTAL_SAMPLES SAMPLE_INTERVAL
---------- ----------------- ------------------- -------------------- ------------------ ------------- ---------------
2390668590 12.1.0.1.0        05/11/2014 05:31:29           1415165488                  0             1               604800

上面的SAMPLE_INTERVAL 返回 604800,这个604800是以秒为单位的,变为天数为7天。

你可能感兴趣的:(row,rows,selected,0,No)