1. Oracle 11g-dn EXPORT al脹n Oracle 10g- IMPORT etmk
EXPDP istifad edrk Oracle VB y端ksk versiyas脹ndan al脹nm脹 dump fayl脹n脹 旦ncki versiyaya nec y端klycyimizi
g旦rcyik. Bildiyiniz kimi DATAPUMP utilitas脹 ilk df Oracle 10g d tqdim olunmudur. Buna daha 旦nclr istifad ediln
EXP/IMP n脹n daha da tkmillmi v yax脹lad脹r脹lm脹 altidir d demk olar. (EXP/IMP 10g, 11g d hld m旦vcuddur).
Sadc bu utilitin lav imkanlar脹 var ki, EXP/IMP da bu m端mk端n deyil, msln tablespace da脹nmas脹 v s. Eyni zamanda
DATAPUMP server-d 巽al脹d脹脹 端巽端n EXP/IMP nzrn daha s端rtlidir v paralel olaraq 巽al脹d脹r脹la bilir.
Burada mn Oracle 11g R2 (11.2.0.1.0) v Oracle 10g R2 (10.2.0.4) istifad edcm.
Glin Oracle 11g VB da bir directory quraq v ondan ulfet istifad巽isin oxuma v yazma h端quqlar脹n脹 verk.
SQL> create directory my_dir as '/u01/app/oracle/admin/ulfetdb/dpdump';
Directory created.
SQL> grant read, write on directory my_dir to ulfet;
Grant succeeded.
SQL>
聴ndis mn ulfet istifad巽isi kimi VB balan脹b yeni cdvl quracam v 1 str daxil edcm.
SQL> conn ulfet/ulfet
Connected.
SQL> create table test_tbl (id number, name varchar2(10));
Table created.
SQL> insert into test_tbl values(1, 'Omar');
1 row created.
SQL> commit;
Commit complete.
DATAPUMP 脹n EXPDP istifad edrk m端vafiq cdvlin damp脹n脹 alaq.
[oracle@localhost dpdump]$ expdp ulfet/ulfet@ulfetdb directory=my_dir dumpfile=test_tbl.dmp tables=test_tbl version=10.2
Export: Release 11.2.0.1.0 - Production on Mon Dec 10 14:45:54 2012
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
Starting "ULFET"."SYS_EXPORT_TABLE_01": ulfet/***@ulfetdb directory=my_dir dumpfile=test_tbl.dmp
tables=test_tbl version=10.2
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 64 KB
Processing object type TABLE_EXPORT/TABLE/TABLE
. . exported "ULFET"."TEST_TBL" 5.289 KB 1 rows
Master table "ULFET"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
2. ***
Dump file set for ULFET.SYS_EXPORT_TABLE_01 is:
/u01/app/oracle/admin/ulfetdb/dpdump/test_tbl.dmp
Job "ULFET"."SYS_EXPORT_TABLE_01" successfully completed at 14:46:29
[oracle@localhost dpdump]$
--Oracle 11g ald脹脹m脹z damp (dump) fayl脹n脹 Oracle 10g olan verilnlr bazas脹ndak脹 ma脹na da脹yaq v DATAPUMP-脹n
IMPDP istifad edk.
--Bundan 旦nc Oracle 10g versiyas脹 olan VB da directory m旦vcudluundan v ona laz脹m olan h端q端qlar脹ndan min olun. Az
旦nc Oracle 11g d qurmu olduum directory-nin eynisini Oracle 10g d qururam. (Adlar eyni olasada yol (path) frlidir).
SQL> create directory my_dir as '/home/oracle/oracle/product/10.2.0/db_1/admin/mydb/dpdump';
Directory created.
SQL> grant read, write on directory my_dir to ulfet;
Grant succeeded.
SQL>
--聴ndis glin damp-z脹 import edk
[oracle@localhost ~]$ impdp ulfet/ulfet@mydb directory=my_dir dumpfile=test_tbl.dmp tables=test_tbl
Import: Release 10.2.0.4.0 - Production on Monday, 10 December, 2012 13:43:54
Copyright (c) 2003, 2007, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table "ULFET"."SYS_IMPORT_TABLE_01" successfully loaded/unloaded
Starting "ULFET"."SYS_IMPORT_TABLE_01": ulfet/***@mydb directory=my_dir dumpfile=test_tbl.dmp
tables=test_tbl
Processing object type TABLE_EXPORT/TABLE/TABLE
ORA-39083: Object type TABLE failed to create with error:
ORA-00959: tablespace 'REC_TBS' does not exist
Failing sql is:
CREATE TABLE "ULFET"."TEST_TBL" ("ID" NUMBER, "NAME" VARCHAR2(10)) PCTFREE 10 PCTUSED 40 INITRANS
1 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS
2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE
"REC_TBS"
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Job "ULFET"."SYS_IMPORT_TABLE_01" completed with 1 error(s) at 13:44:07
[oracle@localhost ~]$
--G旦r端nd端y端 kimi burda bir shv var. Tablespace-iz frqlidir.
Bel hal ba vermmsi 端巽端n impdp da remap_tablespace parametrindn istifad etmk laz脹md脹r.
3. [oracle@localhost ~]$ impdp ulfet/ulfet@mydb directory=my_dir dumpfile=test_tbl.dmp tables=test_tbl
remap_tablespace=REC_TBS:USERS
Import: Release 10.2.0.4.0 - Production on Monday, 10 December, 2012 13:46:22
Copyright (c) 2003, 2007, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table "ULFET"."SYS_IMPORT_TABLE_01" successfully loaded/unloaded
Starting "ULFET"."SYS_IMPORT_TABLE_01": ulfet/***@mydb directory=my_dir dumpfile=test_tbl.dmp tables=test_tbl
remap_tablespace=REC_TBS:USERS
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
. . imported "ULFET"."TEST_TBL" 5.289 KB 1 rows
Job "ULFET"."SYS_IMPORT_TABLE_01" successfully completed at 13:46:24
[oracle@localhost ~]$
--聴ndis ulfet istifad巽i kimi VB balanaq v cdvlimizin v i巽indki mlumat脹n m旦vcudluunu yoxlayaq.
SQL> conn ulfet/ulfet
Connected.
SQL> select * from test_tbl;
ID NAME
---------- ----------
1 Omar
SQL>
--Cdvl v data uurlu olaraq y端klnilmidir.
--Bs istifad巽i export zaman脹 version=10.2 yazmaza v import etdikd n ba verir?
--Export normal 巽al脹acaq lakin import zaman脹 ORA-39142 xta alacaq.
--Glin yoxlayaq.
--Oracle 11g
[oracle@localhost dpdump]$ expdp ulfet/ulfet@ulfetdb directory=my_dir dumpfile=test_tbl2.dmp tables=test_tbl
Export: Release 11.2.0.1.0 - Production on Mon Dec 10 15:13:11 2012
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
Starting "ULFET"."SYS_EXPORT_TABLE_01": ulfet/***@ulfetdb directory=my_dir dumpfile=test_tbl2.dmp
tables=test_tbl
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 64 KB
Processing object type TABLE_EXPORT/TABLE/TABLE
4. . . exported "ULFET"."TEST_TBL" 5.414 KB 1 rows
Master table "ULFET"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
***
Dump file set for ULFET.SYS_EXPORT_TABLE_01 is:
/u01/app/oracle/admin/ulfetdb/dpdump/test_tbl2.dmp
Job "ULFET"."SYS_EXPORT_TABLE_01" successfully completed at 15:13:30
--Oracle 10g
[oracle@localhost ~]$ impdp ulfet/ulfet@mydb directory=my_dir dumpfile=test_tbl2.dmp tables=test_tbl
remap_tablespace=REC_TBS:USERS
Import: Release 10.2.0.4.0 - Production on Monday, 10 December, 2012 13:53:30
Copyright (c) 2003, 2007, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39001: invalid argument value
ORA-39000: bad dump file specification
ORA-39142: incompatible version number 3.1 in dump file
"/home/oracle/oracle/product/10.2.0/db_1/admin/mydb/dpdump/test_tbl2.dmp"
EXPDP versiya parameteri aa脹dak脹 Oracle versiya v relizlrind 巽al脹脹r:
Oracle 10g R1
Oracle 10g R2
Oracle 11g R1
Oracle 11g R2