First : Using Datapump from Oralce 11.2 and import into 10.2 version
Step 1: Create Directory
cd /u01
mkdir test_dir
conn sqlplus '/as sysdba'
CREATE OR REPLACE DIRECTORY test_dir AS '/u01';
GRANT READ, WRITE ON DIRECTORY test_dir TO system;
Step 2: Export Table using Datapump
expdp test/test directory=test_dir dumpfile=exp_test_tables.dmp log=exp_test_tables tables=employee version=10.2
[oracle@testdb]$ expdp test/test directory=test_dir dumpfile=exp_test_tables.dmp log=exp_test_tables tables=employee version=10.2
Export: Release 11.2.0.1.0 - Production on Tue Feb 16 11:54:37 2016
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 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Legacy Mode Active due to the following parameters:
Legacy Mode Parameter: "log=exp_test_tables" Location: Command Line, Replaced with: "logfile=exp_test_tables"
Legacy Mode has set reuse_dumpfiles=true parameter.
Starting "TEST_TS"."SYS_EXPORT_TABLE_01": test/******** directory=test_dir dumpfile=exp_test_tables.dmp logfile=exp_test_tables tables=employee version=10.2 reuse_dumpfiles=true
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 80 MB
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
. . exported "test_ts"."EMPLOYEE" 66.70 MB 290559 rows
Master table "test_ts"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for TEST_TS.SYS_EXPORT_TABLE_01 is:
/u01/exp_employee.dmp
Job "TEST_TS"."SYS_EXPORT_TABLE_01" successfully completed at 11:54:42
Step 3: I just Copied this exp_test_tables.DMP file into target DB 10.2 Directory and import it
[oracle@testdb]$impdp test/test directory=test_dir dumpfile=exp_employee.dmp tables=employee remap_schema=test:test1 remap_tablespace=test_ts:test_test_ts1
Import: Release 10.2.0.4.0 - 64bit Production on Tuesday, 16 February, 2016 12:48:28
Copyright (c) 2003, 2007, Oracle. All rights reserved.
Connected to: Oracle Database 10g Release 10.2.0.4.0 - 64bit Production
Master table "TEST1"."SYS_IMPORT_TABLE_01" successfully loaded/unloaded
Starting "TEST"."SYS_IMPORT_TABLE_01": test/******** directory=test_dir dumpfile=exp_test_tables.dmp logfile=exp_test_tables tables=employee remap_schema=test:test1 remap_tablespace=test_ts:test_ts1
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
. . imported "TEST1"."EMPLOYEE" 66.70 MB 290559 rows
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
.
.
.
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Job "TEST1"."SYS_IMPORT_TABLE_01" completed with no error(s) at 12:48:40
Now I sucessfully import it
Happy learning
No comments:
Post a Comment