Oracle 10g to 11g database migration Experiment

Source: Internet
Author: User

Using rman for cross-database and cross-server migration
10g server: 192.168.182.20.oracle 10.2.0.1.0 RHEL 4 32bit

11g Server:
Server 192.168.182.131 OEL5.8 _ 32 Oracle 11.2.0.1.0 32bit
[Oracle @ oelr5u8-1 admin] $ uname-
Linux oelr5u8-1.localdomain 2.6.32-300.10.1.el5uek #1 SMP Wed Feb 22 17:22:40 EST 2012 i686 i686 i386 GNU/Linux
 
SYS @ PROD> select * from v $ version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-Production
PL/SQL Release 11.2.0.1.0-Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0-Production
NLSRTL Version 11.2.0.1.0-Production

Migrate the 10g Database PROD2 on the server 192.168.182.6.2 to the 11g database PROD4 on the server 192.168.182.131

1. Preparations
1.1 setup auxiliary instance
1.1.1 orapwd
On 131-source database server
Cd $ ORACLE_HOME/dbs
Orapwd file = orapwPROD4 password = oracle

1.1.2 export ORACLE_SID = PROD4
On 131

1.1.3 mkdir
On 131
Mkdir-p/u01/app/oracle/admin/PROD4/{a, B, c, u} dump
Mkdir-p/u01/app/oracle/oradata/PROD4/

1.1.4 pfile
On 133-target database server
Cd $ ORACLE_HOME/dbs
Sqlplus/as sysdba
Create pfile from spfile;

Scp initPROD2.ora oelr5u8-1:/u01/app/oracle/product/11.2.0/db_1/dbs/initPROD4.ora
 
On 131
Cd $ ORACLE_HOME/dbs
Vi initPROD4.ora
PROD2. _ db_cache_size = 167772160
PROD2. _ java_pool_size = 4194304
PROD2. _ large_pool_size = 4194304
PROD2. _ shared_pool_size = 100663296
PROD2. _ streams_pool_size = 0
*. Aq_tm_processes = 1
*. Audit_file_dest = '/u01/app/oracle/admin/PROD2/adump'
*. Background_dump_dest = '/u01/app/oracle/admin/PROD2/bdump'
*. Compatible = '10. 2.0.1.0'
*. Control_files = '/u01/app/oracle/oradata/PROD2/control01.ctl', '/u01/app/oracle/oradata/PROD2/control02.ctl ', '/u01/app/oracle/oradata/PROD2/control03.ctl'
*. Core_dump_dest = '/u01/app/oracle/admin/PROD2/cdump'
*. Db_block_size = 8192
*. Db_domain =''
*. Db_file_multiblock_read_count = 16
*. Db_name = 'prod2'
*. Dispatchers =''
*. Job_queue_processes = 10
*. Nls_language = 'simplified CHINESE'
*. Nls_territory = 'China'
*. Open_cursors = 300
*. Pga_aggregate_target = 94371840
*. Processses = 150
*. Remote_login_passwordfile = 'clusive'
*. Session_cached_cursors = 200
*. Sga_target = 285212672
*. Undo_management = 'auto'
*. Undo_tablespace = 'undotbs1'
*. User_dump_dest = '/u01/app/oracle/admin/PROD2/udump'

Changed to meet the requirements of the secondary instance and 11g Database.

PROD4. _ db_cache_size = 167772160
PROD4. _ java_pool_size = 4194304
Prod4. _ large_pool_size = 4194304
PROD4. _ shared_pool_size = 100663296
PROD4. _ streams_pool_size = 0
*. Aq_tm_processes = 1
*. Audit_file_dest = '/u01/app/oracle/admin/PROD4/adump'
*. Control_files = '/u01/app/oracle/oradata/PROD4/control01.ctl', '/u01/app/oracle/oradata/PROD4/control02.ctl ', '/u01/app/oracle/oradata/PROD4/control03.ctl'
*. Db_block_size = 8192
*. Db_domain =''
*. Db_file_multiblock_read_count = 16
*. Db_name = 'prod4'
*. Dispatchers =''
*. Job_queue_processes = 10
*. Nls_language = 'simplified CHINESE'
*. Nls_territory = 'China'
*. Open_cursors = 300
*. Pga_aggregate_target = 94371840
*. Processses = 150
*. Remote_login_passwordfile = 'clusive'
*. Session_cached_cursors = 200
*. Sga_target = 285212672
*. Undo_management = 'auto'
*. Undo_tablespace = 'undotbs1'
# For auxiliary instance
DB_FILE_NAME_CONVERT = 'prod2', 'prod4'
LOG_FILE_NAME_CONVERT = 'prod2', 'prod4'

1.1.5 startup nomount on auxiliary instance
On 131

Export ORACLE_SID = PROD4
Sqlplus/as sysdba
Create spfile from pfile = '/u01/app/oracle/product/11.2.0/db_1/dbs/initPROD4.ora ';
 
