1. 程式人生 > >Oracle 資料泵(IMPDP/EXPDP)匯入匯出

Oracle 資料泵(IMPDP/EXPDP)匯入匯出

   最好以system等管理員建立邏輯目錄,Oracle不會自動建立實際的物理目錄“D:\oracleData”(務必手動建立此目錄),僅僅是進行定義邏輯路徑dump_dir;

 sql> conn system/[email protected] as sysdba;

 sql>create directory dump_dir as 'D:\oracleData';

二、檢視管理員目錄(同時檢視作業系統是否存在該目錄,因為oracle並不關心該目錄是否存在,假如不存在,則出錯)

 sql>select * from dba_directories;

三、用expdp匯出資料

1)匯出使用者及其物件
expdp scott/[email protected] schemas=scott dumpfile=expdp.dmp directory=dump_dir;

2)匯出指定表
expdp scott/[email protected] tables=emp,dept dumpfile=expdp.dmp directory=dump_dir;

3)按查詢條件導
expdp scott/[email protected] directory=dump_dir dumpfile=expdp.dmp tables=emp query=’where deptno=20’;

4)按表空間導
expdp system/[email protected] directory=dump_dir dumpfile=tablespace.dmptablespaces=temp,example;

5)導整個資料庫
expdp system/[email protected] directory=dump_dir dumpfile=full.dmp full=y;

四、用impdp匯入資料

在正式匯入資料前,要先確保要匯入的使用者已存在,如果沒有存在,請先用下述命令進行新建使用者

–建立表空間
create tablespace tb_name datafile ‘D:\tablespace\tb_name.dbf’ size 1024m AUTOEXTEND ON;

–建立使用者
create user user_name identified by A123456a default tablespace tb_name temporary tablespace TEMP;

–給使用者授權

sql>grant read,write on directory dump_dir to user_name;

sql>grant dba,resource,unlimited tablespace to user_name;

1)匯入使用者(從使用者scott匯入到使用者scott)
impdp scott/[email protected] directory=dump_dir dumpfile=expdp.dmp schemas=scott;

2)匯入表(從scott使用者中把表dept和emp匯入到system使用者中)
impdp system/[email protected] directory=dump_dir dumpfile=expdp.dmptables=scott.dept,scott.emp remap_schema=scott:system;

3)匯入表空間
impdp system/[email protected] directory=dump_dir dumpfile=tablespace.dmp tablespaces=example;

4)匯入資料庫
impdb system/[email protected] directory=dump_dir dumpfile=full.dmp full=y;

5)追加資料
impdp system/[email protected] directory=dump_dir dumpfile=expdp.dmp schemas=systemtable_exists_action

相關推薦

Oracle 資料IMPDP/EXPDP匯入匯出

最好以system等管理員建立邏輯目錄,Oracle不會自動建立實際的物理目錄“D:\oracleData”(務必手動建立此目錄),僅僅是進行定義邏輯路徑dump_dir; sql> conn system/[email prote

Oracle資料Dump匯出匯入

*該匯入匯出方式完全適用於分割槽表* 匯出、匯入前準備 注:使用sys、system等系統使用者操作! 1)建立DIRECTORY目錄物件 CREATE DIRECTORY exp_dir AS '/oracle/db/zone'; --存放dm

DDL及其數據導入導出impdp/expdp

fault 查詢 including pan min create type eat 表空間 create tablespace ybp_dev datafile ‘G:\app\Administrator\oradata\health\ybp_dev1.dbf‘ si

oracle資料找回閃回

今天做測試的時候,做一個Update資料時,where後面的引數沒有傳進去。 於是所有的資料都變成了一模一樣。雖然是測試庫,但是還是帶來了一些麻煩。 在網上查到oracle有“閃回”的功能。 1、查詢快照時間,找到最近更新的時間。 select r.FIRST_LOAD_TIME,r.* fro

ORACLE--匯入匯出/資料imp/exp impdp/expdp

