Oracle 11g 資料庫跨平台遷移

2021-08-10 15:32:19 字數 2010 閱讀 2619

源端系統版本:red hat enterprise linux 6.5

目標端系統版本:windows 7 service pack1

目標端資料庫版本:oracle 11.2.0.4

(1)建立測試表

create table test as select * from sys.test;

(sys使用者下存在測試表test,資料量約為25萬條)

(2)確認表已建立成功

select table_name from user_tables;

(3)統計表的資料量

源端測試環境準備完畢!

create user test identified by oracle;

grant dba to test;

grant resource,connect to test;

grant select any table to test;

(1)建立資料匯出目錄directory: 

create or replace directory dump_1 as '/home/oracle/backup';

(2)給建立的資料匯出目錄賦權:

grant read, write on directory dump_1 to system;

(3)進行源端資料庫資料匯出

expdp system/oracle directory=dump_1 dumpfile=exp2.dmp logfile=exp2.log full=y;

(1)建立匯入資料存放目錄:

位置:d:\backup

(2)建立資料匯入目錄directory:

create or replace directory dump_1 as 'd:\backup';

(3)給建立的資料匯出目錄賦權:

grant read, write on directory dump_1 to system;

(4)資料檔案拷貝:

將源端匯出的資料檔案拷貝到目標端建立的資料存放目錄d:\backup

(5)將源端資料匯入資料庫:

impdp system/oracle@orcl directory=dump_1 dumpfile=exp2.dmp full=y

注意:

1.在windows環境dos命令視窗下,匯入命令最後full=y後面不加分號,加了會報lrm-00105錯

scott使用者下7張表全部匯入

emp2表資料量14條,和源端資料一致

test使用者下test表已經匯入

test表資料量為259071和源端資料量一致

至此,整個oracle資料庫跨平台遷移完成!

還原資料庫 oracle 11g

1.需要檔案 2.需要知道表空間 nnc data01 和臨時表空間 nnc index01 和資料庫使用者 nc63train 3.開始,第一步,建立兩個表空間 開啟sql plus,連線資料庫,執行語句 4.第二步,建立資料庫使用者 createuser nc63train identified...

解除安裝Oracle 11g資料庫

完全解除安裝oracle11g步驟 1 開始 設定 控制面板 管理工具 服務 停止所有 oracle 服務。2 開始 程式 oracle orahome81 oracle installation products universal installer,單擊 解除安裝產品 全部展開 選中除 ora...

Oracle11 g資料庫過期

公司使用的oracle11 g 32位 資料庫出現有效期過期問題,解決此問題可以使用下面的方法 1 查詢密碼有效期system登入 sql select from dba profiles where profile default and resource name password life t...