如果对数据库进行 force logging 设定,但是对个别的 表、索引进行 nologging 操作,那么这个操作会是 nologging,还是 logging?

结果出乎意料,对个别的 object 的 nologging 操作,优先于数据库的设定。

SQL> conn u1/u1
Connected.
SQL> create table tab010 as select * from dba_objects;

Table created.

SQL> create index idx_obj on tab010(object_id);

Index created.

SQL> select index_name, logging from dba_indexes where index_name='IDX_OBJ';

INDEX_NAME
--------------------------------------------------------------------------------
LOG
---
IDX_OBJ
YES

SQL> alter index idx_obj rebuild nologging;

Index altered.

SQL> select index_name, logging from dba_indexes where index_name='IDX_OBJ';

INDEX_NAME
--------------------------------------------------------------------------------
LOG
---
IDX_OBJ
NO  <<<<<<< logging 字段变成了 no ,说明刚才的操作是 nologging。

SQL> 

 

相关文章:

  • 2021-06-05
  • 2021-09-18
  • 2021-11-03
  • 2021-11-09
  • 2021-12-03
  • 2021-06-19
  • 2022-02-28
猜你喜欢
  • 2022-12-23
  • 2022-02-22
  • 2022-12-23
  • 2021-08-31
  • 2022-02-08
  • 2021-08-15
  • 2021-07-25
相关资源
相似解决方案