oracle怎样对表监控修改,Oracle对表的监控

Oracle10g前对表进行监控,必须要发出监控指令。

SQL> select * from v$version;

BANNER

----------------------------------------------------------------

Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production

PL/SQL Release 9.2.0.1.0 - Production

CORE 9.2.0.1.0 Production

TNS for 32-bit Windows: Version 9.2.0.1.0 - Production

NLSRTL Version 9.2.0.1.0 - Production

SQL> create table t_blob (b blob);

Table created

SQL> select monitoring from user_tables where table_name=upper('t_blob');

MONITORING

----------

NO

SQL> alter table t_blob monitoring;

Table altered

SQL> select monitoring from user_tables where table_name=upper('t_blob');

MONITORING

----------

YES

SQL> insert into t_blob values(utl_raw.cast_to_raw('denglt'));

1 row inserted

SQL> commit;

Commit complete

SQL> insert into t_blob values(utl_raw.cast_to_raw('denglt'));

1 row inserted

SQL> commit;

Commit complete

SQL> select *from  user_tab_modifications where table_name='T_BLOB';

TABLE_NAME                     PARTITION_NAME                 SUBPARTITION_NAME                 INSERTS    UPDATES    DELETES TIMESTAMP   TRUNCATED

------------------------------ ------------------------------ ------------------------------ ---------- ---------- ---------- ----------- ---------

SQL>

SQL> begin

2    dbms_stats.FLUSH_DATABASE_MONITORING_INFO();

3  end;

4  /

PL/SQL procedure successfully completed

SQL> select *from  user_tab_modifications where table_name='T_BLOB';

TABLE_NAME                     PARTITION_NAME                 SUBPARTITION_NAME                 INSERTS    UPDATES    DELETES TIMESTAMP   TRUNCATED

------------------------------ ------------------------------ ------------------------------ ---------- ---------- ---------- ----------- ---------

T_BLOB                                                                                                1          0          0 2010/11/15  NO

SQL>

10g的情况:

SQL>  select * from v$version;

BANNER

----------------------------------------------------------------

Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi

PL/SQL Release 10.2.0.4.0 - Production

CORE 10.2.0.4.0 Production

TNS for 64-bit Windows: Version 10.2.0.4.0 - Production

NLSRTL Version 10.2.0.4.0 - Production

SQL> create table t_blob (b blob);

create table t_blob (b blob)

ORA-00955: 名称已由现有对象使用

SQL> drop table t_blob;

Table dropped

SQL> create table t_blob (b blob);

Table created

SQL> select monitoring from user_tables where table_name=upper('t_blob');

MONITORING

----------

YES      --表建立好后,默认就是监控的.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值