crossplatform migration usin rman
TRANSCRIPT
-
8/13/2019 Crossplatform Migration Usin RMAN
1/18
Cross-Platform Migration using Rman Convert DatabaseMis jour Mardi, 27 Mars 2012 14:42
Cross-Platform Migration using Rman Convert Database
The proposed methodology is not a SAP supported migration methodology. Following asuccessful migration and a GoLive OS Migration Check Analysis, SAP will resume support of
the migrated system given the GoLive check is successful.
The procedure below describes the process between AIX and HP-UX.
On source system
1 / 18
-
8/13/2019 Crossplatform Migration Usin RMAN
2/18
Cross-Platform Migration using Rman Convert DatabaseMis jour Mardi, 27 Mars 2012 14:42
- Check that source and destination database have equal / greater than 10.2.0 version
SQL> select version from v$instance;
VERSION
-----------------
10.2.0.2.0
- Check that the source and destination platform belong to same ENDIAN format
SQL> set linesize 200
SQL> set pages 999
SQL> select PLATFORM_NAME, ENDIAN_FORMAT from
V$TRANSPORTABLE_PLATFORM;
PLATFORM_NAME ENDIAN_FORMAT
----------------------------------------------------------------------------------------------------- --------------
2 / 18
-
8/13/2019 Crossplatform Migration Usin RMAN
3/18
Cross-Platform Migration using Rman Convert DatabaseMis jour Mardi, 27 Mars 2012 14:42
Solaris[tm] OE (32-bit) Big
Solaris[tm] OE (64-bit) Big
Microsoft Windows IA (32-bit) Little
Linux IA (32-bit) Little
AIX-Based Systems (64-bit) Big
HP-UX (64-bit) Big
HP Tru64 UNIX Little
HP-UX IA (64-bit) Big
Linux IA (64-bit) Little
HP Open VMS Little
...
3 / 18
-
8/13/2019 Crossplatform Migration Usin RMAN
4/18
Cross-Platform Migration using Rman Convert DatabaseMis jour Mardi, 27 Mars 2012 14:42
19 rows selected.
- Identify datafiles that contain undo segments (only those will be converted)
SQL>select distinct(file_name) from dba_data_files a, dba_rollback_segs b where
a.tablespace_name=b.tablespace_name;
FILE_NAME
--------------------------------------------------------------------------------
/oracle/SID/sapdata1/undo_1/undo.data1
/oracle/SID/sapdata1/system_1/system.data1
- Open database in read only mode
4 / 18
-
8/13/2019 Crossplatform Migration Usin RMAN
5/18
Cross-Platform Migration using Rman Convert DatabaseMis jour Mardi, 27 Mars 2012 14:42
SQL> shutdown immediate;
SQL> startup mount;
SQL> alter database open read only;
- Check whether the database can be transported to the HP-UX IA platform
SQL> set serveroutput on
SQL>declare db_ready boolean;
begin db_ready := dbms_tdb.check_db('HP-UX IA (64-bit)');
end;
/
PL/SQL procedure successfully completed.
- Check whether external tables, directories or BFILEs exist. RMAN are unable to
transport such files
SQL> set serveroutput on
SQL>declare external boolean;
5 / 18
-
8/13/2019 Crossplatform Migration Usin RMAN
6/18
Cross-Platform Migration using Rman Convert DatabaseMis jour Mardi, 27 Mars 2012 14:42
begin external := dbms_tdb.check_external;
end;
/
The following directories exist in the database:
SYS.DATA_PUMP_DIR
PL/SQL procedure successfully completed.
- Run RMAN CONVERT DATABASE command on the source platform with ON
TARGET PLATFORM argument
RMAN> connect target /
RMAN> convert database on target platform
convert script '/convertdb/convert.rman'
transport script '/convertdb/transport.sql'
new database ''
6 / 18
-
8/13/2019 Crossplatform Migration Usin RMAN
7/18
Cross-Platform Migration using Rman Convert DatabaseMis jour Mardi, 27 Mars 2012 14:42
format '/convertdb/%U';
This command produces 3 files in /convertdb (or any other staging area): a transport script tocreate a new database, a convert script containing RMAN CONVERT DATAFILE command for
each of the datafiles and a PFILE for the new database containing the same settings as the
source database
- Copy the following files to the destination host:
1. transport.sql
2. convert.rman
3. Pfile generated by the convert database command.
4. Copy system and undo datafiles to stage area
5. Copy rest of datafiles to final location on destination server
On target system
7 / 18
-
8/13/2019 Crossplatform Migration Usin RMAN
8/18
Cross-Platform Migration using Rman Convert DatabaseMis jour Mardi, 27 Mars 2012 14:42
- Edit the init.ora and change the environment specific parameters
- Create a dummy Controlfile in order to convert
SQL>startup nomount;
SQL> CREATE CONTROLFILE REUSE DATABASE "" RESETLOGS NOARCHIVELOG
MAXLOGFILES 255
MAXLOGMEMBERS 3
MAXDATAFILES 254
MAXINSTANCES 50
MAXLOGHISTORY 1168
LOGFILE
GROUP 1 (
'/oracle/SID/origlogA/log_g11m1.dbf',
'/oracle/SID/mirrlogA/log_g11m2.dbf'
8 / 18
-
8/13/2019 Crossplatform Migration Usin RMAN
9/18
Cross-Platform Migration using Rman Convert DatabaseMis jour Mardi, 27 Mars 2012 14:42
) SIZE 50M,
GROUP 2 (
'/oracle/SID/origlogB/log_g12m1.dbf',
'/oracle/SID/mirrlogB/log_g12m2.dbf'
) SIZE 50M,
GROUP 3 (
'/oracle/SID/origlogA/log_g13m1.dbf',
'/oracle/SID/mirrlogA/log_g13m2.dbf'
) SIZE 50M,
GROUP 4 (
'/oracle/SID/origlogB/log_g14m1.dbf',
9 / 18
-
8/13/2019 Crossplatform Migration Usin RMAN
10/18
Cross-Platform Migration using Rman Convert DatabaseMis jour Mardi, 27 Mars 2012 14:42
'/oracle/SID/mirrlogB/log_g14m2.dbf'
) SIZE 50M
-- STANDBY LOGFILE
DATAFILE
'/oracle/stage/system.data1',
'/oracle/stage/undo.data1',
'/oracle/SID/sapdata1/sysaux_1/sysaux.data1',
'/oracle/SID/sapdata2/sr3_1/sr3.data1',
'/oracle/SID/sapdata2/sr3_2/sr3.data2',
'/oracle/SID/sapdata2/sr3_3/sr3.data3',
'/oracle/SID/sapdata2/sr3_4/sr3.data4',
'/oracle/SID/sapdata3/sr3700_1/sr3700.data1',
10 / 18
-
8/13/2019 Crossplatform Migration Usin RMAN
11/18
Cross-Platform Migration using Rman Convert DatabaseMis jour Mardi, 27 Mars 2012 14:42
'/oracle/SID/sapdata3/sr3700_2/sr3700.data2',
'/oracle/SID/sapdata3/sr3700_3/sr3700.data3',
'/oracle/SID/sapdata3/sr3700_4/sr3700.data4',
'/oracle/SID/sapdata4/sr3usr_1/sr3usr.data1'
CHARACTER SET UTF8;
- Edit the file convert.rman only for system and undo tablespaces. Once the changes are
done run the script from rman prompt
RUN {
CONVERT DATAFILE '/oracle/stage/undo.data1'
FROM PLATFORM ' AIX-Based Systems (64-bit)'
FORMAT ' /oracle/SID/sapdata1/undo_1/undo.data1';
11 / 18
-
8/13/2019 Crossplatform Migration Usin RMAN
12/18
Cross-Platform Migration using Rman Convert DatabaseMis jour Mardi, 27 Mars 2012 14:42
CONVERT DATAFILE '/oracle/stage/system.data1'
FROM PLATFORM ' AIX-Based Systems (64-bit)'
FORMAT '/oracle/SID/sapdata1/system_1/system.data1';
}
RMAN> connect target / nocatalog @convert.rman
- Shutdown the database and delete the dummy controlfile
- Edit the transport.sql script to reflect the new path for datafiles and redolog files in the
CREATE CONTROLFILE section of the script. Also change all references to the init.ora in
the script to the new path name of the init.ora
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "" RESETLOGS NOARCHIVELOG
MAXLOGFILES 255
12 / 18
-
8/13/2019 Crossplatform Migration Usin RMAN
13/18
Cross-Platform Migration using Rman Convert DatabaseMis jour Mardi, 27 Mars 2012 14:42
MAXLOGMEMBERS 3
MAXDATAFILES 254
MAXINSTANCES 50
MAXLOGHISTORY 1168
LOGFILE
GROUP 1 (
'/oracle/SID/origlogA/log_g11m1.dbf',
'/oracle/SID/mirrlogA/log_g11m2.dbf'
) SIZE 50M,
GROUP 2 (
'/oracle/SID/origlogB/log_g12m1.dbf',
13 / 18
-
8/13/2019 Crossplatform Migration Usin RMAN
14/18
Cross-Platform Migration using Rman Convert DatabaseMis jour Mardi, 27 Mars 2012 14:42
'/oracle/SID/mirrlogB/log_g12m2.dbf'
) SIZE 50M,
GROUP 3 (
'/oracle/SID/origlogA/log_g13m1.dbf',
'/oracle/SID/mirrlogA/log_g13m2.dbf'
) SIZE 50M,
GROUP 4 (
'/oracle/SID/origlogB/log_g14m1.dbf',
'/oracle/SID/mirrlogB/log_g14m2.dbf'
) SIZE 50M
-- STANDBY LOGFILE
DATAFILE
14 / 18
-
8/13/2019 Crossplatform Migration Usin RMAN
15/18
Cross-Platform Migration using Rman Convert DatabaseMis jour Mardi, 27 Mars 2012 14:42
'/oracle/SID/sapdata1/system_1/system.data1',
'/oracle/SID/sapdata1/undo_1/undo.data1',
'/oracle/SID/sapdata1/sysaux_1/sysaux.data1',
'/oracle/SID/sapdata2/sr3_1/sr3.data1',
'/oracle/SID/sapdata2/sr3_2/sr3.data2',
'/oracle/SID/sapdata2/sr3_3/sr3.data3',
'/oracle/SID/sapdata2/sr3_4/sr3.data4',
'/oracle/SID/sapdata3/sr3700_1/sr3700.data1',
'/oracle/SID/sapdata3/sr3700_2/sr3700.data2',
'/oracle/SID/sapdata3/sr3700_3/sr3700.data3',
'/oracle/SID/sapdata3/sr3700_4/sr3700.data4',
15 / 18
-
8/13/2019 Crossplatform Migration Usin RMAN
16/18
Cross-Platform Migration using Rman Convert DatabaseMis jour Mardi, 27 Mars 2012 14:42
'/oracle/SID/sapdata4/sr3usr_1/sr3usr.data1'
CHARACTER SET UTF8
;
ALTER DATABASE OPEN RESETLOGS;
ALTER TABLESPACE PSAPTEMP ADD TEMPFILE '/oracle/SID/sapdata1/temp_1/temp.data1'
SIZE 314572800 AUTOEXTEND OFF;
set echo off
prompt
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prompt * Your database has been created successfully!
prompt * There are many things to think about for the new database. Here
prompt * is a checklist to help you stay on track:
prompt * 1. You may want to redefine the location of the directory objects.
16 / 18
-
8/13/2019 Crossplatform Migration Usin RMAN
17/18
Cross-Platform Migration using Rman Convert DatabaseMis jour Mardi, 27 Mars 2012 14:42
prompt * 2. You may want to change the internal database identifier (DBID)
prompt * or the global database name for this database. Use the
prompt * NEWDBID Utility (nid).
prompt~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SHUTDOWN IMMEDIATE
STARTUP UPGRADE PFILE='/oracle//102_64/dbs/init.ora'
@@ ?/rdbms/admin/utlirp.sql
SHUTDOWN IMMEDIATE
STARTUP PFILE='/oracle/SID/102_64/dbs/init.ora'
@@ ?/rdbms/admin/utlrp.sql
set feedback 6;
17 / 18
-
8/13/2019 Crossplatform Migration Usin RMAN
18/18
Cross-Platform Migration using Rman Convert DatabaseMis jour Mardi, 27 Mars 2012 14:42
- Once the pfile and transport.sql are correctly modified invoke sqlplus and run the
transport.sql script