Skip to main content

11gR2 database migration from Windows (32-bit) to Linux (64-bit) OS

DATABASE MIGRATION (Windows 32-Bit to Linux 64-Bit)
AIM:  Migrate the database from Windows 32-bit to Linux 64 bit Operating System.
Environment:
                1. Oracle 11.2.0.1 on Windows 32-bit server
                2. Linux 5 installed on server
Requirements:
                1. Oracle 11G Software for Linux 64 bit.
                2. WinScp
                3. Putty
               
Procedure:
Prepare Source Side for Migration:


1. Check whether the source is compatible with target OS
               
SQL> select * from V$DB_TRANSPORTABLE_PLATFORM where PLATFORM_NAME=’Microsoft Windows IA (32-bit)’ or PLATFORM_NAME like ‘Linux%’

PLATFORM_ID PLATFORM_NAME ENDIAN_FORMAT
———– ——————————————— ————–
 Microsoft Windows IA (32-bit) Little
 Linux IA (32-bit) Little
 Linux IA (64-bit) Little
 Linux x86 64-bit Little

2.    Start the database in read only mode
In order to execute dbms_tdb.check_db the database must be opened on read only mode.
SQL> shutdown immediate;
SQL> startup mount;
SQL> alter database open read only;
 3.    Check database readiness for transport from Windows to Linux
If the execution of dbms_tdb.check_db does not return any exceptions, that means the database is ready for transport to the target platform.
SQL> set serveroutput on
SQL> declare
 db_ready boolean;
 begin
db_ready := dbms_tdb.check_db(‘Linux IA (32-bit)’);
end;
/
PL/SQL procedure successfully completed.
4.    Check if there are any external objects
If there is any external objects take note of them, they will need to be taken care manually
SQL> set serveroutput on
SQL> declare
external boolean;
begin
dbms_tdb.check_external displays report of external objects
external := dbms_tdb.check_external;
end;
/
The following directories exist in the database:
SYS.DATA_PUMP_DIR, SYS.ORACLE_OCM_CONFIG_DIR, SYS.ADMIN_DIR, SYS.WORK_DIR
PL/SQL procedure successfully completed.
 5.    Using the RMAN CONVERT DATABASE Command
having executed successfully the checkup steps, the database is open in read only mode, then the convert database command can be executed with rman.
We are changing the database name from “ORCL” to “ORCLUX”.
D:> rman target / nocatalog
RMAN> CONVERT DATABASE ON TARGET PLATFORM
CONVERT SCRIPT 'D:\OracleHome\convertscript.rman'
TRANSPORT SCRIPT 'D:\OracleHome\transport_at_target.sql'
new database 'ORCLUX'
FORMAT 'D:\OracleHome\%U';
This will generate the Script in "D:\OracleHome" folder:
For initfile:
“INIT_00P5F7M1_1_0.ORA”
Importantly you will find transport script ‘D:\OracleHome\transport_at_target.sql’
and Convert Script 'D:\OracleHome/convertscript.rman'


************************************************************
Transfer these files from Windows to Linux "INIT_00P5F7M1_1_0.ORA", "convertscript.rman" and "transport_at_target.sql" along with all the database files.
************************************************************

TARGET SIDE (LINUX SYSTEM) 

Install the Oracle 11G Database Software
1. Edit the transferred INIT script and make necessary changes like path for control file, name of Undo Tablespace and keep it in $ORACLE_HOME/dbs folder.
2. Keep all the datafile, controlfiles and redo files under folder "/u01/OracleHome/oradata"
3. Edit the transportscript file and make necessary changes and Run this script the changes should be like this.
*************** TRANSPORT_TO_TARGET.SQL ***************
STARTUP NOMOUNT PFILE='D:\ORACLEHOME\INIT_00P5F7M1_1_0.ORA'
CREATE CONTROLFILE REUSE  SET DATABASE "ORCLUX" RESETLOGS  NOARCHIVELOG
    MAXLOGFILES 16
    MAXLOGMEMBERS 3
    MAXDATAFILES 100
    MAXINSTANCES 8
    MAXLOGHISTORY 292
LOGFILE
  GROUP 1 ''/u01/OracleHome/oradata/ARCH_D-ORCLUX_ID-1347435757_S-2005_T-1_A-819655023_03P5F7M1'  SIZE 50M
