A lot of enhancements has been done in Oracle 12.2 Release. In this article We will explain the new features of datapump utility in oracle 12.2 Release.
1.Parfile content written to logfile:
Till now, log file of expdp or impdp, doesn’t store the content of parfile, The log file used to look as below.
Export: Release 12.1.0.2.0 - Production on Tue Feb 21 11:50:56 2017 Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved. ;;; Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options Starting "SYS"."SYS_EXPORT_FULL_01": /******** AS SYSDBA parfile=expdp_full.par Estimate in progress using BLOCKS method... Processing object type DATABASE_EXPORT/EARLY_OPTIONS/VIEWS_AS_TABLES/TABLE_DATA Processing object type DATABASE_EXPORT/NORMAL_OPTIONS/TABLE_DATA Processing object type DATABASE_EXPORT/NORMAL_OPTIONS/VIEWS_AS_TABLES/TABLE_DATA
So if the parfile is missing, From the logfile, we can’t find the details about the expdp/impdp.
With Oracle 12.2, The content of the parfile is written to logfile.
--- PARFILE CONTENT $cat expdp_full.par dumpfile=test_schema.dmp logfile=test.log directory=TEST2 schemas=BSSTDBA -- RUN EXPDP expdp parfile=expdp_full.par Export: Release 12.2.0.1.0 - Production on Tue Feb 21 10:58:39 2017 Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved. Username: / as sysdba Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production Starting "SYS"."SYS_EXPORT_SCHEMA_01": /******** AS SYSDBA parfile=expdp_full.par Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS Processing object type SCHEMA_EXPORT/STATISTICS/MARKER --- LOGFILE CONTENT oracle@bttstdev64:~/TEST$ cat test.log ;;; Export: Release 12.2.0.1.0 - Production on Tue Feb 21 10:58:39 2017 Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved. ;;; Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production ;;; ************************************************************************** ;;; Parfile values: ;;; parfile: schemas=BSSTDBA ;;; parfile: directory=TEST2 ;;; parfile: logfile=test.log ;;; parfile: dumpfile=test_schema.dmp ;;; ************************************************************************** Starting "SYS"."SYS_EXPORT_SCHEMA_01": /******** AS SYSDBA parfile=expdp_full.par Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
We can see that the parfile has been printed in the logfile. So no need to worry, if the parfile is missing 🙂
2. Parallel operation for metadata during expdp/impdp:
Till Oracle 12cR1, parallel operation doesnt work for expdp/impdp of metadatas. Even if we use more parallel option, it will take always 1 thread.
Lets try to both the 12cR1 and 12cR2 .
12CR1:
-- PARFILE CONTENT dumpfile=test_%U.dmp logfile=test.log directory=TEST2 parallel=4 content=metadata_only full=y -- RUN EXPDP # expdp parfile=expdp_full.par Export: Release 12.1.0.2.0 - Production on Tue Feb 21 11:50:56 2017 Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved. Username: / as sysdba Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options Starting "SYS"."SYS_EXPORT_FULL_01": /******** AS SYSDBA parfile=expdp_full.par Estimate in progress using BLOCKS method... Processing object type DATABASE_EXPORT/EARLY_OPTIONS/VIEWS_AS_TABLES/TABLE_DATA Processing object type DATABASE_EXPORT/NORMAL_OPTIONS/TABLE_DATA Processing object type DATABASE_EXPORT/NORMAL_OPTIONS/VIEWS_AS_TABLES/TABLE_DATA ^C Export> status Job: SYS_EXPORT_FULL_01 Operation: EXPORT Mode: FULL State: EXECUTING Bytes Processed: 0 Current Parallelism: 4 Job Error Count: 0 Dump File: /export/home/oracle/test_01.dmp bytes written: 4,096 Dump File: /export/home/oracle/test_%u.dmp Worker 1 Status: Instance ID: 1 Instance name: OMDEVBAU Host name: sec60-1 Process Name: DW00 State: EXECUTING Object Schema: WMSYS Object Name: WM$EXP_MAP Object Type: DATABASE_EXPORT/NORMAL_OPTIONS/VIEWS_AS_TABLES/TABLE_DATA Completed Objects: 10 Worker Parallelism: 1
So in Oracle 12cR1, Despite giving parallel=4 , Only one worker process was allocated.
Lets try the same Oracle 12cR2(12.2)
12CR2:
dumpfile=test_%U.dmp logfile=test.log directory=TEST2 parallel=4 content=metadata_only full=y $ expdp parfile=expdp_full.par Export: Release 12.2.0.1.0 - Production on Tue Feb 21 10:53:46 2017 Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved. Username: / as sysdba Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production Starting "SYS"."SYS_EXPORT_FULL_01": /******** AS SYSDBA parfile=expdp_full.par Export> status Job: SYS_EXPORT_FULL_01 Operation: EXPORT Mode: FULL State: EXECUTING Bytes Processed: 0 Current Parallelism: 4 Job Error Count: 0 Job heartbeat: 1 Dump File: /export/home/oracle/TEST/test_%u.dmp Dump File: /export/home/oracle/TEST/test_01.dmp bytes written: 32,768 Dump File: /export/home/oracle/TEST/test_02.dmp bytes written: 20,480 Dump File: /export/home/oracle/TEST/test_03.dmp bytes written: 49,152 Dump File: /export/home/oracle/TEST/test_04.dmp bytes written: 20,480 Worker 1 Status: Instance ID: 1 Instance name: DB12C Host name: bttstdev64 Object start time: Tuesday, 21 February, 2017 10:54:29 Object status at: Tuesday, 21 February, 2017 10:54:56 Process Name: DW00 State: EXECUTING Worker 2 Status: Instance ID: 1 Instance name: DB12C Host name: bttstdev64 Object start time: Tuesday, 21 February, 2017 10:55:04 Object status at: Tuesday, 21 February, 2017 10:55:07 Process Name: DW01 State: EXECUTING Worker 3 Status: Instance ID: 1 Instance name: DB12C Host name: bttstdev64 Object start time: Tuesday, 21 February, 2017 10:55:05 Object status at: Tuesday, 21 February, 2017 10:55:07 Process Name: DW02 State: EXECUTING Worker 4 Status: Instance ID: 1 Instance name: DB12C Host name: bttstdev64 Object start time: Tuesday, 21 February, 2017 10:54:23 Object status at: Tuesday, 21 February, 2017 10:54:24 Process Name: DW03 State: EXECUTING
So here we used parallel=4, and 4 worker processes were created. Which is a very important enhancement in term metadata expdp performance.
3. New substitution variable for DUMPFILE parameter
Now new substitution variable like %D,%M,%T etc is available for DUMPFILE parameter, which we use to suffix or prefix the timestamp in the dumpfile.
expdp dumpfile=test_schema_%T.dmp logfile=test.log directory=TEST2 schemas=BSSTDBA -- GENERATED DUMPFILE -rw-r----- 1 oracle oinstall 12288 Feb 21 12:20 test_schema_20170221.dmp
Other available variables:
DUMPFILE FORMAT | DUMPFILE OUTPUT | EXAMPLE |
%y, %Y | Specifies the year in this format: YYYY. | dumpfile=test_schema_%Y.dmp -> test_schema_2017.dmp |
%d, %D | Specifies current date in DD | dumpfile=test_schema_%D.dmp -> test_schema_21.dmp |
%m, %M | Specifies current month in MM | dumpfile=test_schema_%M.dmp -> test_schema_02.dmp |
%t, %T | Specifies the current date with YYYYMMDD | dumpfile=test_schema_%T.dmp -> test_schema_20170221.dmp |
%l, %L | Specifies a system-generated unique file name | dumpfile=test_schema_%L.dmp -> test_schema_01.dmp |
Apart from above, there are few more features in datapump, Which we will discuss soon.
4. Import LONG column using NETWORK_LINK
Till Now, we are not able to import table with LONG column using NETWORK_LINK. It throws below error during impdp.
ORA-00997: illegal use of LONG datatype error
But with 12cR2, we can import LONG column through NETWORK_LINK.
One question.
while am doing import to pluggable database(12.2.0.1) – if you see con_id is showing 0. Only two session are showing con_id=3. (my understanding is all session should show con_id=3 but i do not know why its showing con_id=0 )?
remaing sessions are pointing to con_id=0. (is this behaviour observed ?)
impdp system/********@elcmuat parfile=import_elcmdev_01.par
note: elcmuat is pluggable database name & service.
SQL> select inst_id,username,sid,SERIAL#,CON_ID,event,sql_id,last_call_et,SADDR from gv$session where SADDR in (select SADDR from dba_datapump_sessions);
INST_ID USERNAME SID SERIAL# CON_ID EVENT SQL_ID LAST_CALL_ET SADDR
———- ———– ———- ———- ———- ——————————————– ————- ———— —————-
2 SYSTEM 882 38143 3 SQL*Net message from client 815 070001002733FD80
1 SYSTEM 19 36569 0 library cache lock 3wx282gc3w4b8 1426 070001002894A868
1 SYSTEM 128 58675 3 wait for unread message on broadcast channel 7wn3wubg7gjds 345 0700010028A8F190
1 SYSTEM 144 56043 0 library cache lock 2nwhuwm06z265 1216 0700010028A69310
1 SYSTEM 261 26375 0 library cache lock 13y3p6qu9bmrj 1185 0700010028B9ACF8
1 SYSTEM 384 5920 3 wait for unread message on broadcast channel bjf05cwcj5s6p 37165 0700010028CBE370
1 SYSTEM 389 19648 0 library cache lock g44c7jts82qdf 1906 0700010028CB25E8
1 SYSTEM 636 16713 0 library cache lock bhmah1pmd3vps 1305 0700010028EF6CF0
1 SYSTEM 760 46395 0 library cache lock 1y967qaz0fvcz 1426 070001002721A120
1 SYSTEM 874 295 0 library cache lock 68d951gfnwb2x 1336 0700010027352CC0
1 SYSTEM 878 14966 0 library cache lock 65s2gyjprsvt6 1576 0700010027349520
12 rows selected.
SQL>
SQL> select * from dba_datapump_sessions;
OWNER_NAME JOB_NAME INST_ID SADDR SESSION_TYPE
———————- ———————- ———- —————- ————–
SYSTEM SYS_IMPORT_FULL_02 2 070001002733FD80 DBMS_DATAPUMP
SYSTEM SYS_IMPORT_FULL_02 1 0700010028A8F190 DBMS_DATAPUMP
SYSTEM SYS_IMPORT_FULL_02 1 0700010028CBE370 MASTER
SYSTEM SYS_IMPORT_FULL_02 1 0700010027352CC0 WORKER
SYSTEM SYS_IMPORT_FULL_02 1 070001002894A868 WORKER
SYSTEM SYS_IMPORT_FULL_02 1 070001002721A120 WORKER
SYSTEM SYS_IMPORT_FULL_02 1 0700010027349520 WORKER
SYSTEM SYS_IMPORT_FULL_02 1 0700010028CB25E8 WORKER
SYSTEM SYS_IMPORT_FULL_02 1 0700010028B9ACF8 WORKER
SYSTEM SYS_IMPORT_FULL_02 1 0700010028EF6CF0 WORKER
SYSTEM SYS_IMPORT_FULL_02 1 0700010028A69310 WORKER
11 rows selected.
Dear Yusuf,
CON_ID –> 0 indicates the data pertains to the entire CDB, i.e for the complete container database. So while importing it need to update the metadata also at the container level. so it is creating session for both CON_ID=0 and CON_ID=3(ur PDB).
Diff CON_ID values:
CON_ID – 0 = The data pertains to the entire CDB, i.e for complete database.
CON_ID – 1= The data pertains to the root container (CDB$ROOT)
CON_ID – 2= The data pertains to the seed ( PDB$SEED)
CON_ID – 3 onwards = The data pertains to a PDB, Each PDB has its own container ID.(PDB1,PDB2 etc)
Regards
DBACLASS Admin
Dear ADMIN,
I have a Question.
While doing EXPDP , despite using parallel as 4 , sometimes I can see more than 4 files are generated – WHY SO ?
Is there a default filesize ? Even while not specifying filesize option in EXPDP.
Still I am able to see dump files count does NOT equates parallel .
DB Version :11204
Thanks