Oracle 11g Windows 遷移至 Linux
OS:
windows server 2008 R2 enterprise
DB:
11.2.0.1.0
資料庫配置:
ORACLE_BASE=D:\app\Administrator
ORACLE_HOME=D:\app\Administrator\product\11.2.0\dbhome_1
ORACLE_SID=yoon
↓
OS:
Oracle Linux Server release 5.7
DB:
11.2.0.3.0
資料庫配置:
ORACLE_BASE=/u01/oracle;
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
ORACLE_SID=yoon
1、登入到Windows下的oracle
① 建立pfile
② 建立spfile
③ 關閉資料庫
④ 複製資料檔案、控制檔案、重做日誌組、引數檔案 到 Linux 對應的目錄
2、登入到Linux下的oracle(提前安裝oracle軟體)
① 在oracle使用者下建立對應的目錄
② 在windows下引數檔名有大小寫,在linux將檔名改為小寫
③ 編輯linux下的引數檔案inityoon.ora 將windows路徑改成linux路徑
即:
[oracle@yoon dbs]$ cat inityoon.ora
yoon.__db_cache_size=1543503872
yoon.__java_pool_size=16777216
yoon.__large_pool_size=16777216
yoon.__oracle_base='/u01/oracle'#ORACLE_BASE set from environment
yoon.__pga_aggregate_target=1375731712
yoon.__sga_target=2063597568
yoon.__shared_io_pool_size=0
yoon.__shared_pool_size=452984832
yoon.__streams_pool_size=0
*.audit_file_dest='/u01/oracle/admin/yoon/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/u01/oracle/oradata/yoon/control01.ctl','/u01/oracle/fast_recovery_area/yoon/control02.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_name='yoon'
*.db_recovery_file_dest='/u01/oracle/fast_recovery_area'
*.db_recovery_file_dest_size=4102029312
*.diagnostic_dest='/u01/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=yoonXDB)'
*.memory_target=3435134976
*.nls_language='SIMPLIFIED CHINESE'
*.nls_territory='CHINA'
*.open_cursors=300
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.undo_tablespace='UNDOTBS1'
④ 建立密碼檔案
即:
[oracle@yoon dbs]$ orapwd file=orapwyoon password=oracle
3、登入到linux的oracle下
[oracle@yoon ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Sun Sep 22 17:40:56 2013
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
SQL> startup mount pfile='/u01/oracle/product/11.2.0/db_1/dbs/inityoon.ora';
SQL> crate spfile from pfile='/u01/oracle/product/11.2.0/db_1/dbs/inityoon.ora';
--下次啟動時,直接以spfile引數檔案啟動
4、生成控制檔案的跟蹤檔案
SQL> alter database backup controlfile to trace;
SQL> shutdown immediate
[oracle@yoon ~]$ cd /u01/oracle/diag/rdbms/yoon/yoon/trace
[oracle@yoon trace]$ ls -ltr --查詢最新的 ‘XXX.trc' 檔案 即:yoon_ora_7891.trc
[oracle@yoon trace]$ vi yoon_ora_7891.trc
[oracle@yoon backup]$ cat yoon_ora_7891.trc
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "YOON" NORESETLOGS NOARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 '/u01/oracle/oradata/yoon/redo01.log' SIZE 50M BLOCKSIZE 512,
GROUP 2 '/u01/oracle/oradata/yoon/redo02.log' SIZE 50M BLOCKSIZE 512,
GROUP 3 '/u01/oracle/oradata/yoon/redo03.log' SIZE 50M BLOCKSIZE 512
DATAFILE
'/u01/oracle/oradata/yoon/system01.dbf',
'/u01/oracle/oradata/yoon/sysaux01.dbf',
'/u01/oracle/oradata/yoon/undotbs01.dbf',
'/u01/oracle/oradata/yoon/users01.dbf'
CHARACTER SET ZHS16GBK
;
RECOVER DATABASE
-- Database can now be opened normally.
ALTER DATABASE OPEN;
-- Commands to add tempfiles to temporary tablespaces.
-- Online tempfiles have complete space information.
-- Other tempfiles may require adjustment.
ALTER TABLESPACE TEMP ADD TEMPFILE '/u01/oracle/oradata/yoon/TEMP01.DBF' REUSE;
--資料檔案改為小寫
SQL> STARTUP NOMOUNT
SQL> CREATE CONTROLFILE REUSE DATABASE "YOON" NORESETLOGS NOARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 '/u01/oracle/oradata/yoon/redo01.log' SIZE 50M BLOCKSIZE 512,
GROUP 2 '/u01/oracle/oradata/yoon/redo02.log' SIZE 50M BLOCKSIZE 512,
GROUP 3 '/u01/oracle/oradata/yoon/redo03.log' SIZE 50M BLOCKSIZE 512
DATAFILE
'/u01/oracle/oradata/yoon/system01.dbf',
'/u01/oracle/oradata/yoon/sysaux01.dbf',
'/u01/oracle/oradata/yoon/undotbs01.dbf',
'/u01/oracle/oradata/yoon/users01.dbf'
CHARACTER SET ZHS16GBK
;
SQL> RECOVER DATABASE;
5、關閉資料庫,更新資料字典
SQL> SHUTDOWN IMMEDIATE
SQL> startup upgrade;
SQL> @/u01/oracle/product/11.2.0/db_1/rdbms/admin/catupgrd.sql
SQL> @/u01/oracle/product/11.2.0/db_1/rdbms/admin/catalog.sql
6、啟動資料庫
SQL> STARTUP;
*注意windows下的oracle版本低,linux下的oracle版本高哦*
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28939273/viewspace-1061487/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Windows 遷移至 Linux(debian12) 實驗WindowsLinux
- Oracle資料遷移至MySQLOracleMySql
- windows平臺下Oracle10.2 RMAN資料庫遷移至Linux平臺下WindowsOracle資料庫Linux
- MSSQL Server 遷移至 ORACLE解決方案SQLServerOracle
- Oracle遷移:Linux->WindowsOracleLinuxWindows
- oracle之 RAC本地資料檔案遷移至ASMOracleASM
- 在Linux中從隱藏密碼遷移至tcbLinux密碼
- Oracle資料庫遷移 - 異構傳輸表空間TTS HP-UX遷移至Redhat Linux 7.7Oracle資料庫TTSRedhatLinux
- Oracle使用RMAN從Windows遷移資料到LinuxOracleWindowsLinux
- oracle資料庫遷移-文件 -LINUX_TO_WINDOWSOracle資料庫LinuxWindows
- ESXI 遷移至KVM (V2V遷移)
- 在Linux中從隱藏密碼遷移至tcb(轉)Linux密碼
- oracle10g單例項遷移至3節點RACOracle單例
- Sql server 2005遷移至Oracle系列之一:生成表SQLServerOracle
- Hadoop Hive遷移至MaxComputeHadoopHive
- 【Mysql】Mysql遷移至postgrepsqlMySql
- virtualbox遷移至vcenter/vmware workstation
- 資料庫遷移至+ASM中資料庫
- 將blog遷移至MSN Space
- 本部落格已遷移至Wordpress~
- Oracle資料庫遷移至PolarDb(阿里雲資料庫)Oracle資料庫阿里
- 將表遷移至其他表空間
- Oracle 11G support different OS Platform DataGaurd ( windows and linux )OraclePlatformWindowsLinux
- Oracle RAC遷移至南大通用GBase 8c 解決方案Oracle
- 資料檔案遷移至其他磁碟組
- 部落格從 CloudBase 遷移至雲主機Cloud
- 應用遷移至 Android P 操作指南Android
- Sql server 2005遷移至Oracle系列之二:生成儲存過程SQLServerOracle儲存過程
- 【RMAN】Oracle使用rman將11.2.0.4資料庫遷移至Oracle12c命令參考Oracle資料庫
- virt-v2v工具自動遷移vmware遷移至kvm
- Oracle12c遷移-某風險報告類系統升級暨遷移至12c-3Oracle
- Oracle12c遷移-某風險報告類系統升級暨遷移至12c-2Oracle
- Oracle12c遷移-某風險報告類系統升級暨遷移至12c-1Oracle
- 禪道遷移(windows_to_linux)WindowsLinux
- 由 Windows 向 Linux 遷移字型WindowsLinux
- 記錄 WSL 從 C 盤遷移至 D 盤
- JBOSS EAP 5專案遷移至JBOSS EAP 6
- PVE虛擬機器遷移至VMware平臺虛擬機