Friday, September 13, 2013

Strage behavior on renaming an IOT table - oracle 11g - 11.2.0.2.0 "truncating (as requested) before column"

I have created a heap table,
then an IOT with CTAS from above table
and then altered the IOT to rename it.

as soon as i ran a select on dba_tables, i noticed the Truncating commands and was little scared.
Since the issue is not reproducible, didn't open any SR with Oracle and still wonder why that strange output was shown. If anybody noticed the similar behavior and got the reason, please let me know.


19:56:51 SQL> conn raj/***
Connected.
19:56:54 SQL> CREATE TABLE test123
19:56:55   2     ( asd    NUMBER(6)
19:56:55   3     , first_name     VARCHAR2(20)
19:56:55   4     , CONSTRAINT     test123_pk
19:56:55   5                      PRIMARY KEY (asd)
19:56:55   6     );

Table created.

Elapsed: 00:00:00.60

19:57:09 SQL> create table test321 (asd, first_name,
19:57:09   2  constraint new_pk
19:57:09   3  primary key (asd))
19:57:09   4  organization index
19:57:09   5  as select * from test123;

Table created.

Elapsed: 00:00:00.03
19:57:49 SQL>
19:57:54 SQL> alter table test321 rename to testraj;

Table altered.

Elapsed: 00:00:00.96
19:59:31 SQL> select * from dba_tables where table_name ='TESTRAJ';
truncating (as requested) before column MAX_TRANS

truncating (as requested) before column INITIAL_EXTENT

truncating (as requested) before column NEXT_EXTENT

truncating (as requested) before column MIN_EXTENTS

truncating (as requested) before column MAX_EXTENTS

truncating (as requested) before column PCT_INCREASE

truncating (as requested) before column FREELISTS

truncating (as requested) before column FREELIST_GROUPS

truncating (as requested) before column NUM_ROWS

truncating (as requested) before column BLOCKS

truncating (as requested) before column EMPTY_BLOCKS

truncating (as requested) before column AVG_SPACE

truncating (as requested) before column CHAIN_CNT

truncating (as requested) before column AVG_ROW_LEN

truncating (as requested) before column AVG_SPACE_FREELIST_BLOCKS

truncating (as requested) before column NUM_FREELIST_BLOCKS

rows will be truncated

rows will be truncated

rows will be truncated

rows will be truncated

rows will be truncated

rows will be truncated

rows will be truncated

rows will be truncated

rows will be truncated

rows will be truncated

rows will be truncated

rows will be truncated

rows will be truncated

rows will be truncated

rows will be truncated

rows will be truncated

rows will be truncated

rows will be truncated

rows will be truncated

rows will be truncated

rows will be truncated

rows will be truncated

rows will be truncated

rows will be truncated

rows will be truncated

rows will be truncated

rows will be truncated


OWNER      TABLE_NAME                     TABLESPACE_NAME CLUSTER_NAME                   IOT_NAME                       STATUS               PCT_FREE             PCT_USED            INI_TRANS LOG B D
---------- ------------------------------ --------------- ------------------------------ ------------------------------ -------- -------------------- -------------------- -------------------- --- - -
RAJ        TESTRAJ                                                                                                      VALID                       0                    0                    0     N

Elapsed: 00:00:00.36
20:00:25 SQL>

Tuesday, September 10, 2013

ORA-00600 when using EXPDP & IMPDP on a RAC Database.



When exporting a schema (with no data) using expdp, no issues were identified, but when using impdp with sqlfile, identified below ora 600 issue. Oracle called it out a bug and no patch yet. Hence, be little careful while using impdp on your prod systems. Btw, there was no impact to database because of the ora 600, but obviously the impdp failed. You can notice that when you start expdp or impdp, database does "alter system set services" introducing a sys related service "SYS$SYS.KUPC$Cxxxx.DBNAME"  as you can see in the below log file.

work around is to exec dbms_stats.gather_fixed_objects_stats();
but it doesn't help as the issue is reproducible.

used commands were:
expdp / directory = DATA_PUMP_DIR dumpfile="$i"_raj.dmp logfile="$i"_raj.log schemas="$i" content=metadata_only

impdp / irectory=DATA_PUMP_DIR dumpfile="$i"_raj.dmp sqlfile="$i"_raj.sql logfile="$i"_raj.log"

Error from Alert log file is:


streams_pool_size defaulting to 2867MB. Trying to get it from Buffer Cache for process 45416666.
2013-08-26 10:53:23.851000 -07:00
ALTER SYSTEM SET service_names='SRV_JOB','SRV_ORCL','ORCL','SYS$SYS.KUPC$C_4_20130826105315.ORCL' SCOPE=MEMORY SID='ORCL_4';
ALTER SYSTEM SET service_names='SYS$SYS.KUPC$C_4_20130826105315.ORCL','SRV_JOB','SRV_ORCL','ORCL','SYS$SYS.KUPC$S_4_20130826105315.ORCL' SCOPE=MEMORY SID='ORCL_4';
2013-08-26 10:53:25.284000 -07:00
DM00 started with pid=969, OS id=16842836, job OPS$ORACLE.SYS_EXPORT_SCHEMA_01
2013-08-26 10:53:30.374000 -07:00
DW00 started with pid=890, OS id=13370008, wid=1, job OPS$ORACLE.SYS_EXPORT_SCHEMA_01


Dumping diagnostic data in directory=[cdmp_20130826110944], requested by (instance=4, osid=61210982 (DM00)), summary=[incident=1207772].
2013-08-26 11:09:46.331000 -07:00
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.


Errors in file /u01/home/oracle/diag/rdbms/orcl_live1/ORCL_4/trace/ORCL_4_dm00_61210982.trc  (incident=1207772):
ORA-00600: internal error code, arguments: [15851], [4], [4], [1], [3], [], [], [], [], [], [], []
Incident details in: /u01/home/oracle/diag/rdbms/orcl_live1/ORCL_4/incident/incdir_1207772/ORCL_4_dm00_61210982_i1207772.trc
2013-08-26 11:02:07.749000 -07:00
Non critical error ORA-48913 caught while writing to trace file "/u01/home/oracle/diag/rdbms/orcl_live1/ORCL_4/incident/incdir_1207772/ORCL_4_dm00_61210982_i1207772.trc"
Error message: ORA-48913: Writing into trace file failed, file size limit [5242880] reached
Writing to the above trace file is disabled for now on...

Dumping diagnostic data in directory=[cdmp_20130826110944], requested by (instance=4, osid=61210982 (DM00)), summary=[incident=1207772].
2013-08-26 11:09:46.331000 -07:00
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.
Sweep [inc][1207772]: completed
Sweep [inc2][1207772]: completed
2013-08-26 11:09:48.495000 -07:00
ALTER SYSTEM SET service_names='SYS$SYS.KUPC$S_4_20130826105656.ORCL','SRV_JOB','SRV_ORCL','ORCL' SCOPE=MEMORY SID='ORCL_4';
ALTER SYSTEM SET service_names='SRV_JOB','SRV_ORCL','ORCL' SCOPE=MEMORY SID='ORCL_4';
Errors in file /u01/home/oracle/diag/rdbms/orcl_live1/ORCL_4/trace/ORCL_4_dm00_61210982.trc  (incident=1207773):
ORA-00600: internal error code, arguments: [15851], [4], [4], [1], [3], [], [], [], [], [], [], []
ORA-06512: at "SYS.KUPM$MCP", line 1040
ORA-06512: at line 2
Incident details in: /u01/home/oracle/diag/rdbms/orcl_live1/ORCL_4/incident/incdir_1207773/ORCL_4_dm00_61210982_i1207773.trc
2013-08-26 11:09:52.970000 -07:00
Non critical error ORA-48913 caught while writing to trace file "/u01/home/oracle/diag/rdbms/orcl_live1/ORCL_4/incident/incdir_1207773/ORCL_4_dm00_61210982_i1207773.trc"
Error message: ORA-48913: Writing into trace file failed, file size limit [5242880] reached
Writing to the above trace file is disabled for now on...
2013-08-26 11:09:54.553000 -07:00
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.
opidrv aborting process DM00 ospid (61210982) as a result of ORA-447
2013-08-26 11:10:10.618000 -07:00