Wednesday, August 24, 2011

Steps to change IP address of Oracle Application Server (J2EE and WebCache)


Hi Everyone,

Hope we you all are doing well. Here we will discuss about to change IP address or/And Hostname of server which only J2EE and WebCache Installed.

Below are the steps for changing IP Address And/or Hostname by using chgiphost.sh command.

 Located at $ORACLE_HOME/chgip/scripts.

STEP 1] Stop all J2EE instance services (Mid Tier)

            A) Go To $MID_HOME/opmn/bin
                        Give following command to stop opmn processes.
                        . /opmnctl stopall

            B) Go to $MID_HOME /bin
                        Give following command to stop em console.
                        . /emctl stop iasconsole      

STEP 2] Take Entire application server backup.

STEP 3] Note down the old IP- address and old hostname (if hostname is going to change) of the server.

STEP 4] change the IP/Hostname of the server, restart the server if required.

STEP 5] Check that the IP-Address and hostname in /etc/hosts is correct

STEP 6] Check that you are able to ping from other machine to that server.

STEP 7] Go to $MID_HOME /chgip/scripts

STEP 8] Run sh chgiphost.sh -mid

STEP 9] After excuting above command we have to specify NEW and OLD IP Or/And Hostname

When prompted for destination IP/Hostname enter new IP/Hostname.
        When Prompted for source IP/Hostname enter enter Old IP/Hostname
        When prompted for OIDAdmin password enter orcladmin password.

STEP 10] Check for any errors in $MID_HOME /chgip/log/

STEP 11] Start j2ee services using following method.

            A) Go to $MID_HOME /opmn/bin
            . /opmnctl startall

B) Go to $MID_HOME /bin
            . /emctl start iasconsole

STEP 12] Check all services are started properly.

I hope it will help you in changing Oracle Application Server IP/ Hostname.

Enjoy working with Middleware.

Regards,
Ajinkya Vichare

Ajinkya-vichare.blogspot.com

REP-56105: Engine rwEng-0 died with Error


Hello Everyone,

We faced one more severity one issue after restarting Windows server, we unable to start report services on Oracle Application Server. Other services were up but report service is in INIT state for some time and then it gets crashes.

After checking all the logs and trace file , I have found below error/exception :

logged in the rwserver.trc file:

Exception 56105 (): Engine rwEng-0 died with error:
oracle.reports.RWException: IDL:oracle/reports/RWException:1.0
at oracle.reports.utility.Utility.newRWException(Utility.java:758)
at oracle.reports.server.EngineManager.manage(EngineManager.java:344)
at oracle.reports.server.IdleThread.run(IdleThread.java:88)

and the following errors are logged in rwEng-0.trc file:

Exception 50125 (org.omg.CORBA.DATA_CONVERSION: vmcid: SUN minor code: 202 completed: No
at com.sun.corba.se.internal.corba.ORB.string_to_object(ORB.java:2038)
at oracle.reports.engine.RWEngine.init(RWEngine.java:290)
at oracle.reports.engine.RWEngine.main(RWEngine.java:60)
): Internal error org.omg.CORBA.DATA_CONVERSION: vmcid: SUN minor code: 202 completed: No


After researching on google and Metalink, I have found cause and resolution for the same;


Cause

Reports server uses the folder mentioned in REPORTS_TMP to create temporary files while starting up.

If the directory name mentioned in the REPORTS_TMP is not valid or if it contains spaces or if it is in a mapped drive where the logged in user does not have rights or if the drive allocated does not contain enough memory space, these errors will be shown.
Solution

Steps to Resolve:

  STEP 1. Edit the Windows registry using a registry editor

      Note:  Before you edit the registry, back it up.

   STEP 2. Navigate to the following key:

      HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOMEn

      Where n is the number of the ORACLE_HOME containing the installation
      (You can find the ORACLE key name in the file <ORACLE_HOME>\bin\oracle.key)

 STEP 3. Add a new String value named REPORTS_TMP and set the value to a valid directory without spaces and set it to a local drive.(for example: D:\reportstmp)


      Note: Its always recommended to set the REPORTS_TMP to C:\windows\temp.

You can also check following Metalink article for the same:

REP-56105: Engine rwEng-0 died with Error, when starting the Reports Server in Windows [ID 400855.1]

It helps me a lot; I hope it will help you too

Enjoy working with Middleware…

Regards,
Ajinkya Vichare
ajinkya-vichare.blogspot.com

Thursday, August 18, 2011

