rman將linux平臺資料庫遷移到window平臺資料庫
今天測試了一下將linux平臺的oracle資料庫遷移到windows平臺下[@more@]
1.準備pfile,將linux上的pfile copy到window下,修改相應的目錄
2.啟動到nomount 階段orcl.__db_cache_size=134217728orcl.__java_pool_size=4194304
orcl.__large_pool_size=4194304
orcl.__oracle_base='D:app'#ORACLE_BASE set from environment
orcl.__pga_aggregate_target=218103808
orcl.__sga_target=411041792
orcl.__shared_io_pool_size=0
orcl.__shared_pool_size=247463936
orcl.__streams_pool_size=8388608
*._kghdsidx_count=4
*.audit_file_dest='D:appadminorcladump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='D:apporadataorclcontrol01.ctl','D:apporadataorclcontrol02.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_name='orcl'
*.diagnostic_dest='D:app'
*.memory_max_target=629145600
*.memory_target=629145600
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'*.undo_tablespace='UNDOTBS1'
oradim –new –sid prod –startmode manual –pfile d:oracle…….pfileinitprod.ora
C:>sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on 星期六 1月 5 11:11:21 2013
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 626327552 bytes
Fixed Size 2178336 bytes
Variable Size 482345696 bytes
Database Buffers 134217728 bytes
Redo Buffers 7585792 bytes
SQL> create spfile from pfile;
File created.
SQL> shutdown immediate
ORA-01507: ??????
ORACLE instance shut down.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 626327552 bytes
Fixed Size 2178336 bytes
Variable Size 482345696 bytes
Database Buffers 134217728 bytes
Redo Buffers 7585792 bytes
3.啟動到mount階段
C:>rman target /
Recovery Manager: Release 11.2.0.1.0 - Production on 星期六 1月 5 11:14:13 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: ORCL (not mounted)
RMAN> restore controlfile from 'd:c-1326955037-20130103-00';
Starting restore at 05-1月 -13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=5 device type=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
output file name=D:APPORADATAORCLCONTROL01.CTL
output file name=D:APPORADATAORCLCONTROL02.CTL
Finished restore at 05-1月 -13
RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1
4.將從linux上copy到window下的備份 加入到controlfile中.
RMAN> catalog backuppiece 'd:201212302unu6mab_1_1';
cataloged backup piece
backup piece handle=D:201212302UNU6MAB_1_1 RECID=102 STAMP=803906255
RMAN> catalog backuppiece 'd:2012123130nu9amd_1_1';
cataloged backup piece
backup piece handle=D:2012123130NU9AMD_1_1 RECID=103 STAMP=803906256
RMAN> catalog backuppiece 'd:2013010132nubv2c_1_1';
cataloged backup piece
backup piece handle=D:2013010132NUBV2C_1_1 RECID=104 STAMP=803906256
RMAN> catalog backuppiece 'd:2013010234nuejed_1_1';
cataloged backup piece
backup piece handle=D:2013010234NUEJED_1_1 RECID=105 STAMP=803906257
RMAN> catalog backuppiece 'd:2013010336nuh7qd_1_1';
cataloged backup piece
backup piece handle=D:2013010336NUH7QD_1_1 RECID=106 STAMP=803906261
5.restore database
RMAN> run{2> allocate channel c1 type disk;
3> allocate channel c2 type disk;
4> set newname for datafile 1 to 'D:apporadataorclsystem01.dbf';
5> set newname for datafile 2 to 'D:apporadataorclsysaux01.dbf';
6> set newname for datafile 3 to 'D:apporadataorclundotbs01.dbf';
7> set newname for datafile 4 to 'D:apporadataorclusers01.dbf';
8> set newname for datafile 5 to 'D:apporadataorclhissaas_data01.dbf';
9> set newname for datafile 6 to 'D:apporadataorclhissaas_data02.dbf';
10> set newname for datafile 7 to 'D:apporadataorclsaas_data01.dbf';
11> restore database;
12> switch datafile all;
13> release channel c1;
14> release channel c2;
15> }
allocated channel: c1
channel c1: SID=192 device type=DISK
allocated channel: c2
channel c2: SID=5 device type=DISK
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 05-1月 -13
channel c1: starting datafile backup set restore
channel c1: specifying datafile(s) to restore from backup set
channel c1: restoring datafile 00001 to D:apporadataorclsystem01.dbf
channel c1: restoring datafile 00002 to D:apporadataorclsysaux01.dbf
channel c1: restoring datafile 00003 to D:apporadataorclundotbs01.dbf
channel c1: restoring datafile 00004 to D:apporadataorclusers01.dbf
channel c1: restoring datafile 00005 to D:apporadataorclhissaas_data01.dbf
channel c1: restoring datafile 00006 to D:apporadataorclhissaas_data02.dbf
channel c1: restoring datafile 00007 to D:apporadataorclsaas_data01.dbf
channel c1: reading from backup piece /rmanbackup/201212302unu6mab_1_1
channel c1: errors found reading piece handle=/rmanbackup/201212302unu6mab_1_1
channel c1: failover to piece handle=D:201212302UNU6MAB_1_1 tag=TAG20121230T223803
channel c1: restored backup piece 1
channel c1: restore complete, elapsed time: 00:09:56
Finished restore at 05-1月 -13
datafile 1 switched to datafile copy
input datafile copy RECID=8 STAMP=803908655 file name=D:APPORADATAORCLSYSTEM01.DBF
datafile 2 switched to datafile copy
input datafile copy RECID=9 STAMP=803908656 file name=D:APPORADATAORCLSYSAUX01.DBF
datafile 3 switched to datafile copy
input datafile copy RECID=10 STAMP=803908656 file name=D:APPORADATAORCLUNDOTBS01.DBF
datafile 4 switched to datafile copy
input datafile copy RECID=11 STAMP=803908656 file name=D:APPORADATAORCLUSERS01.DBF
datafile 5 switched to datafile copy
input datafile copy RECID=12 STAMP=803908657 file name=D:APPORADATAORCLHISSAAS_DATA01.DBF
datafile 6 switched to datafile copy
input datafile copy RECID=13 STAMP=803908657 file name=D:APPORADATAORCLHISSAAS_DATA02.DBF
datafile 7 switched to datafile copy
input datafile copy RECID=14 STAMP=803908658 file name=D:APPORADATAORCLSAAS_DATA01.DBF
released channel: c1
released channel: c2
5.recover database
有個奇怪的問題,把recover database放在上面的restore指令碼中,會有ora-01110,ora-01157的錯誤,奇怪了
RMAN> run{
2> recover database;
3> }
6.接下來就是開啟資料庫
SQL> alter database backup controlfile to trace as 'd:bakcontrol.sql';Database altered.SQL> STARTUP NOMOUNT
ORACLE instance started.
Total System Global Area 626327552 bytes
Fixed Size 2178336 bytes
Variable Size 482345696 bytes
Database Buffers 134217728 bytes
Redo Buffers 7585792 bytesSQL> CREATE CONTROLFILE REUSE DATABASE "ORCL" RESETLOGS NOARCHIVELOG2 MAXLOGFILES 163 MAXLOGMEMBERS 34 MAXDATAFILES 1005 MAXINSTANCES 86 MAXLOGHISTORY 2927 LOGFILE8 GROUP 1 'D:APPORADATAORCLredo01.log' SIZE 50M BLOCKSIZE 512,9 GROUP 2 'D:APPORADATAORCLredo02.log' SIZE 50M BLOCKSIZE 512,10 GROUP 3 'D:APPORADATAORCLredo03.log' SIZE 50M BLOCKSIZE 512,11 GROUP 4 'D:APPORADATAORCLredo04.log' SIZE 50M BLOCKSIZE 51212 DATAFILE13 'D:APPORADATAORCLSYSTEM01.DBF',14 'D:APPORADATAORCLSYSAUX01.DBF',15 'D:APPORADATAORCLUNDOTBS01.DBF',16 'D:APPORADATAORCLUSERS01.DBF',17 'D:APPORADATAORCLHISSAAS_DATA01.DBF',18 'D:APPORADATAORCLHISSAAS_DATA02.DBF',19 'D:APPORADATAORCLSAAS_DATA01.DBF'20 CHARACTER SET AL32UTF821 ;Control file created.SQL> alter database open resetlogs;Database altered.SQL> ALTER TABLESPACE TEMP ADD TEMPFILE 'D:APPORADATAORCLtemp01.dbf' size 10m;
Tablespace altered.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24237320/viewspace-1060004/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 資料庫平臺資料庫
- 【資料庫學習】資料庫平臺:mysql,sql server資料庫MySqlServer
- 用rman遷移資料庫資料庫
- MySQL資料庫遷移到PostgresMySql資料庫
- 跨平臺資料庫 Realm 整合實踐資料庫
- 科研資料庫備案平臺簡介(RDD)資料庫
- DBA福利-資料庫線上實訓平臺資料庫
- TDS:標籤平臺+API平臺+資料共享平臺,助力資料運營平臺建設API
- 重新定義資料庫雲平臺—沃趣科技資料庫雲版圖資料庫
- 全平臺資料(資料庫)管理工具 DataCap 管理 Rainbond 上的所有資料庫資料庫AI
- 資料平臺、大資料平臺、資料中臺……還分的清不?大資料
- JetBrains DataGrip 2024.2 (macOS, Linux, Windows) - 資料庫和 SQL 跨平臺 IDEAIMacLinuxWindows資料庫SQLIDE
- 圖資料庫平臺建設及業務落地資料庫
- EAS附件表由資料庫遷移到FTP資料庫FTP
- Facebook將花費幾年時間將資料庫遷移到MySQL 8.0資料庫MySql
- 【RMAN】Oracle使用rman將11.2.0.4資料庫遷移至Oracle12c命令參考Oracle資料庫
- Pinterest為何遷移到新的大資料處理工作流平臺Apache Airflow?REST大資料ApacheAI
- linux mysql資料庫遷移LinuxMySql資料庫
- 關於後臺資料庫設計的考慮(手機平臺)資料庫
- 京東資料庫智慧運維平臺建設之路資料庫運維
- 使用JDBC操作SAP雲平臺上的HANA資料庫JDBC資料庫
- odps平臺將資料匯入到hdfs
- 你的資料庫真的需要遷移到雲嗎?資料庫
- 【MOS】如何利用RMAN可傳輸表空間遷移資料庫到不同位元組序的平臺(文件 ID 1983639.1)資料庫
- Oracle資料庫遷移到國產資料庫核心難點解析 | 聯盟釋出Oracle資料庫
- 【資料遷移】XTTS跨平臺傳輸表空間v3(2.RMAN增量)TTS
- SequoiaDB巨杉資料庫攜手民生銀行分散式資料管理平臺資料庫分散式
- 構建資料庫雲管平臺 實現資料價值最大化資料庫
- 巨杉資料庫入選中國資料管理分析平臺格局報告資料庫
- 資料庫市場格局已變,統一的管理平臺將成為資料庫生態體系的主要入口資料庫
- StackGres 1.6 資料庫平臺工程功能介紹以及快速上手資料庫
- 9.微信公眾平臺開發 - 資料庫操作資料庫
- vivo資料庫與儲存平臺的建設和探索資料庫
- Unity平臺 | 快速整合華為AGC雲資料庫服務UnityGC資料庫
- 介面平臺實用功能設計分享——資料庫校驗資料庫
- 達夢遷移工具之MySQL資料庫遷移到達夢MySql資料庫
- ETL資料整合,RestCloud資料整合平臺RESTCloud
- 大資料平臺是什麼?有哪些功能?如何搭建大資料平臺?大資料
- 用傳輸表空間跨平臺遷移資料