windows下使用資料幫浦的方式匯入匯出資料庫

2021-09-26 05:30:56 字數 1121 閱讀 3695

在匯入匯出之前需要先做一些準備工作.

1.建立表空間:

select * from dba_tablespaces 查詢已經存在的表空間。

select table_name,sum(bytes)/1024/1024/1024 from dba_data_files group by tablespace_name 檢視表空間的大小。

2.建立使用者:

create user v45zh identified by 1 default tablespace orcl;

3.給使用者賦許可權:

grant dba to v45zh;

4.建立目錄:

create directory dump_dir as 『f:\oracle_dmp』;select * from dba_directories 查詢已經存在的目錄

5.給目錄賦許可權:

grant read,write on directory dump_dir to v45zh;

6.匯入匯出語句:

匯出:expdp cp_user/[email protected]/gzdb directory=data_pump_dir dumpfile=gzdb20171009.dmp logfile=gzdblog20171009.log exclude=table:「in(『t_s_biz_log』,』 t_s_oper_log』)」

注:exude關鍵字可以排除一些不需要匯出的表。

匯入:impdp v45zh/[email protected]/gzdb directory=dump_dir dumpfile=yssfa201705.dmp logfile=yssfa201705.log remap_schema= cbsp_user:v45zh remap_tablespace=orcl:orcl table_exists_action=replace

注:使用table_exists_action=replace關鍵字可以將資料庫中已經存在的表進行替換。

7.注意事項:

①在匯入匯出資料庫之前首先使用者要有匯入匯出的許可權。再乙個是目錄要有讀寫的許可權。

②如果是linux系統的話,impdp執行時的許可權是oracle使用者的許可權,這個時候目錄的所有者有許可權是不夠的,其他人也要有許可權,才可以匯出成功。

資料幫浦的使用

流程 昨天同事完成了從50伺服器通過資料幫浦將50上的表作為資料幫浦檔案匯出放到156伺服器上,並將資料幫浦檔案匯入到156伺服器上 也就是一堆表 今天,同事教我使用資料幫浦,並將156伺服器上資料幫浦檔案 那堆表 匯入到我在156伺服器上建立的使用者裡。步驟 1 通過xftp鏈結50伺服器,找到存...

oracle 資料幫浦的使用

一 使用資料幫浦進行資料儲存 二 使用資料幫浦進行資料還原 1 sqlplus以dba方式連線到資料庫 2 建立資料資料夾並賦予許可權 建立使用者 create or replace directory data eagle as data eagle 將資料夾的許可權賦予使用者eagle gran...

windows下boost庫的基本使用方法

因為boost都是使用模板的技術,所以所有 都是寫在乙個.hpp標頭檔案中。這樣boost中的大部分內容是不需要編譯生成相應的鏈結庫,只需要設定下面的包含目錄 或者設定一下環境變數 在原始檔中包含相應的標頭檔案就可以使用了。少部分庫需要生成鏈結庫來使用。下面介紹完整安裝boost庫的方法 2 解壓檔...