Steps to change IP address of Oracle Application Server (Infrastructure Tier and Business Inteligence)

Hi Everyone,

Few months back i had done activity for changing IP of Oracle Application Server 10.1.2.3.0 for Infrastructure and Business Intelligence.

We have to Change the IP address of server on which Infrastructure and forms are installed.

Let me tell you

Note: Changing Hostname where infrastructure is installed is not supported method. It is not recommended to change hostname. Only Changing IP-Address is supported method.

Following are the steps which i have followed while doing the activity :
   
In following document the IP Address will be changed using chgiphost.sh command.

Located at $ORACLE_HOME/chgip/scripts.

STEP 1] Stop all services mid-tier plus infra
   
Stopping Mid –Tier
   
A) Go To $MID_HOME/opmn/bin
        . /opmnctl stopall
B) Go to $MID_HOME /bin

Give following command to stop em console.
        . /emctl stop iasconsole   
          
Stopping INFRA-Tier

A) Go To $INFRA_HOME/opmn/bin
          . /opmnctl stopall
           
 B) Go to $INFRA_HOME/bin
  
Give following command to stop em console.
        . /emctl stop iasconsole
   
 C) Go to $INFRA_HOME/opmn/bin
       Stop lsnrctl
              ./lsnrctl stop

  D) Go to $INFRA_HOME/opmn/bin
         Connect to Infra database
                 ./sqlplus “/as sysdba”
                 ./shut immediate

STEP 2] Take complete backup of application server.

STEP 3] Change the IP-address of the server, Reboot If required.

STEP 4] Check that the IP-Address and hostname in /etc/hosts is correct.

STEP 5] Check that you are able to ping from other machine.

STEP 6] Set ORACLE_SID, ORACLE_HOME to infrastructure database.


STEP 7] Start Infrastructure database.
     Go to $INFRA_HOME/bin
        ./sqlplus “/as sysdba”
        Startup

STEP 8] Start database listener
    Go to $INFRA_HOME/bin
        ./lsnrctl start

STEP 9] Start opmn service
    Go To $INFRA_HOME/opmn/bin
        ./opmnctl start

STEP 10] Start OID
    Go To $INFRA_HOME/opmn/bin
        ./opmnctl startproc ias-component=OID process-type=OID

STEP 11] Run Chgiphost script.
    Go to $INFRA_HOME/chgip/scripts
        Sh chgiphost.sh  -infra

STEP 12] After excuting above command we have to specify NEW and OLD IP with orcladmin password :

       When prompted for destination IP enter new IP.
       When Prompted for source IP enter Old IP.
       When prompted for OIDAdmin password enter orcladmin password

STEP 13] Check for any errors in $INFRA_HOME/chgip/log

STEP 14] Startall opmn service
    Go To $INFRA_HOME/opmn/bin
        ./opmnctl startall

Check the status of opmn services.

STEP 15] Go to $MID_HOME

STEP 16] Set $ORACLE_HOME path to $MID_HOME

STEP 17]
Go to $MID_HOME/chgip/scripts
        chgiphost.sh –mid

STEP 18] After excuting above command we have to specify NEW and OLD IP with orcladmin password :

       When prompted for destination IP enter new IP.
       When Prompted for source IP enter Old IP.
       When prompted for OIDAdmin password enter orcladmin password.

STEP 19]
Check for any error in $MID_HOME/chgip/log

STEP 20] Start all services as follows:
      
       A) Go To $INFRA_HOME/opmn/bin
                  ./opmnctl startall

       B) Go To $INFRA_HOME/bin
                  . /emctl start iasconsole

      C) Go To $Mid_ORACLE_HOME/opmn/bin
        . /opmnctl startall

      D) Go to $MID_HOME/bin
                    . /emctl start iasconsole


STEP 20]
Check status from front-end.

It works for me because i did this activity for changing IP from OLD to NEW.


I hope it will help you while doing IP change activity..

Will post blog on how TO CHANGE IP ADDRESS AND/OR HOSTNAME OF J2EE & WEB CACHE very soon.. Till then Enjoyy working with Middleware

Regards,
Ajinkya Vichare
ajinkya-vichare.blogspot.com

Wednesday, August 17, 2011

Upgrading the Oracle Application Server 10g (10.1.2|10.1.4) Seeded Database from 10.1 to 10.2


