如何將Oracle 11g備份匯入到10g

來源:互聯網
上載者:User

如何將Oracle11g備份匯入到10g  

11g 匯出語句:EXPDP USERID='facial/facial@orcl as sysdba' schemas=facial directory=DATA_PUMP_DIRdumpfile=aa.dmp logfile=aa.log version=10.2.0.1.0

 

其中,紅色文字部分是根據需要改寫的地方。例如我的使用者facial密碼是facial,資料庫sid是orcl,schemas要到出的使用者名稱是facial,要匯入到10.2.0.1.0版本的Oracle資料庫中去。aa.dmp和aa.log將會在11g的dpdump目錄中產生,例如我的11g裝在了E盤下面,於是aa.dmp將會在E:\app\Administrator\admin\orcl\dpdump目錄下被產生。

 

 

二、在10g伺服器上,使用impdp命令恢複資料

 

準備工作:1.建庫2.建資料表空間3.建使用者並授權4.將aa.dmp拷貝到10g的dpdump目錄下

 

--建立資料表空間

createtablespace TS_Facial datafile'E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\Facial.DBF' size 500M autoextend on next50M;

 

--建立使用者

create user Facial identified by Facial default tablespace TS_Facial;

 

--授權給使用者

grantconnect,resource,dba to Facial;

aa.dmp和 aa.log 放在E:\oracle\product\10.2.0\admin\orcl\dpdump目錄下

 

10g 匯入語句:IMPDP USERID='facial/facial@orcl as sysdba' schemas=facial directory=DATA_PUMP_DIR dumpfile=aa.dmp logfile=aa.logversion=10.2.0.1.0

 

其中紅色部分是根據需要改寫的地方。例如我的使用者facial密碼是facial,資料庫sid是orcl,schemas要匯入使用者名為facial,要匯入到10.2.0.1.0版本的Oracle資料庫中去。aa.log將會在10g的dpdump目錄中產生。



在用expdp的時候可能會報錯,在metink上和蓋總哪兒都找到瞭解決方法

 

ORA-39213 Metadata processing not available

今天在執行EXPDP時遇到了這個錯誤:

Connectedto: Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production

Withthe Partitioning, OLAP and Data Mining options

ORA-39006:internal error

ORA-39213:Metadata processing is not available

Metalink確認是一個又來已經的已知問題,可以嘗試執行如下步驟解決:

connect/ as sysdba

executesys.dbms_metadata_util.load_stylesheets;

 

我的系統中,以上處理過程有效:

OracleDatabase 10g Enterprise Edition Release 10.2.0.2.0 - Production

Withthe Partitioning, OLAP and Data Mining options

 

SQL>exec dbms_metadata_util.load_stylesheets

 

PL/SQLprocedure successfully completed.

 

SQL>exit

此後匯出可以順利執行。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.