最近有很多人遇到關於ORACLE資料庫,dmp檔案恢復的問題。 首先我先說一下匯入匯出:     1、強調一下目標庫,首先目標庫設定成為非歸檔模式,nologgong模式更好。(這個操作需要停庫)     2、匯入的時候可以先將索引和約束去掉(disable)(index

使用Oracle資料EXPDP/IMPDP匯入匯出

示例為ORACLE 11G匯出到ORACLE 10G匯入用資料泵EXPDP,IMPDP做ORACLE匯入、匯出.  優勢如下:1:可以跨不同表空間2:不同ORACLE版本資料方便匯入,匯出3:效率大大高

Oracle資料expdp/impdp筆記

作者:fbysssmsn:[email protected]  blog:blog.csdn.net/fbysss宣告:本文由fbysss原創,轉載請註明出處關鍵字:oracle 資料泵 expdp/impdp資料泵 是oracle10G的命令必須在伺服器上執行,s

Oracle11g數據庫遷移到Oracle12C的PDB使用impdp/expdp

oracle12c 數據遷移 expdp impdp pdb Oracle11g數據庫遷移到Oracle12C的PDB(使用impdp/expdp)alter pluggable database hrdb close immediate;DROP PLUGGABLE DATABASE h

Oracle資料匯出匯入資料庫指令碼

--檢視目錄(dba賬號下操作) select * from dba_directories; --匯出expdp指令碼 vim exp_honesty_201809211642.par 編輯生成匯出的par指令碼新增以下指令碼內容 userid="/ as sysdba" dire

Oracle資料匯入

1.執行->cmd 2.輸入sqlplus回車,輸入使用者名稱回車,輸入密碼回車 3.建立表空間 CREATE TABLESPACENNC_INDEX02 DATAFILE 'D:\ORADATA\nnc_index02.dbf' SIZE 300M AUTOEXTEND ON NE

資料整理——Oracle版本歷史很全面Releases and versions of Oracle Database

資料來源: https://en.wikipedia.org/wiki/Oracle_Database Oracle Database Version Initial Release Version Initial Release Date

Geo地圖匯入python資料分析--重點推薦

彙總了一下,利用pyecharts我們可以作圖的型別分別為:Bar(柱狀圖/條形圖),Bar3D(3D 柱狀圖),Boxplot(箱形圖),EffectScatter(帶有漣漪特效動畫的散點圖),Funnel(漏斗圖),Gauge(儀表盤),Geo(地理座標系),Graph(關係圖),HeatMap

oracle資料千萬級修改,刪除優化技巧【轉】

oracle大資料表(千萬級)修改,刪除優化技巧 執行下面的SQL delete  from idwsq11.SH30_PRCSS_EXCTN_LOG e where deriv_prcss_time_stamp < to_date('2010-JAN-01', 'YYYY-MON-DD'); 省略其他

SpringMVC 實現POI讀取Excle檔案中資料匯入資料庫上傳匯出資料庫中資料到Excle檔案中下載

package com.shiliu.game.utils; import java.io.OutputStream; import java.net.URLEncoder; import java.util.ArrayList; import java.util.List; import

Oracle 跨使用者表間資料操作觸發器實現

需求:     使用者hfxcroad中有一個表P_TABLE,建立表語句如下:    create table P_TABLE    (        ID varchar2(50) default

Drupal 7 節點資料Node匯入/匯出Import/Export

Node export  http://drupal.org/project/node_export Views  http://drupal.org/project/views Views Excel Export  http://drupal.org/project/viewsexportxls

Oracle 資料匯入匯出總結

Oracle資料泵匯入匯出是日常工作中常用的基本技術之一,它相對傳統的邏輯匯入匯出要高效,這種特性更適合資料庫物件數量巨大的情形,因為我日常運維的資料庫物件少則幾千,多則幾萬甚至幾十萬,所以傳統exp/imp就會非常耗時,而資料泵方式就因此脫引而出,下面就詳細總結一下資料

oracle 資料匯入資料匯出

資料泵匯入: 指令 impdp 一:資料庫所有物件的匯入: impdp system/tiger dumpfile=pump_dir:mydatabase_%.dat filesize=100m  nologfile=y  job_name=zhang full=y  es

利用iTunes匯入檔案到Document資料檔案共享

在應用程式的Info.plist檔案中新增UIFileSharingEnabled鍵,並將鍵值設定為YES。之後就可以在itunes中看到我們的程式,並可以新增檔案了。新增的檔案會在沙盒的Document資料夾下,在程式裡就可以操作這些檔案了。

Oracle資料匯入匯出

  前言 今天王子要分享的內容是關於Oracle的一個實戰內容,Oracle的資料泵。 網上有很多關於此的內容,但很多都是複製貼上別人的,導致很多小夥伴想要使用的時候不能直接上手,所以這篇文章一定能讓你更清晰的理解資料泵。 開始之前王子先介紹一下自己的環境,這裡使用的是比較常用的WIN10系統,Or