Hi Everyone,
Today I have come across the requirement where one of my client wants to upgrade Oracle Application Server seeded database from 10.1 to 10.2. Main reason for doing the activity was not to use de-supported version of oracle product. We really appreciate the clients concerns.
After doing surfing on Google and oracle Metalink. finally i have found one document which is so much useful for making this activity successful.
For upgrading Oracle Infra database from R1 to R2 check metalink ID : 376689.1 
Below are the steps which we have to follow for oracle Application server seeded Database from R1 to R2.


STEP 1.
We have to Install Oracle Database Server 10g Release 2 (10.2.0.1) Database Software Only on the same host as the current Oracle Database Server 10g Release 1 (10.1) which contains the Metadata Repository (MR)
STEP 2. Using the Oracle Database Server 10g Release 2 (10.2) Companion CD, install Ultrasearch in the same ORACLE_HOME just created for the 10.2 RDBMS Software.
NOTE:
·         When prompted for "Select a Product to Install", select middle option "Oracle Database 10g Products 10.2.0.1.0"
·         Install in the same ORACLE_HOME where RDBMS 10g 10.2.0.1 was installed

STEP 3. Run the Database Upgrade Assistant (DBUA) from new 10.2 ORACLE_HOME to upgrade the 10.1 Metadata Repository Database to the new 10.2 version.

NOTE:
  • The DBUA will find all available database available to upgrade

    Be sure to select the one associated with your MR Database
  • You may receive a warning saying that the instance version does not match the dictionary version. It will ask to run the 10.1 ORACLE_HOME/rdbms/admin/catpatch.sql to resolve conflict. For this, shutdown the database and open in upgrade mode.

    SQL> STARTUP UPGRADE
    SQL>@$ORACLE_HOME/rdbms/admin/catpatch.sql

    After completion of the above, check for Invalid Objects and recompile

    SQL>$ORACLE_HOME/rdbms/admin/utlrp.sql

    Shutdown the DB 10.1 and restart as normal

    SQL> SHUTDOWN
    SQL> STARTUP

STEP 4. Run netca from new 10.2 ORACLE_HOME/bin and configure a new TNS Listener.
NOTE:
  • Can keep the default name, or rename to what is desired.
  • Recommend using the same port that was in use by old listener

STEP 5.
Copy the tnsnames.ora, sqlnet.ora from source ORACLE_HOME/network/admin
to the destination $ORACLE_HOME/network/admin

STEP 6. Edit the source 10.1 ORACLE_HOME/config/ias.properties and change the Install Type from "Infrastructure" to "Infrastructure_ID".
NOTE: If the source Database is in a non-collocated (MR Only) ORACLE_HOME, then no change is necessary to the ias.properties.

STEP 7. Run the following select statement to verify that no INVALID objects are
within the database.

SQL> select object_name, object_type, owner from dba_objects where status='INVALID';

There should be no invalid objects. If there are, run $ORACLE_HOME/rdbms/admin/utlrp.sql

STEP 8. At this point, the new Oracle Database 10.2 and Listener should be running and may be administered and maintained as normal. The Application Server Infrastructure components can be started using opmnctl startall to check for functionality.
We have to check all the services which are given below:
  • From original Infrastructure:
      opmnctl startall
  • $ORACLE_HOME/bin/ldapbind -p 389 --> Bind Successful
  • Start AS Console from Infrastructure
      emctl start iasconsole
  • Start AS Console from any middle-tier
      emctl start iasconsole
  • Use AS Console to start all remaining components and test

STEP 9. The following are instructions to apply the 10.2.0.2 Patchset, which was performed during the testing of this upgrade process to ensure proper functionality going forward. Any newer Oracle Database Patchset may be applied.

Do the following
- Stop listener
- Shutdown database
- Stop DBConsole
- Backed up DB
- Unzipped the p4547817_10202_LINUX.zip
   -- Substitute for your platform
- cd to uncompressed Disk1 location and execute runInstaller
- After Patch is applied, startup DB using SQL> STARTUP UPGRADE
- Run $ORACLE_HOME/rdbms/admin/catupgrd.sql
- Check log that was spooled for errors
- Check for invalids and run utlrp.sql
- SQL> SHUTDOWN
- SQL> STARTUP

STEP 10. Restart Infrastructure and Midtier Components

STEP 11. When finished, the datafiles, controlfiles, and dump destination directories and files may still be in the source ORACLE_HOME unless this was moved before to a central location.

It solve clients requirement and concerns, I hope will help you while upgrading oracle application server seeded database from R1 to R2.

I hope it will help you …
Enjoyy working with Middleware.

Regards,
Ajinkya Vichare

ajinkya-vichare.blogspot.com