Aix to linux migration

ursvenkat’s Blog

How to Migrate AIX to Linux Application Tier

AIX to Linux Application Tier Migration

Source: AIX Server MSWORA02

Target: Linux Server MSWSLX02

Application: EBS 11.5.10 CU2

Source System:

  1. Clone the desired AIX instance from FUNC on MSWORA02 to a new AIX TEST instance on MSWORA02
  2. Verify the following:
    1. Database level is greater than 8.1.7.4
    2. AD mini-pack is 11i.AD.G or later: “sqlplus apps/apps @$AD_TOP/sql/adutconf.sql”
  3. Apply Oracle patch 3453499 to the new TEST Instance
  4. Log in as the APPLMGR user (testappl)
  5. Generate the manifest of customer-specific files : “$perl $AD_TOP/bin/adgenpsf.pl”
  6. Navigate to the URL: http://updates.oracle.com/PlatformMigration and upload the “$APPL_TOP/admin/$TWO_TASK/out/adgenpsf.txt” file.
  7. Copy the middle tier file system from the Source to the Target System:
    1. “#cd /oracle/testappl”
    2. “#tar cvf testappl.tar *”
    3. “#cd /oracle/testcomn”
    4. “#tar cvf testcomn.tar *”
    5. “#ftp testappl.tar ”
    6. “#fts testcomn.tar”

Target System:

  1. Verify the following:
    1. Source Applications system was created with Rapid Install version 11.5.9 or greater
    2. Perl is version 5.005 or greater: “#perl –version”
    3. Linux kernel is 2.6.9-5 or greater: “#uname –a”

Download the jdk 1.4.2-15 from Sun website. Install in “/usr/j2sdk1.4.2-15”

  1. Apply the following operating system patches if not already installed:
    1. Install libaio-0.3.105-2.i386.rpm: “#up2date libaio”
    2. Install libaio-devel-0.3.105-2.i386.rmp: “%up2date libaio-devel”
    3. Install the xorg-x11-deprecated-libs-6.8.2-1.EL.13.i386.rpm: “#up2date xorg-x11-deprecated-libs”
    4. Install the xorg-x11-deprecated-libs-devel-6.8.2-1.EL.13.i386.rpm: “#up2date xorg-x11-deprecated-libs-devel”

Apply the rpm’s sent via the Oracle patch request: compat-oracle-rhe4-1.0-5.i386.rpm and compat-libcwait-2.1-1.i386.rpm

    1. “#rpm –ihv compat-oracle-rhe4-1.0-5.i386.rpm”
    2. “#rpm –ihv compat-libcwait-2.0-1.i386.rpm”

Create the application user and group for the system:

    1. “#groupadd –g500 mdba”
    2. “#useradd –d /home/applmigd –g mdba”
  1. Create the new APPL_TOP on the target system:
    1. “#mkdir /oracle/migdappl”
    2. “#mkdir /oracle/migdcomn”
  2. Move the APPL_TOP source files to the appropriate directory:
    1. “#cp /tmp/testappl.tar /oracle/migdappl
    2. “#cp /tmp/testcomn.tar /oracle/migdcomn”
    3. “#cd /oracle/migdappl”
    4. “#tar xvf testappl.tar”
    5. “cd /oracle/migdbcomn”
    6. “#tar xvf testcomn.tar”
    7. “#rm /oracle/migdappl/testappl.tar /oracle/migdcomn/testcomn.tar”
    8. “#chown –R migdappl:mdba /oracle/migdappl /oracle/midgcomn”
  3. Remove the unwanted directories and files:
    1. “#cd /oracle/migdcomn”
    2. “#rm –rf admin temp portal rgf”
    3. “#mv clone clone.old”
    4. “#rm /oracle/migdappl/admin/appltop.cer”
  4. Change to the newly created applmigd user: “#su – applmigd”
  5. Run the Clone Context Tool to assign new mount points on the target system:
    1. “$cd /oracle/migdappl/ad/11.5.0/bin”
    2. “$perl adclonectx.pl migrate java=/usr/j2sdk1.4.2_15 contextfile=/oracle/migdappl/admin/TEST_mswora03.xml”
    3. Output
  1. Do you want to use a virtual hostname for the target node (y/n) [n] ?:n
  2. Does the target system have more than one application tier server node (y/n) [n]
  3. Is the target system APPL_TOP divided into multiple mount points (y/n) [n] ?:n
  4. Target system APPL_TOP mount point [/oracle/migdappl]:
  5. Target system COMMON_TOP directory [/oracle2/testcomn]:/oracle/migdcomn
  6. Do you want to preserve the Display set to mswora03:0.0 (y/n) [y] ?:n
  7. Target system Display [mswslx08:0.0]:
  8. Location of the JDK on the target system [/usr/java14]:/usr/j2dsk1.4.2_15/bin
  9. Target system JRE_TOP [/usr/java14]:/usr/j2sdk1.4.2_15/jre
  10. Enter the Database listener port [1521]:1524
  11. Enter APPS Password [APPS]:apps
  12. UTL_FILE_DIR on database tier consists of the following directories.
  13. 1. /usr/tmp
  14. 2. /usr/tmp
  15. 3. /oracle2/testdb/10.2.0/appsutil/outbound/TEST_mswora03
  16. 4. /usr/tmp
  17. Choose a value which will be set as APPLPTMP value on the target node [1]:1
  18. 8.0.6 ORACLE_HOME = “/oracle/migdora/8.0.6”
  19. iAS ORACLE_HOME = “/oracle/migdora/iAS”
  20. Apps OS User = applmigd
  21. Apps OS Group = mdba
  1. Create the /etc/oraInst.loc file which contains the location for the oratab file. (permissions 666)
  2. Create Directory /etc/oraInventory (permission 777)
  3. run /tmp/runIntaller.sh as root
  4. At the Windows prompt type: “xhost +”
  5. Install the middle tier technology stack
    1. Open Metalink Note 146468.1
    2. Open a terminal window on mswslx08 as root and type “xhost +”
    3. Change user to applmigd
    4. Run the rapidwiz as “/oracle/R11-Linux/startCD/Disk1/rapidwiz/rapidwiz – techstack”
    5. Choose the “9iAS 1.0.2.2.” option
    6. Choose the file “/oracle/applmigd/admin/TEST_mswslx08.xml”
    7. Create the following directories:
