Oracle資料庫匯入匯出

2021-07-01 22:55:38 字數 1437 閱讀 1030

一、準備工作

建立表空間:

create temporary tablespace yangwen_temp 

tempfile 'd:\oracle\oradata\orcl\yangwen_temp.dbf' 

size 50m  

autoextend on  

next 50m maxsize 20480m  

extent management local;

create tablespace yangwen_data  

logging  

datafile 'd:\oracle\oradata\orcl\yangwen_data.dbf' 

size 50m  

autoextend on  

next 50m maxsize 20480m  

extent management local;

--建立使用者

create user admin123 identified by 123456  

default tablespace yangwen_data  

temporary tablespace yangwen_temp;

-- 授權限

grant connect,resource,dba to admin123;

二、匯入匯出方法

方案一:

1.1 資料庫的備份-邏輯備份: 

expdp wzzjxt/wzzjxt@wzzj directory=data_dump_dir dumpfile=%backup_file%.dmp 

1.2 資料庫的還原-邏輯還原:

impdp aaa/aaa directory=data_dump_dir dumpfile=px.dmp remap_schema=px:aaa 

示例:建立使用者以及授權限

create directory data_pump_dir as'd:\';

create user v106 identified by v106;

grant dba,connect,resource to v106;

grant read,write on directory data_pump_dir to v106;

impdp sanyuechu/sanyuechu directory=data_pump_dir dumpfile=test.dmp

方案二:

1.1 資料庫的備份-邏輯備份:

exp username/password@ip file=d:/資料庫檔案.dmp

資料庫的還原-邏輯還原:

建立使用者:(在sys系統使用者執行sql)

create user username identified by password;

grant dba,connect,resource to username;

Oracle 資料庫 匯入匯出

匯入匯出時要,通過 執行 進行到oracle的安裝目錄的 bin 目錄下導 例如 d oracle product 10.1.0 db 1 bin 匯出分三種 匯出 表 方案 資料庫 1.1.1 匯出自己的表 說明 使用者 密碼 資料庫例項 表名 可多個 檔案路徑 exp userid scott ...

oracle資料庫匯入匯出

用工具匯入 匯出 資料 工具 t 匯出表 x 工具 t 匯出表 x 所選執行檔案位置 e oracle product 10.2.0 db 1 bin imp.exe exp.exe 命令匯入匯出 oracle匯入dmp檔案命令 1 dmp檔案中的資料匯入資料庫 1.首先進入cmd命令視窗 2.執行...

Oracle資料庫匯入匯出

我們經常會在資料備份或環境移至的時候用到oracle的匯入匯出 下面我們來詳細看一下匯入匯出的步驟 1.命令列下匯出dmp檔案 資料匯出,可以帶版本 expdp bp oracle bp oracle orcl directory dump dir dumpfile bp oracle.dmp ve...