ORACLE VERİ TABANINDA IMPORT-EXPORT UYGULAMASI

1)Data pump dosyalarını yazmak için bir dizin oluşturuyoruz(Bu dizin oracle kullanıcı ile yaratılır)
[oracle@yavuzselim ~]$ mkdir -p /u01/backups/datapump
2)Veri tabanına bağlanıp bu diziyi datapump olarak atıyoruz
SQL> create or replace directory dp_dir as '/u01/backups/datapump';

Directory created.
3)Bir kullanıcıya bu dizine yazma hakkı verelim
SQL> grant read, write on directory dp_dir to yavuzselim;

Grant succeeded.
4)Veri tabanında bulunan tabloları dışarı aktarmak için export işlemi yapıyoruz(oracle kullanıcısında yapıyoruz)
[oracle@yavuzselim ~]$ expdp yavuzselim/26162616@orcl tables=yse1 directory=dp_dir dumpfile=yse1.dmp logfile=expdpyse1_KEY.log
Export: Release 12.1.0.2.0 - Production on Tue Jul 18 13:06:37 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
[oracle@yavuzselim ~]$ expdp yavuzselim/26162616@orcl tables=yse1 directory=dp_dir dumpfile=yse1.dmp logfile=expdyse.log

Export: Release 12.1.0.2.0 - Production on Tue Jul 18 13:06:37 2017
Starting "YAVUZSELIM"."SYS_EXPORT_TABLE_01":  yavuzselim/********@orcl tables=yse1 directory=dp_dir dumpfile=yse1.dmp logfile=expdyse.log
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 0 KB
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER
. . exported "YAVUZSELIM"."YSE1"                             0 KB       0 rows
Master table "YAVUZSELIM"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for YAVUZSELIM.SYS_EXPORT_TABLE_01 is:
  /u01/backups/datapump/yse1.dmp
Job "YAVUZSELIM"."SYS_EXPORT_TABLE_01" successfully completed at Tue Jul 18 13:08:23 2017 elapsed 0 00:00:57
5)Veri tabanına tablo aktarmak için aşağıdaki kodu kullanıyoruz
[oracle@yavuzselim ~]$ impdp yavuzselim/26162616@orcl tables=yse1 directory=dp_dir dumpfile=yse1.dmp logfile=impdpyse1.log

Import: Release 12.1.0.2.0 - Production on Tue Jul 18 13:11:23 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
Master table "YAVUZSELIM"."SYS_IMPORT_TABLE_01" successfully loaded/unloaded
Starting "YAVUZSELIM"."SYS_IMPORT_TABLE_01":  yavuzselim/********@orcl tables=yse1 directory=dp_dir dumpfile=yse1.dmp logfile=impdpyse1.log
Processing object type TABLE_EXPORT/TABLE/TABLE
ORA-39151: Table "YAVUZSELIM"."YSE1" exists. All dependent metadata and data will be skipped due to table_exists_action of skip
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER

Job "YAVUZSELIM"."SYS_IMPORT_TABLE_01" completed with 1 error(s) at Tue Jul 18 13:11:33 2017 elapsed 0 00:00:07

Yorumlar

Bu blogdaki popüler yayınlar

MDF,NDF,LDF NEDİR?

ORACLE DA TABLESPACE OLUŞTURMA VE EKLEME YAPMA

WATT, VOLT, AMPER, GÜÇ NEDİR?