原表是nologging,为什么create table.. as select还是有redo log产生?
2009-09-11 10:29
435 查看
原表是nologging,为什么create table.. as select还是有redo log产生?
数据库版本是9.0.2.1
原表是test,nologging属性. 然后运用create table..as select创建两个表。用logmnr分析日志,检查是否产生了日志.
一. 表创建操作:
SQL> create table test (f1 number(3), f2 number(3)) nologging;
表已创建。
SQL> insert into test select rownum,rownum from dba_objects where rownum<=999;
已创建999行。
SQL> commit;
提交完成。
SQL> create table test1 as select * from test;
表已创建。
SQL> create table test2 as select * from test nologging;
表已创建。
SQL> select table_name,logging from user_tables where table_name like 'TEST%';
TABLE_NAME LOG
------------------------------ ---
TEST NO
TEST1 YES
TEST2 YES
二.Logmnr分析redo log日志
SQL> connect / as sysdba;
已连接。
SQL> exec dbms_logmnr_d.build(dictionary_filename=>'logminer_dict.dat',dictionar
y_location=>'e:/oracle/log');
PL/SQL 过程已成功完成。
SQL> execute dbms_logmnr.add_logfile(options=>dbms_logmnr.new,logfilename=>'c:/r
edo03.log');
PL/SQL 过程已成功完成。
SQL> execute dbms_logmnr.start_logmnr(dictfilename=>'e:/oracle/log/logminer_dict
.dat');
PL/SQL 过程已成功完成。
SQL> select substr(sql_redo,1,27),count(*) from v$logmnr_contents where timestam
p>=to_date('20071225224000','YYYYMMDDHH24MISS') and sql_redo like 'insert into%'
group by substr(sql_redo,1,27);
SUBSTR(SQL_REDO,1,27) COUNT(*)
------------------------------------------------------ ----------
insert into "SCOTT"."TEST1" 999--产生了999条insert redo
insert into "SCOTT"."TEST2" 999--产生了999条insert redo
insert into "SYS"."OBJ$"("O 2
原表test是nologging的,为什么还会产生redo log呢?
将语句改为create table test2 nologging as select * from test之后就没有产生redo log.
数据库版本是9.0.2.1
原表是test,nologging属性. 然后运用create table..as select创建两个表。用logmnr分析日志,检查是否产生了日志.
一. 表创建操作:
SQL> create table test (f1 number(3), f2 number(3)) nologging;
表已创建。
SQL> insert into test select rownum,rownum from dba_objects where rownum<=999;
已创建999行。
SQL> commit;
提交完成。
SQL> create table test1 as select * from test;
表已创建。
SQL> create table test2 as select * from test nologging;
表已创建。
SQL> select table_name,logging from user_tables where table_name like 'TEST%';
TABLE_NAME LOG
------------------------------ ---
TEST NO
TEST1 YES
TEST2 YES
二.Logmnr分析redo log日志
SQL> connect / as sysdba;
已连接。
SQL> exec dbms_logmnr_d.build(dictionary_filename=>'logminer_dict.dat',dictionar
y_location=>'e:/oracle/log');
PL/SQL 过程已成功完成。
SQL> execute dbms_logmnr.add_logfile(options=>dbms_logmnr.new,logfilename=>'c:/r
edo03.log');
PL/SQL 过程已成功完成。
SQL> execute dbms_logmnr.start_logmnr(dictfilename=>'e:/oracle/log/logminer_dict
.dat');
PL/SQL 过程已成功完成。
SQL> select substr(sql_redo,1,27),count(*) from v$logmnr_contents where timestam
p>=to_date('20071225224000','YYYYMMDDHH24MISS') and sql_redo like 'insert into%'
group by substr(sql_redo,1,27);
SUBSTR(SQL_REDO,1,27) COUNT(*)
------------------------------------------------------ ----------
insert into "SCOTT"."TEST1" 999--产生了999条insert redo
insert into "SCOTT"."TEST2" 999--产生了999条insert redo
insert into "SYS"."OBJ$"("O 2
原表test是nologging的,为什么还会产生redo log呢?
将语句改为create table test2 nologging as select * from test之后就没有产生redo log.
相关文章推荐
- MySQL中表复制:create table like 与 create table as select
- select into table 和create table as
- hive-bug:create db.tablename as select .....
- ORACLE CTAS(create table as select)使用注意点
- 慎用create table as select,一定要注意默认值的问题
- 当create table as select 遇上大数据
- ORACLE CTAS(create table as select)使用注意点
- oracle create table xx as select ....CREATE TABLE XXX AS SELECT .... 拷贝表的时候 not null 约束 和check
- postgres create table as select & create table like
- 浅谈create table as select
- create table tb as select 和create table tb like的区别
- SELECT INTO , INSERT INTO SELECT 和 CREATE TABLE AS SELECT 性能对比
- MySql create table ... as select * from ..
- oracle create table as select
- Mysql create table tb as select 和create table tb like的区别
- sqlserver不能直接create table as select ......
- create table as select 和 create table 再insert into select 的差异
- Oracle Create Table as Select
- oracle create table a as select * from b
- 慎用create table as select,一定要注意默认值的问题