Views

Wednesday, November 2, 2016

Oracle - Datapump LOGTIME feature

Datapump added a much needed new parameter LOGTIME in Oracle 12C

LOGTIME keeps track of timing datapump is consuming in each step and display the timestamp in output.
logtime takes 4 values : NONE | STATUS | LOGFILE | ALL
This parameter is valid for both expdp as well as impdp.

LOGTIME=STATUS (timestamp is displayed on console output but not in datapump logfile.

[oracle@testing dpdump]$ expdp system schemas=AJ directory=data_pump_dir dumpfile=expdp_aj.dmp logfile=expdp_aj.log logtime=status

Export: Release 12.1.0.2.0 - Production on Wed Nov 2 01:16:34 2016

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.
Password:

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
02-NOV-16 01:16:53.099: Starting "SYSTEM"."SYS_EXPORT_SCHEMA_01":  system/******** schemas=AJ directory=data_pump_dir dumpfile=expdp_aj.dmp logfile=expdp_aj.log logtime=status
02-NOV-16 01:16:54.839: Estimate in progress using BLOCKS method...
02-NOV-16 01:17:02.399: Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
02-NOV-16 01:17:02.642: Total estimation using BLOCKS method: 640 KB
02-NOV-16 01:17:03.184: Processing object type SCHEMA_EXPORT/USER
02-NOV-16 01:17:03.672: Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
02-NOV-16 01:17:03.710: Processing object type SCHEMA_EXPORT/ROLE_GRANT
02-NOV-16 01:17:03.728: Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
02-NOV-16 01:17:05.822: Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
02-NOV-16 01:17:39.353: Processing object type SCHEMA_EXPORT/TABLE/TABLE
02-NOV-16 01:17:41.838: Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE
02-NOV-16 01:17:42.243: Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
02-NOV-16 01:18:00.082: . . exported "AJ"."TABLE1"                               6.773 KB       1 rows
02-NOV-16 01:18:00.240: . . exported "AJ"."TABLE10"                              6.773 KB       1 rows
02-NOV-16 01:18:00.267: . . exported "AJ"."TABLE2"                               6.773 KB       1 rows
02-NOV-16 01:18:00.303: . . exported "AJ"."TABLE3"                               6.773 KB       1 rows
02-NOV-16 01:18:00.330: . . exported "AJ"."TABLE4"                               6.773 KB       1 rows
02-NOV-16 01:18:00.358: . . exported "AJ"."TABLE5"                               6.773 KB       1 rows
02-NOV-16 01:18:00.388: . . exported "AJ"."TABLE6"                               6.773 KB       1 rows
02-NOV-16 01:18:00.417: . . exported "AJ"."TABLE7"                               6.773 KB       1 rows
02-NOV-16 01:18:00.445: . . exported "AJ"."TABLE8"                               6.773 KB       1 rows
02-NOV-16 01:18:00.475: . . exported "AJ"."TABLE9"                               6.773 KB       1 rows
02-NOV-16 01:18:02.806: Master table "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
02-NOV-16 01:18:02.830: ******************************************************************************
02-NOV-16 01:18:02.830: Dump file set for SYSTEM.SYS_EXPORT_SCHEMA_01 is:
02-NOV-16 01:18:02.835:   /u02/app/oracle/admin/LONDON/dpdump/expdp_aj.dmp
02-NOV-16 01:18:02.858: Job "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully completed at Wed Nov 2 01:18:02 2016 elapsed 0 00:01:14

Export logfile (LOGTIME=STATUS)

[oracle@testing dpdump]$ cat expdp_aj.log
;;;
Export: Release 12.1.0.2.0 - Production on Wed Nov 2 01:16:34 2016

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 "SYSTEM"."SYS_EXPORT_SCHEMA_01":  system/******** schemas=AJ directory=data_pump_dir dumpfile=expdp_aj.dmp logfile=expdp_aj.log logtime=status
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 640 KB
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE
Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
. . exported "AJ"."TABLE1"                               6.773 KB       1 rows
. . exported "AJ"."TABLE10"                              6.773 KB       1 rows
. . exported "AJ"."TABLE2"                               6.773 KB       1 rows
. . exported "AJ"."TABLE3"                               6.773 KB       1 rows
. . exported "AJ"."TABLE4"                               6.773 KB       1 rows
. . exported "AJ"."TABLE5"                               6.773 KB       1 rows
. . exported "AJ"."TABLE6"                               6.773 KB       1 rows
. . exported "AJ"."TABLE7"                               6.773 KB       1 rows
. . exported "AJ"."TABLE8"                               6.773 KB       1 rows
. . exported "AJ"."TABLE9"                               6.773 KB       1 rows
Master table "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SYSTEM.SYS_EXPORT_SCHEMA_01 is:
  /u02/app/oracle/admin/LONDON/dpdump/expdp_aj.dmp
Job "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully completed at Wed Nov 2 01:18:02 2016 elapsed 0 00:01:14

LOGTIME=LOGFILE (timestamp is displayed in datapump logfile but not on console output.

[oracle@testing dpdump]$ expdp system schemas=AJ directory=data_pump_dir dumpfile=expdp_aj.dmp logfile=expdp_aj.log logtime=LOGFILE

Export: Release 12.1.0.2.0 - Production on Wed Nov 2 01:20:37 2016

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.
Password:

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 "SYSTEM"."SYS_EXPORT_SCHEMA_01":  system/******** schemas=AJ directory=data_pump_dir dumpfile=expdp_aj.dmp logfile=expdp_aj.log logtime=LOGFILE
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 640 KB
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE
Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
. . exported "AJ"."TABLE1"                               6.773 KB       1 rows
. . exported "AJ"."TABLE10"                              6.773 KB       1 rows
. . exported "AJ"."TABLE2"                               6.773 KB       1 rows
. . exported "AJ"."TABLE3"                               6.773 KB       1 rows
. . exported "AJ"."TABLE4"                               6.773 KB       1 rows
. . exported "AJ"."TABLE5"                               6.773 KB       1 rows
. . exported "AJ"."TABLE6"                               6.773 KB       1 rows
. . exported "AJ"."TABLE7"                               6.773 KB       1 rows
. . exported "AJ"."TABLE8"                               6.773 KB       1 rows
. . exported "AJ"."TABLE9"                               6.773 KB       1 rows
Master table "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SYSTEM.SYS_EXPORT_SCHEMA_01 is:
  /u02/app/oracle/admin/LONDON/dpdump/expdp_aj.dmp
Job "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully completed at Wed Nov 2 01:21:01 2016 elapsed 0 00:00:19

Export logfile (LOGTIME=LOGFILE)

[oracle@testing dpdump]$ cat expdp_aj.log
;;;
Export: Release 12.1.0.2.0 - Production on Wed Nov 2 01:20:37 2016

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
02-NOV-16 01:20:43.694: Starting "SYSTEM"."SYS_EXPORT_SCHEMA_01":  system/******** schemas=AJ directory=data_pump_dir dumpfile=expdp_aj.dmp logfile=expdp_aj.log logtime=LOGFILE
02-NOV-16 01:20:44.557: Estimate in progress using BLOCKS method...
02-NOV-16 01:20:45.869: Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
02-NOV-16 01:20:45.938: Total estimation using BLOCKS method: 640 KB
02-NOV-16 01:20:46.179: Processing object type SCHEMA_EXPORT/USER
02-NOV-16 01:20:46.358: Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
02-NOV-16 01:20:46.374: Processing object type SCHEMA_EXPORT/ROLE_GRANT
02-NOV-16 01:20:46.396: Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
02-NOV-16 01:20:46.779: Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
02-NOV-16 01:20:56.462: Processing object type SCHEMA_EXPORT/TABLE/TABLE
02-NOV-16 01:20:57.242: Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE
02-NOV-16 01:20:57.391: Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
02-NOV-16 01:21:00.297: . . exported "AJ"."TABLE1"                               6.773 KB       1 rows
02-NOV-16 01:21:00.441: . . exported "AJ"."TABLE10"                              6.773 KB       1 rows
02-NOV-16 01:21:00.469: . . exported "AJ"."TABLE2"                               6.773 KB       1 rows
02-NOV-16 01:21:00.499: . . exported "AJ"."TABLE3"                               6.773 KB       1 rows
02-NOV-16 01:21:00.537: . . exported "AJ"."TABLE4"                               6.773 KB       1 rows
02-NOV-16 01:21:00.567: . . exported "AJ"."TABLE5"                               6.773 KB       1 rows
02-NOV-16 01:21:00.596: . . exported "AJ"."TABLE6"                               6.773 KB       1 rows
02-NOV-16 01:21:00.623: . . exported "AJ"."TABLE7"                               6.773 KB       1 rows
02-NOV-16 01:21:00.652: . . exported "AJ"."TABLE8"                               6.773 KB       1 rows
02-NOV-16 01:21:00.677: . . exported "AJ"."TABLE9"                               6.773 KB       1 rows
02-NOV-16 01:21:01.633: Master table "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
02-NOV-16 01:21:01.656: ******************************************************************************
02-NOV-16 01:21:01.657: Dump file set for SYSTEM.SYS_EXPORT_SCHEMA_01 is:
02-NOV-16 01:21:01.662:   /u02/app/oracle/admin/LONDON/dpdump/expdp_aj.dmp
02-NOV-16 01:21:01.668: Job "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully completed at Wed Nov 2 01:21:01 2016 elapsed 0 00:00:19

LOGTIME=ALL (timestamp is displayed both in datapump logfile as well as console output)

[oracle@testing dpdump]$ expdp system schemas=AJ directory=data_pump_dir dumpfile=expdp_aj.dmp logfile=expdp_aj.log logtime=ALL

Export: Release 12.1.0.2.0 - Production on Wed Nov 2 01:22:13 2016

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.
Password:

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
02-NOV-16 01:22:19.560: Starting "SYSTEM"."SYS_EXPORT_SCHEMA_01":  system/******** schemas=AJ directory=data_pump_dir dumpfile=expdp_aj.dmp logfile=expdp_aj.log logtime=ALL
02-NOV-16 01:22:20.664: Estimate in progress using BLOCKS method...
02-NOV-16 01:22:22.068: Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
02-NOV-16 01:22:22.141: Total estimation using BLOCKS method: 640 KB
02-NOV-16 01:22:22.397: Processing object type SCHEMA_EXPORT/USER
02-NOV-16 01:22:22.543: Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
02-NOV-16 01:22:22.559: Processing object type SCHEMA_EXPORT/ROLE_GRANT
02-NOV-16 01:22:22.580: Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
02-NOV-16 01:22:22.980: Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
02-NOV-16 01:22:32.876: Processing object type SCHEMA_EXPORT/TABLE/TABLE
02-NOV-16 01:22:33.623: Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE
02-NOV-16 01:22:33.739: Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
02-NOV-16 01:22:36.690: . . exported "AJ"."TABLE1"                               6.773 KB       1 rows
02-NOV-16 01:22:36.830: . . exported "AJ"."TABLE10"                              6.773 KB       1 rows
02-NOV-16 01:22:36.858: . . exported "AJ"."TABLE2"                               6.773 KB       1 rows
02-NOV-16 01:22:36.886: . . exported "AJ"."TABLE3"                               6.773 KB       1 rows
02-NOV-16 01:22:36.915: . . exported "AJ"."TABLE4"                               6.773 KB       1 rows
02-NOV-16 01:22:36.944: . . exported "AJ"."TABLE5"                               6.773 KB       1 rows
02-NOV-16 01:22:36.973: . . exported "AJ"."TABLE6"                               6.773 KB       1 rows
02-NOV-16 01:22:37.002: . . exported "AJ"."TABLE7"                               6.773 KB       1 rows
02-NOV-16 01:22:37.030: . . exported "AJ"."TABLE8"                               6.773 KB       1 rows
02-NOV-16 01:22:37.058: . . exported "AJ"."TABLE9"                               6.773 KB       1 rows
02-NOV-16 01:22:38.076: Master table "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
02-NOV-16 01:22:38.115: ******************************************************************************
02-NOV-16 01:22:38.116: Dump file set for SYSTEM.SYS_EXPORT_SCHEMA_01 is:
02-NOV-16 01:22:38.120:   /u02/app/oracle/admin/LONDON/dpdump/expdp_aj.dmp
02-NOV-16 01:22:38.129: Job "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully completed at Wed Nov 2 01:22:38 2016 elapsed 0 00:00:20

Export logfile (LOGTIME=ALL)

[oracle@testing dpdump]$ cat expdp_aj.log
;;;
Export: Release 12.1.0.2.0 - Production on Wed Nov 2 01:22:13 2016

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
02-NOV-16 01:22:19.560: Starting "SYSTEM"."SYS_EXPORT_SCHEMA_01":  system/******** schemas=AJ directory=data_pump_dir dumpfile=expdp_aj.dmp logfile=expdp_aj.log logtime=ALL
02-NOV-16 01:22:20.664: Estimate in progress using BLOCKS method...
02-NOV-16 01:22:22.068: Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
02-NOV-16 01:22:22.141: Total estimation using BLOCKS method: 640 KB
02-NOV-16 01:22:22.397: Processing object type SCHEMA_EXPORT/USER
02-NOV-16 01:22:22.543: Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
02-NOV-16 01:22:22.559: Processing object type SCHEMA_EXPORT/ROLE_GRANT
02-NOV-16 01:22:22.580: Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
02-NOV-16 01:22:22.980: Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
02-NOV-16 01:22:32.860: Processing object type SCHEMA_EXPORT/TABLE/TABLE
02-NOV-16 01:22:33.623: Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE
02-NOV-16 01:22:33.739: Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
02-NOV-16 01:22:36.690: . . exported "AJ"."TABLE1"                               6.773 KB       1 rows
02-NOV-16 01:22:36.830: . . exported "AJ"."TABLE10"                              6.773 KB       1 rows
02-NOV-16 01:22:36.858: . . exported "AJ"."TABLE2"                               6.773 KB       1 rows
02-NOV-16 01:22:36.886: . . exported "AJ"."TABLE3"                               6.773 KB       1 rows
02-NOV-16 01:22:36.915: . . exported "AJ"."TABLE4"                               6.773 KB       1 rows
02-NOV-16 01:22:36.944: . . exported "AJ"."TABLE5"                               6.773 KB       1 rows
02-NOV-16 01:22:36.973: . . exported "AJ"."TABLE6"                               6.773 KB       1 rows
02-NOV-16 01:22:37.002: . . exported "AJ"."TABLE7"                               6.773 KB       1 rows
02-NOV-16 01:22:37.030: . . exported "AJ"."TABLE8"                               6.773 KB       1 rows
02-NOV-16 01:22:37.058: . . exported "AJ"."TABLE9"                               6.773 KB       1 rows
02-NOV-16 01:22:38.051: Master table "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
02-NOV-16 01:22:38.115: ******************************************************************************
02-NOV-16 01:22:38.116: Dump file set for SYSTEM.SYS_EXPORT_SCHEMA_01 is:
02-NOV-16 01:22:38.120:   /u02/app/oracle/admin/LONDON/dpdump/expdp_aj.dmp
02-NOV-16 01:22:38.129: Job "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully completed at Wed Nov 2 01:22:38 2016 elapsed 0 00:00:20
[oracle@testing dpdump]$


This timestamp information is very useful. They tell how much time each object is taking to export.
This help in planning other activities on production database.

To get the same information prior to 12c, we can set trace on datapump process using TRACE parameter or process tracing.

No comments:

Post a Comment

Leave a Reply...