Читайте также:  Windows phone с телевизором

Create temporary environment variable file for target instance:

Источник

dbavivekdhiman

My notes

Cross platform migration from Aix (Oracle 11.2.0.3) to Linux(11.2.0.3)

Recently we did migration of multiple production data-warehouse databases with maximum size of 8 TB. The main challenges was to migrate the databases in minimal downtime; we have tested traditional approach and then XTT method that is little bit tricky and error-prone but the downtime required in XTT method is far less than traditional one, our R&D was still going on and we found the simplest method using image copy that is also very less downtime approach. Here are the detail steps we used to accomplish this migration.

Prerequisite are same as for XTTS method

  • The source database must have its COMPATIBLE parameter set to 10.2.0 or higher.
  • The source database’s COMPATIBLE parameter must not be greater than the destination database’s COMPATIBLE parameter.
  • The source database must be in ARCHIVELOG mode.
  • RMAN on the source system must not have DEVICE TYPE DISK configured with COMPRESSED.
  • The set of tablespaces being moved must all be online, and contain no offline data files. Tablespaces must be READ WRITE.

Step 1 -> Self Contains Checks (Source DB online)

Check the self-containing property of all the tablespace on source and it should’nt have any violations.

Exec sys.dbms_tts.transport_set_check(‘STAGING’, TRUE);
select * from sys.transport_set_violations;

Step 2 -> Check Endian format (Source DB online)

Check the platform details in our case it’s different endian that we need to do extra conversion step later.

select * from v$transportable_platform order by platform_id;

Step 3 -> Install the destination databases software and create a blank database (Source DB online)

Читайте также:  Firefox mac os что это

# Install Software binaries with same components as in source DB.

# Create a blank database using same configuration as source :

$ UNDO, SYSTEM,TEMP and SYSAUX tablespace size

$ Character set and National Character set.

$ Change Maxlogfiles, maxlogmembers and the important one is MAXDATAFILES (In our case its huge datawarehouse database and number of datafiles are approx. 1200 and increasing on monthly basis).

# Create manually or exp/imp non-default users in destination database same as in source db.

expdp userid=\”/ as sysdba\” directory=TTS LOGFILE=user_imp_RMSP.log FULL=y INCLUDE=USER,ROLE,ROLE_GRANT,PROFILE dumpfile=USER_ROLES_GRANT.dmp CONTENT=METADATA_ONLY

impdp userid=\”/ as sysdba\” directory=TTS dumpfile=USER_ROLES_GRANT.dmp

NOTE :- Before creating users, we need to create a dummy default tablespace in destination and drop after creating user, so later we will not face any kind of issue.

ON Source : select distinct default tablespace from dba_users ;

Create above all tablespaces in destination database with just a single 1 mb file and drop after imp or creation of users.

Step 4 -> Take RMAN Image copy of source database. (Source DB online)

Take the RMAN image copy backup using below script, make necessary changes as per the need. We don’t need SYSTEM, SYSAUX and UNDO but we can’t exclude system and sysaux in full backup so due to huge size of UNDO in our case we are excluding it and for system and sysaux we will not use while plugin the tablespaces in destination database.

rman target / <>$LOG

CONFIGURE EXCLUDE FOR TABLESPACE UNDOTBS1;

CONFIGURE DEVICE TYPE DISK PARALLELISM 15 BACKUP TYPE TO copy;

BACKUP INCREMENTAL LEVEL 0 as copy DATABASE TAG ‘FULL_TEST’ FORMAT ‘/backup/MIGRATION_TEST/BKP/%N_%f.xtf’;

NOTE :- Make changes in undo tablespace name if it’s different and also increase/decrease channels as per the server capacity.

Step 5 > Apply incremental on image copy backup taken in step 4. (Source DB online)

This step is a repetitive until you have decided to do final cutover for migration.

rman target / <>$LOG

CONFIGURE DEVICE TYPE DISK PARALLELISM 25 BACKUP TYPE TO backupset;

