Converting Oracle Database from Linux to Windows using RMAN
1.查出源端linux下DB的v$database.platform_id和v$database.platform_name
select platform_id,platform_name from v$database
13 Linux x86 64-bit
查出目標端windows下DB的v$database.platform_id和v$database.platform_name
select platform_id,platform_name from v$database
12 Microsoft Windows x86 64-bit
2、查詢源端和目標的位元組序號v$transprotable_platform.endian_format是否一致,一致才可以遷移
select * from v$transportable_platform where platform_id in (12,13)
3.源端linux下DB啟動到open read only
shutdown immediate;
startup mount;
alter database open read only;
4.源端linux執行如下
declare
v_return boolean;
begin
v_return:=dbms_tdb.check_db('Microsoft Windows x86 64-bit');
end;
/
declare
b boolean;
begin
b:=dbms_tdb.check_external;
end;
/
以上兩個語句不報錯就可以
5.源端linux下備份
rman>convert database transport script '/u02/backup/transport.sql' to platform 'Microsoft Windows x86 64-bit'
db_file_name_convert='/u01/app/oracle/oradata/hyprd/','/u02/backup/';
--以上如果在convert database後面加上 new database 'XX' 表示對要轉換的目標資料庫的資料檔案生成新的資料庫名,個人實驗中沒有做這個動作,因為目標端也想用源端的資料庫名
/u02/backup/transport.sql就是源端linux匯出來的控制檔案
/u01/app/oracle/oradata/hyprd/就是源端linux的資料庫檔案路徑
/u02/backup/就是源端linux匯出資料庫檔案的存放路徑
Microsoft Windows x86 64-bit就是目標端windows的v$database.platform_name
6、源端linux下建立pfile(個人的實驗過程中沒有做這個動作,因為之前已經在目標端建立了一個和源端一樣dbname的空資料庫)
create pfile='/u02/backup/pfile.ora' from spfile;
7.把linux源端所有/u02/backup/下所有檔案複製到windows目標端的一個臨時目錄如e:\oracle\backup
8.windows目標端建立用於rman恢復的目錄(個人的實驗過程中沒有做這個動作,因為之前已經在目標端建立了一個和源端一樣dbname的空資料庫)
$ORACLE_BASE/admin/SID/adump
$ORACLE_BASE/admin/SID/bdump
$ORACLE_BASE/admin/SID/cdump
$ORACLE_BASE/admin/SID/udump
$ORACLE_BASE/fast_recovery_area
$ORACLE_BASE/oradata/SID
9.把目標端windows中的e:\oracle\backup檔案都移動到$ORACLE_BASE/oradata/SID/(個人實驗過程中,還去先刪除$ORACLE_BASE/oradata/SID/原來的空資料庫檔案)
10.把從linux下複製過來的pfile檔案進行修改,指定相關檔案的目錄(個人的實驗過程中沒有做這個動作,因為之前已經在目標端建立了一個和源端一樣dbname的空資料庫)
目標端spfile或pfile的*.control_files路徑檔案不需要修改為/u02/backup/transport.sql
/u02/backup/transport.sql是源端生成的控制檔案,最後我們需要這個檔案生成真正的控制檔案(即目標端spfile或pfile的*.control_files值對應的檔案)
11.把從linux下複製過來的controlfile檔案即/u02/backup/transport.sql進行修改,指定引數檔案路徑,資料檔案路徑,redo log路徑,tempfile路徑
12.保證linux目標庫shutdown情況下,sqlplus執行/u02/backup/transport.sql
/u02/backup/
sqlplus / as sysdba
SQL>startup nomount
SQL>@transport.sql
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30126024/viewspace-2212940/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Converting Oracle Database from Windows to Linux using RMANOracleDatabaseWindowsLinux
- Duplicate Database from ASM to Non- ASM Database Using RMANDatabaseASM
- Creating a Physical Standby using RMAN DUPLICATE FROM ACTIVE DATABASEDatabase
- Step by Step Guide on converting a database from Windows to AIX-1373780.1GUIIDEDatabaseWindowsAI
- Oracle11g RMAN Duplicate from Active DatabaseOracleDatabase
- Step by Step Guide on Creating Physical Standby Using RMAN DUPLICATE...FROM ACTIVE DATABASE WithoutGUIIDEDatabase
- How to copy a datafile from ASM to a file system not using RMANASM
- Using RMAN Incremental Backups to Refresh a Standby DatabaseREMDatabase
- Duplicating Database using RMAN duplicate commandDatabase
- How to restore and recover a database from an RMAN backup_881395.1RESTDatabase
- FROM ASM Migrating to FILE SYSTEM Using RMAN(三)ASM
- Using Regular Expressions in Oracle DatabaseExpressOracleDatabase
- 11g rman新特性 duplicate target database for standby from active databaseDatabase
- RMAN duplicate from active database 複製資料庫Database資料庫
- Using RMAN Incremental Backups to Roll Forward a Physical Standby DatabaseREMForwardDatabase
- Oracle 11gR2 使用 RMAN duplicate from active database 複製資料庫OracleDatabase資料庫
- RMAN-04006: error from auxiliary database: ORA-01034: ORACLE not availableErrorUXDatabaseOracleAI
- Guide to Database Migration from Microsoft SQL Server using MySQL WorkbenchGUIIDEDatabaseROSServerMySql
- RMAN Duplicate Database From RAC ASM To RAC ASM [ID 461479.1]DatabaseASM
- Connect SQL Server from Linux Client using Windows Authentication and troubleshoot stepsSQLServerLinuxclientWindows
- 使用oracle 11g rman新特性 duplicate target database for standby from active database 建立物理dataguard並開啟RealOracleDatabase
- Unload data to a flat file from Oracle databaseOracleDatabase
- Step By Step Guide To Create Physical Standby Database Using RMAN [ID 469493.1]GUIIDEDatabase
- Oracle Database 12c Release 2 (12.2) RAC On Oracle Linux 7 Using VMwareOracleDatabaseLinux
- How to check whether the current database in using Oracle optionsDatabaseOracle
- Oracle Database 11g Release 2 RAC On Linux Using VMware Server 2OracleDatabaseLinuxServer
- Oracle 12c: Recover tables using RMANOracle
- Upgrade Oracle Database from 10.2.0.1 to 11.2.0.4OracleDatabase
- For oracle databases, if the top showing the oracle database, then oracle process is using the top cOracleDatabase
- Oracle 12c系列(八)|RMAN (FROM SERVICE)Oracle
- Oracle 12Cr2 Using CloneDB to clone a databaseOracleDatabase
- 使用RMAN DUPLICATE...FROM ACTIVE DATABASE命令來建立DataGuard物理備庫Database
- Oracle使用RMAN從Windows遷移資料到LinuxOracleWindowsLinux
- 利用RMAN把ORACLE從WINDOWS轉換到LINUXOracleWindowsLinux
- Oracle 11g Data Guard 使用 duplicate from active database 建立 standby databaseOracleDatabase
- Oracle 11g Data Guard 使用duplicate from active database 建立 standby databaseOracleDatabase
- Oracle 11g Rman Active database duplicateOracleDatabase
- clone database using RMAN without new incarnation (with NORESETLOGS)_1608236.1Database