1.1.6 setup listener and tnsnames
On 133
Vi tnsnames. ora
Add:
PROD4_oelr5u8-1 =
(Description =
(Address = (protocol = tcp) (host = oelr5u8-1) (port = 1521 ))
(Connect_data =
(Server = dedicated)
(Service_name = PROD4)
)
)

On 131
Vi listener. ora
Add into sid_list_listener:
(Sid_desc =
(Global_dbname = PROD4)
(Oracle_home =/u01/app/oracle/product/11.2.0/db_1)
(Sid_name = PROD4
)

Lsnrctl start

Vi tnsnames. ora
PROD2_odd-oelr4u8 =
(Description =
(Address = (protocol = tcp) (host = odd-oelr4u8) (port = 1521 ))
(Connect_data =
(Server = dedicated)
(Service_name = PROD2)
)
)

1.2 check target database's backup
On 133
Ensure that archive log mode is on

Rman target/
List backup of database;
Note: cannot use backup as compressed backupset... errors will be reported when duplicating
 
2. duplicate

Rman target sys/oracle @ PROD2 auxiliary sys/oracle @ PROD4_oelr5u8-1

Recovery Manager: Release 10.2.0.1.0-Production on Sat Apr 5 15:37:35 2014

Copyright (c) 1982,200 5, Oracle. All rights reserved.

Connected to target database: PROD2 (DBID = 1490667694)
Connected to auxiliary database: PROD4 (not mounted)

RMAN> duplicate target database to PROD4;

Starting Duplicate Db at 05-APR-14
Using target database control file instead of recovery catalog
Allocated channel: ORA_AUX_DISK_1
Channel ORA_AUX_DISK_1: sid = 9 devtype = DISK

Contents of Memory Script:
{
Set until scn 768912;
Set newname for datafile 1
"/U01/app/oracle/oradata/PROD4/system01.dbf ";
Set newname for datafile 2
"/U01/app/oracle/oradata/PROD4/undotbs01.dbf ";
Set newname for datafile 3
"/U01/app/oracle/oradata/PROD4/sysaux01.dbf ";
Set newname for datafile 4
"/U01/app/oracle/oradata/PROD4/users01.dbf ";
Set newname for datafile 5
"/U01/app/oracle/oradata/PROD4/mgmt. dbf ";
Set newname for datafile 6
"/U01/app/oracle/oradata/PROD4/mgmt_ecm_depot1.dbf ";
Set newname for datafile 7
"/U01/app/oracle/oradata/PROD4/catalog_tbs01.dbf ";
Restore
Check readonly
Clone database
;
}
Executing Memory Script

Executing command: SET until clause

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-APR-14
Using channel ORA_AUX_DISK_1

Channel ORA_AUX_DISK_1: starting datafile backupset restore
Channel ORA_AUX_DISK_1: specifying datafile (s) to restore from backup set
Restoring datafile 00001 to/u01/app/oracle/oradata/PROD4/system01.dbf
Restoring datafile 00002 to/u01/app/oracle/oradata/PROD4/undotbs01.dbf
Restoring datafile 00003 to/u01/app/oracle/oradata/PROD4/sysaux01.dbf
Restoring datafile 00004 to/u01/app/oracle/oradata/PROD4/users01.dbf
Restoring datafile 00005 to/u01/app/oracle/oradata/PROD4/mgmt. dbf
Restoring datafile 00006 to/u01/app/oracle/oradata/PROD4/mgmt_ecm_depot1.dbf
Restoring datafile 00007 to/u01/app/oracle/oradata/PROD4/catalog_tbs01.dbf
Channel ORA_AUX_DISK_1: reading from backup piece/u01/app/oracle/product/10.2.0/db_1/dbs/06p4vq2u_1_1
ORA-19870: error while restoring backup piece/u01/app/oracle/product/10.2.0/db_1/dbs/06p4vq2u_1_1
ORA-19505: failed to identify file "/u01/app/oracle/product/10.2.0/db_1/dbs/06p4vq2u_1_1"
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Failover to previous backup

RMAN-00571: ========================================================== ==============================
RMAN-00569: ==================== error message stack follows ==========================
RMAN-00571: ========================================================== ==============================
RMAN-03002: failure of Duplicate Db command at 04/05/2014 15:37:45
RMAN-03015: error occurred in stored script Memory Script
RMAN-06026: some targets not found-aborting restore
RMAN-06023: no backup or copy of datafile 7 found to restore
RMAN-06023: no backup or copy of datafile 6 found to restore
RMAN-06023: no backup or copy of datafile 5 found to restore
RMAN-06023: no backup or copy of datafile 4 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 2 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore

I failed, but I still don't know how to do it later.

The Internet says this:
Duplicate is not equal to using 11 gb db software to directly open 10 Gb DB, and the Upgrade operation is still required.

What kind of upgrade operation is unknown.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.