BACKUP INCREMENTAL LEVEL 1 FOR RECOVER OF COPY WITH TAG ‘FULL_TEST’ DATABASE FORMAT ‘/backup/MIGRATION_TEST/BKP/%U’;

RECOVER COPY OF DATABASE WITH TAG ‘FULL_TEST’;

NOTE :- TAG is important here and same as in step 4.

Step 6 > Once final cutover time is decided, we need to apply final INC on image copy. (Source DB offline, downtime start)

6.1 > Put All the permanent tablespaces in read only.

select tablespace_name from dba_tablespaces where contents = ‘PERMANENT’ and tablespace_name not in(‘SYSTEM’,’SYSAUX’);

alter tablespace tablespace_name read only;

6.2 > Apply Final incremental on image copy :

rman target / <>$LOG

CONFIGURE DEVICE TYPE DISK PARALLELISM 25 BACKUP TYPE TO backupset;

BACKUP INCREMENTAL LEVEL 1 FOR RECOVER OF COPY WITH TAG ‘FULL_TEST’ DATABASE FORMAT ‘/backup/MIGRATION_TEST/BKP/%U’;

Читайте также:  Как поменять вид курсора мыши windows 10

RECOVER COPY OF DATABASE WITH TAG ‘FULL_TEST’;

6.3 > Copy image copy to Destination server or NFS mount the mount point.

Step 7 > Export the tablespaces metadata using below expdp. . (Source DB offline)

On Source :

expdp userid=\”/ as sysdba\” directory=TTS parfile=exp.par dumpfile=TRANSPORT_META_FINAL.dmp logfile= TRANSPORT_META_FINAL.log

exp.par :

transport_tablespaces=USERS,ABC1,ABC2 -> All tablespaces name you want to transport except SYSTEM,SYSAUX, UNDO and TEMP.

Step 8 > Restoration /Conversion of image backup. (Source DB offline)

While expdp is running for step 6.4, we can parallel restore/convert image copy on destination server once image backup scp/ftp completed.

Image backup destination is: – /backup/MIGRATION_TEST/BKP/

Converted Datafile location is: – /u01/oradata/data/

convert from platform ‘AIX-Based Systems (64-bit)’ datafile

format ‘/u01/oradata/data/%N_%f.Dbf’ parallelism 60;

Note: –

1. EXCLUDE SYSTEM AND SYSAUX DATAFILES FROM THE BACKUP, WE DON’T NEED TO CONVERT OR PLUGIN IN THE DESTINATION SIDE, ITS VERY IMPORT.

2. In our case source platform is AIX 64 bit so change this accordingly.

Step 9> Plugin tablespaces into destination database, once export is over as per step 7.

impdp \’/ as sysdba\’ directory=tts dumpfile= TRANSPORT_META_FINAL.dmp logfile= TRANSPORT_META_FINAL.log parfile=imp.par EXCLUDE=TRIGGER

NOTE :- We exclude trigger as while importing facing some issues and this is the workaround,so check accordingly.

After plugin all the tablespaces would be in read only mode, so just make them read write on destination side.

Step 10 > Post Migration missing objects Issues/Fixes (Source DB offline)

$ Missing Objects, it could be possible that multiple objects like public synonyms, Materialized views are missing on destination side, we can check and recreate accordingly as below:

  • Missing objects details :- Create a db link LINK_OLD on destination database that point to source database (sys user) .

col object_name for a55

select a.owner, a.object_type, a.object_name , a.created

from dba_objects@LINK_OLD a

where a.owner not in (‘XDB’,’MDSYS’,’ORDDATA’,’SYS’,’SYSMAN’,’DBSNMP’,’SYSTEM’,

and not exists (select b.object_name from dba_objects b

where b.owner = a.owner and b.object_type = a.object_type

and b.object_name = a.object_name)

and a.object_name not like ‘SYS_%’

order by a.owner, a.object_type, a.object_name

  • For missing public synonyms, use below pl/sql block to get the create statements and just simply run on destination side:

set serveroutput on

cursor cur_objects is

select a.owner, a.SYNONYM_NAME,a.TABLE_NAME,a.TABLE_OWNER

from dba_synonyms@LINK_OLD a

where a.owner not in (‘XDB’,’MDSYS’,’ORDDATA’,’SYS’,’SYSMAN’,’DBSNMP’,’SYSTEM’,

not exists (select b.SYNONYM_NAME from dba_synonyms b

where b.owner = a.owner

and b.SYNONYM_NAME = a.SYNONYM_NAME)

and a.object_name not like ‘SYS_%’

order by a.owner, a.SYNONYM_NAME;

for rec_objects in cur_objects loop

DBMS_OUTPUT.PUT_LINE(‘create public synonym “‘ || rec_objects.SYNONYM_NAME || ‘” for “‘ ||rec_objects.TABLE_OWNER ||’”.”‘||rec_objects.TABLE_NAME || ‘”;’);

  • And for materialized view, simply fetch the DDL through DBMS.METADATA from source and recreate with prebuilt clause.

Suggestions/Queries and Feedback are always welcome.

Источник

Оцените статью