BLOCKSIZE 512,
  GROUP 2 '/u01/OracleHome/oradata/ARCH_D-ORCLUX_ID-1347435757_S-2003_T-1_A-819655023_04P5F7M1'  SIZE 50M
BLOCKSIZE 512,
  GROUP 3 ''/u01/OracleHome/oradata/ARCH_D-ORCLUX_ID-1347435757_S-2004_T-1_A-819655023_05P5F7M1'  SIZE 50M BLOCKSIZE 512
DATAFILE
  '/u01/OracleHome/oradata/SYSTEM01.DBF'
  '/u01/OracleHome/oradata/SYSAUX01.DBF'
'/u01/OracleHome/oradata/UNDOTBS01.DBF'
'/u01/OracleHome/oradata/USERS01.DBF'
'/u01/OracleHome/oradata/EXAMPLE01.DBF'
'/u01/OracleHome/oradata/OLAPDB.DBF'
'/u01/OracleHome/oradata/INFDB.DBF'
'/u01/OracleHome/oradata/DACDB.DBF'
'/u01/OracleHome/oradata/DEV_MDS.DBF'
'/u01/OracleHome/oradata/DEV_BIPLATFORM.DBF'
'/u01/OracleHome/oradata/NEPD.DBF'
'/u01/OracleHome/oradata/DEV1_BIPLATFORM.DBF'
'/u01/OracleHome/oradata/DEV1_MDS.DBF'
CHARACTER SET AL32UTF8
;
***************************************************************
4. Once Done creating the control file follow the steps below. These must be done manually.
5. Run the Convert Script using RMAN.

RMAN CONVERT SCRIPT 

RUN {
CONVERT DATAFILE '/u01/OracleHome/oradata/SYSTEM01.DBF'
FROM PLATFORM 'Microsoft Windows IA (32-bit)'
FORMAT '/u01/OracleHome/oradata/linux/SYSTEM01.DBF';

CONVERT DATAFILE '/u01/OracleHome/oradata/SYSAUX01.DBF'
FROM PLATFORM 'Microsoft Windows IA (32-bit)'
FORMAT '/u01/OracleHome/oradata/linux/SYSAUX01.DBF';

CONVERT DATAFILE '/u01/OracleHome/oradata/UNDOTBS01.DBF'
FROM PLATFORM 'Microsoft Windows IA (32-bit)'
FORMAT '/u01/OracleHome/oradata/linux/UNDOTBS01.DBF';

CONVERT DATAFILE '/u01/OracleHome/oradata/USERS01.DBF'
FROM PLATFORM 'Microsoft Windows IA (32-bit)'
FORMAT '/u01/OracleHome/oradata/linux/USERS01.DBF';

CONVERT DATAFILE '/u01/OracleHome/oradata/EXAMPLE01.DBF'
FROM PLATFORM 'Microsoft Windows IA (32-bit)'
FORMAT '/u01/OracleHome/oradata/linux/EXAMPLE01.DBF';

CONVERT DATAFILE '/u01/OracleHome/oradata/OLAPDB.DBF'
FROM PLATFORM 'Microsoft Windows IA (32-bit)'
FORMAT '/u01/OracleHome/oradata/linux/OLAPDB.DBF';

CONVERT DATAFILE '/u01/OracleHome/oradata/INFDB.DBF'
FROM PLATFORM 'Microsoft Windows IA (32-bit)'
FORMAT '/u01/OracleHome/oradata/linux/INFDB.DBF';

CONVERT DATAFILE '/u01/OracleHome/oradata/DACDB.DBF'
FROM PLATFORM 'Microsoft Windows IA (32-bit)'
FORMAT '/u01/OracleHome/oradata/linux/DACDB.DBF';

CONVERT DATAFILE '/u01/OracleHome/oradata/DEV_MDS.DBF'
FROM PLATFORM 'Microsoft Windows IA (32-bit)'
FORMAT '/u01/OracleHome/oradata/linux/DEV_MDS.DBF';

CONVERT DATAFILE '/u01/OracleHome/oradata/DEV_BIPLATFORM.DBF'
FROM PLATFORM 'Microsoft Windows IA (32-bit)'
FORMAT '/u01/OracleHome/oradata/linux/DEV_BIPLATFORM.DBF';

CONVERT DATAFILE '/u01/OracleHome/oradata/NEPD.DBF'
FROM PLATFORM 'Microsoft Windows IA (32-bit)'
FORMAT '/u01/OracleHome/oradata/linux/NEPD.DBF';

CONVERT DATAFILE '/u01/OracleHome/oradata/DEV1_BIPLATFORM.DBF'
FROM PLATFORM 'Microsoft Windows IA (32-bit)'
FORMAT '/u01/OracleHome/oradata/linux/DEV1_BIPLATFORM.DBF';

CONVERT DATAFILE '/u01/OracleHome/oradata/DEV1_MDS.DBF'
FROM PLATFORM 'Microsoft Windows IA (32-bit)'
FORMAT '/u01/OracleHome/oradata/linux/DEV1_MDS.DBF';
}
*********************************************
5. After Conversion of Datafile compatible with Linux OS, SHUT DOWN the database and Move the datafile from '/u01/OracleHome/oradata/linux' to '/u01/OracleHome/oradata'
6. Now start the database in Mount State and Recover using logs.
7. Once recovery is completed, open using resetlogs and perform the following.
                7.1          Open database with resetlogs option
                7.2          Add tempfiles to temporary tablespaces.
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.
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='D:\ORACLEHOME\INIT_00P5F7M1_1_0.ORA'
@ORACLE_HOME/rdbms/admin/utlirp.sql
SHUTDOWN IMMEDIATE
STARTUP PFILE='D:\ORACLEHOME\INIT_00P5F7M1_1_0.ORA'
-- The following step will recompile all PL/SQL modules.
-- It may take serveral hours to complete.
@ORACLE_HOME/rdbms/admin/utlrp.sql


