[Oracle 工程师手记] nologging 操作的优先级
如果对数据库进行 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>