Converting Oracle Database from Windows to Linux using RMAN
源端windows執行如下語句,看是否可以轉換到目標端
select * from V$DB_TRANSPORTABLE_PLATFORM
V$DB_TRANSPORTABLE_PLATFORM displays all platforms to which the database can be
transported using the RMAN CONVERT DATABASE command. The transportable
database feature only supports transports of the same endian platform
1.查出源端windows下DB的v$database.platform_id和v$database.platform_name
12
Microsoft Windows x86 64-bit
2.查出目標端linux下DB的v$database.platform_id和v$database.platform_name
13
Linux x86 64-bit
3.源端windows下DB啟動到open read only
shutdown immediate;
startup mount;
alter database open read only;
4.源端windows執行如下
declare
v_return boolean;
begin
v_return:=dbms_tdb.check_db('Linux x86 64-bit');
end;
declare
v_return boolean;
begin
v_return:=dbms_tdb.check_external;
end;
Linux x86 64-bit就是目標端linux的v$database.platform_name
以上兩個語句不報錯就可以了
5.源端windows下備份
rman>convert database new database 'HYPRD' transport script 'c:\test\transport.sql'
db_file_name_convert 'D:\ORACLE\ORADATA\HYPRD' 'c:\test' to platform 'Linux x86 64-bit';
c:\test\transport.sql就是源端windows匯出來的控制檔案
D:\ORACLE\ORADATA\HYPRD就是源端windows的資料庫檔案路徑
c:\test就是源端windows匯出資料庫檔案的存放路徑
Linux x86 64-bit就是目標端linux的v$database.platform_name
6.源端windows下建立pfile(個人的實驗過程中沒有做這個動作,因為之前已經在目標端建立了一個和源端一樣dbname的空資料庫)
create pfile='c:\test\pfile.ora' from spfile;
7.把windows源端所有c:\test下所有檔案複製到linux目標端的一個臨時目錄如/home/oracle/rman
8.linux目標端建立用於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下複製過來的.dbf的資料庫檔案從/home/oracle/rman移動到$ORACLE_BASE/oradata/SID/(個人實驗過程中,還去先刪除$ORACLE_BASE/oradata/SID/原來的空資料庫檔案)
10.把從windows下複製過來的pfile檔案進行修改,指定相關檔案的目錄(個人的實驗過程中沒有做這個動作,因為之前已經在目標端建立了一個和源端一樣dbname的空資料庫)
目標端spfile或pfile的*.control_files路徑檔案不需要修改為/home/oracle/rman/transport.sql
/home/oracle/rman/transport.sql是源端生成的控制檔案,最後我們需要這個檔案生成真正的控制檔案(即目標端spfile或pfile的*.control_files值對應的檔案)
11.把從windows下複製過來的controlfile檔案即/home/oracle/rman/transport.sql進行修改,指定引數檔案路徑,資料檔案路徑,redo log路徑,tempfile路徑
12.保證linux目標庫shutdown情況下,sqlplus執行/home/oracle/rman/transport.sql
cd /home/oracle/rman/
sqlplus / as sysdba
SQL>@transport.sql
select * from V$DB_TRANSPORTABLE_PLATFORM
V$DB_TRANSPORTABLE_PLATFORM displays all platforms to which the database can be
transported using the RMAN CONVERT DATABASE command. The transportable
database feature only supports transports of the same endian platform
1.查出源端windows下DB的v$database.platform_id和v$database.platform_name
12
Microsoft Windows x86 64-bit
2.查出目標端linux下DB的v$database.platform_id和v$database.platform_name
13
Linux x86 64-bit
3.源端windows下DB啟動到open read only
shutdown immediate;
startup mount;
alter database open read only;
4.源端windows執行如下
declare
v_return boolean;
begin
v_return:=dbms_tdb.check_db('Linux x86 64-bit');
end;
declare
v_return boolean;
begin
v_return:=dbms_tdb.check_external;
end;
Linux x86 64-bit就是目標端linux的v$database.platform_name
以上兩個語句不報錯就可以了
5.源端windows下備份
rman>convert database new database 'HYPRD' transport script 'c:\test\transport.sql'
db_file_name_convert 'D:\ORACLE\ORADATA\HYPRD' 'c:\test' to platform 'Linux x86 64-bit';
c:\test\transport.sql就是源端windows匯出來的控制檔案
D:\ORACLE\ORADATA\HYPRD就是源端windows的資料庫檔案路徑
c:\test就是源端windows匯出資料庫檔案的存放路徑
Linux x86 64-bit就是目標端linux的v$database.platform_name
6.源端windows下建立pfile(個人的實驗過程中沒有做這個動作,因為之前已經在目標端建立了一個和源端一樣dbname的空資料庫)
create pfile='c:\test\pfile.ora' from spfile;
7.把windows源端所有c:\test下所有檔案複製到linux目標端的一個臨時目錄如/home/oracle/rman
8.linux目標端建立用於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下複製過來的.dbf的資料庫檔案從/home/oracle/rman移動到$ORACLE_BASE/oradata/SID/(個人實驗過程中,還去先刪除$ORACLE_BASE/oradata/SID/原來的空資料庫檔案)
10.把從windows下複製過來的pfile檔案進行修改,指定相關檔案的目錄(個人的實驗過程中沒有做這個動作,因為之前已經在目標端建立了一個和源端一樣dbname的空資料庫)
目標端spfile或pfile的*.control_files路徑檔案不需要修改為/home/oracle/rman/transport.sql
/home/oracle/rman/transport.sql是源端生成的控制檔案,最後我們需要這個檔案生成真正的控制檔案(即目標端spfile或pfile的*.control_files值對應的檔案)
11.把從windows下複製過來的controlfile檔案即/home/oracle/rman/transport.sql進行修改,指定引數檔案路徑,資料檔案路徑,redo log路徑,tempfile路徑
12.保證linux目標庫shutdown情況下,sqlplus執行/home/oracle/rman/transport.sql
cd /home/oracle/rman/
sqlplus / as sysdba
SQL>@transport.sql
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30126024/viewspace-2135301/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Converting Oracle Database from Linux to Windows using RMANOracleDatabaseLinuxWindows
- Connect SQL Server from Linux Client using Windows Authentication and troubleshoot stepsSQLServerLinuxclientWindows
- Oracle使用RMAN從Windows遷移資料到LinuxOracleWindowsLinux
- G009-ORACLE-ASK Using In-Database ArchivingOracleDatabase
- Oracle database 升級(文件)to 10.2.0.4 from 10.2.0.1OracleDatabase
- Oracle 12c系列(八)|RMAN (FROM SERVICE)Oracle
- How To Replicate Data from Oracle to Postgres Using GoldenGate (Doc ID 1544137.1OracleGo
- Oracle Database 19c(19.9) RAC On RedHat 8.3 Using VirtualBox and MacBookOracleDatabaseRedhatMac
- rman duplicate建立異地auxiliary Database oracle_11g oracle_sid不同UXDatabaseOracle
- rman duplicate建立異地auxiliary Database oracle_11g oracle_sid相同UXDatabaseOracle
- Oracle 12c RMAN Performing Cross-Platform Transport of a PDB Using InconsistentOracleROSPlatform
- Windows oracle 11g rman備份恢復到linux系統WindowsOracleLinux
- 【Oracle】Windows安裝oracle11gR1 database 11.1.0.6OracleWindowsDatabase
- recover database using backup controlfile理解Database
- Windows Server 2019 Oracle 19c RMAN Back DetailsWindowsServerOracleAI
- The database owner SID recorded in the master database differs from the database owner SID recorded in database 'DB_NAME'DatabaseAST
- ORA-16649: possible failover to another database prevents this database from beiAIDatabase
- Oracle 19c透過recover standby database from service修復GAP案例OracleDatabase
- Example of SQL Linux Windows Authentication configuration using Managed Service AccountsSQLLinuxWindows
- RMAN restore validate database報ORA-19693RESTDatabase
- ORACLE database vaultOracleDatabase
- Oracle clone databaseOracleDatabase
- Oracle Database Cloud - Database as a Service Quick StartOracleDatabaseCloudUI
- ORACLE rman與RMAN-00054&ORA-09945Oracle
- 使用RMAN複製資料庫 active database資料庫Database
- 【RMAN】Oracle rman 常用命令參考Oracle
- Failed to run 'create login' or 'sp_addsrvrolemeber' in sql Linux using windows authentcationAIVRSQLLinuxWindows
- Oracle Database Scheduler整理OracleDatabase
- Oracle Physical Database LimitsOracleDatabaseMIT
- [Javascript] Find Items from the end of the JavaScript Array using at, findLast and findLastIndexJavaScriptASTIndex
- SciTech-Mathmatics-ImageProcessing-Remove the Background from an image using Python?REMPython
- 備份恢復Lesson 04.Using the RMAN Recovery Catalog
- HowTo Restore RMAN Disk backups of RAC Database to Single Instance On Another NoRESTDatabase
- 理解RMAN backup database plus archivelog delete all input命令DatabaseHivedelete
- 通過rman為客戶實現linux下oracle11.2.0.4到windows下oracle同版本資料庫的異機恢復。LinuxOracleWindows資料庫
- checkboxList operate in windows fromWindows
- Oracle 12.2 使用Database Link優化Standby Database WorkloadOracleDatabase優化
- Oracle RMAN恢復測試Oracle
- Oracle RMAN備份實戰Oracle