Comments

Popular posts from this blog

Node id does not exist for the current application server id

Issue: After completing cloning procedure, you generally may across the following issue. "Node id does not exist for the current application server id". Solution: First stop the application. Run adgendbc.sh script to configure apps tier dbc file with the correct id from the database instance. Start the application and test your issue. Location of script: 11i: $COMMON_TOP/admin/install/$CONTEXT_NAME R12: $INST_TOP/admin/install [appldev@erptest install]$ sh adgendbc.sh (Note: It will prompt you to give apps username and apps password.)

How to change EBS R12 database and application port number

On Database Tier 1. Logon as oracle database user and source environment for R12 RDBMS ORACLE_HOME 2. Start database instance for which you want to change R12 port 3. Backup contextfile 4. Change as below in contextfile         dbport  : Change database port from 1521 to 1541         db_ons_localport : 6300 to 6320         db_ons_remoteport : 6400 to 6420         cmanport : 1521 to 1541 5. Run adautocfg.sh On Apps Tier Change Application port from 8000 to 8020 1. Logon as application manager user and source environment for R12 2. Backup contextfile 3. Run adpreclone    $ perl ./adpreclone.pl appsTier 4. Run adcfgclone and choose new port pool    $ cd $COMMON_TOP/clone/bin    $ perl ./adcfgclone.pl appsTier 5. Check new application URL SQL> select home_url from icx_parameters; HOME_URL ----------...

Oracle R12 : You are trying to access a page that is no longer active

Login fails “You are trying to access a page that is no longer active.” The issue can be reproduced at will with the following steps: Issue : After cloning process the login page of Oracle E-Business Suite R12 show the above error. Solution :  For this you need to update the new hostname in the  icx_parameteres table 1.   SQL> SELECT SESSION_COOKIE_DOMAIN FROM icx_parameters; SESSION_COOKIE_DOMAIN --------------------- erp.local.com (This is hostname of Source Application Tier) 2. SQL>update icx_parameters set SESSION_COOKIE_DOMAIN = ‘target.local.com’; 1 row updated. SQL> commit; Commit complete. (This has changed the SESSION_COOKIE_DOMAIN of target application to target hostname.domain_name) 3. SQL> SELECT SESSION_COOKIE_DOMAIN FROM icx_parameters; SESSION_COOKIE_DOMAIN --------------------- target.local.com