Oracle資料庫匯入匯出,oracle匯入匯出

來源:互聯網
上載者:User

Oracle資料庫匯入匯出,oracle匯入匯出
一、準備工作
建立資料表空間:
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;
imp userName/passWord@ORCL file=E:\資料庫檔案.dmp ignore=y full=y  log=e:\app\log\imp.log

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.