DataPump Legacy Mode in 11g Release 2

If you’re planning a migration to 11g, then one of the many items on your “to do” list, will be to check whether or not any database management scripts that you currently use will need to be re-written.

If you’re using Oracle 9i Release 2 or earlier, then you’ll be using scripts for the export and import utilities.  Whilst many of the parameters used by these tools have equivalent parameters when using datapump, a useful feature in 11g Release 2 is the legacy mode feature.

With this new feature, you can simply use your existing export/import scripts with the datapump impdp/expdp utilities.  Datapump won’t re-write the scripts for you, but it will transform the parameters as the script runs, so that datapump completes successfully.  At a later stage, you can then re-write your export/import scripts, without having to manually check what changes should be made.

To demonstrate this functionality, we can take a quick norows export of an 11g Release 2 database.  We’ll use the parameters “file”,”log”,”buffer” and “rows” which are export parameters, but aren’t listed as being parameter for use with expdp.

export ORACLE_SID=orcl
export ORACLE_HOME=/u01/opt/oracle/product/11gR2/db_1
expdp system/password file=test_full.dmp log=test_full.log buffer=1048576 rows=n

An extract from the logfile contains the following lines:-

Export: Release 11.2.0.1.0 - Production on Fri Oct 23 22:26:42 2009
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Legacy Mode Active due to the following parameters:
Legacy Mode Parameter: “buffer=1048576″ Location: Command Line, ignored.
Legacy Mode Parameter: “file=test_full.dmp” Location: Command Line, Replaced with: “dumpfile=test_full.dmp”
Legacy Mode Parameter: “log=test_full.log” Location: Command Line, Replaced with: “logfile=test_full.log”
Legacy Mode Parameter: “rows=FALSE” Location: Command Line, Replaced with: “content=metadata_only”
Legacy Mode has set reuse_dumpfiles=true parameter.
Starting “SYSTEM”.”SYS_EXPORT_SCHEMA_01″:  system/******** dumpfile=test_full.dmp logfile=test_full.log content=metadata_only reuse_dumpfiles=true
Processing object type SCHEMA_EXPORT/USER

Master table “SYSTEM”.”SYS_EXPORT_SCHEMA_01″ successfully loaded/unloaded
******************************************************************************
Dump file set for SYSTEM.SYS_EXPORT_SCHEMA_01 is:
  /u01/opt/oracle/admin/orcl/dpdump/test_full.dmp
Job “SYSTEM”.”SYS_EXPORT_SCHEMA_01″ successfully completed at 22:27:59

 

You’ll notice that datapump converts the export-specific parameters to their datapump equivalents on the fly and then completes the export as normal. The other point to notice about the export, is that the dumpfile and logfile will have been created in the default datapump directory, rather than in the location that you ran the commands from - as would have been the case with the export utility.   (select directory_path from dba_directories where directory_name=’DATA_PUMP_DIR’; - to confirm where this location is in your environment).

 

The same legacy mode has also been implemented for the impdp datapump utility. Below is an extract from the logfile for a quick table import, which was run with the parameters “file”,”log”,”buffer”,”ignore” and “commit” from the import utility.
impdp system/password file=table_export.dmp log=table_import.log buffer=1048576 ignore=y commit=y

Import: Release 11.2.0.1.0 - Production on Fri Oct 23 22:44:48 2009

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

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Legacy Mode Active due to the following parameters:
Legacy Mode Parameter: “buffer=1048576″ Location: Command Line, ignored.
Legacy Mode Parameter: “commit=TRUE” Location: Command Line, ignored.
Legacy Mode Parameter: “file=table_export.dmp” Location: Command Line, Replaced with: “dumpfile=table_export.dmp”
Legacy Mode Parameter: “ignore=TRUE” Location: Command Line, Replaced with: “table_exists_action=append”
Legacy Mode Parameter: “log=table_import.log” Location: Command Line, Replaced with: “logfile=table_import.log”
Master table “SYSTEM”.”SYS_IMPORT_FULL_01″ successfully loaded/unloaded
Starting “SYSTEM”.”SYS_IMPORT_FULL_01″:  system/******** dumpfile=table_export.dmp logfile=table_import.log table_exists_action=append
Processing object type SCHEMA_EXPORT/USER

. . imported “TEST”.”T1″                                5.156 KB      17 rows
Job “SYSTEM”.”SYS_IMPORT_FULL_01″ completed …

References:

1) Oracle 9i Database Utilities Release 2 (9.2)
2) Oracle Database Utilities 10g Release 2 (10.2)
3) Oracle Database Utilities 11g Release 2 (11.2)

One Response to “DataPump Legacy Mode in 11g Release 2”

  1. DataPump Legacy Mode in 11g Release 2 | Canning IT LTD Says:

    […] DataPump Legacy Mode in 11g Release 2 […]

Leave a Reply

You must be logged in to post a comment.


Buy Cipro Meridia Percocet Buy Propecia Prozac Buy Prozac Buy Biaxin Valium Online Lipitor Buy Adderall Buy Online Xanax Percocet Darvocet Buy Fioricet Xanax Online Buy Adderall Buy Darvocet Cheap Phentermine Cheap Phentermine Buy Tenuate Didrex Buy Valium Buy Tramadol Valium Buy Zyban Buy Viagra Online Buy Levitra Buy Ativan Buy Levitra Buy Zyprexa Buy Norvasc Buy Didrex Didrex Buy Clonazepam Buy Darvocet Adderall Zyprexa Buy Vicodin Fioricet Buy Meridia Buy Meridia Bontril Bupropion Buy Butalbital Buy Soma Buy Seroquel Buy Adipex Buy Valium Zyprexa Fioricet Buy Vicodin Butalbital Buy Celexa Buy Zocor Nexium Buy Seroquel Buy Zovirax Tramadol Zocor Buy Bontril Buy Seroquel Tramadol Buy Zyprexa Buy Cialis Norvasc Glucophage Effexor Celexa Xanax Online Adipex Buy Xanax Online Buy Alprazolam Buy Alprazolam Zithromax Alprazolam Zyprexa Buy Diflucan Buy Cialis Online Buy Hydrocodone Online Tenuate Flexeril