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

Wednesday, August 3, 2011

Good Info - OPMN and Process Monitoring


Hi Everyone,

Today we will discuss about OPMN, I read some good information about OPMN (Oracle Process Manager Notification), so am sharing the some of the important points with explanation..

OPMN and Process Monitoring:

OPMN (Oracle Process monitoring and Notification services) are a set of processes that manage mid-tier Application Server components like Oracle HTTP Server (Apache) and OC4J containers.
OPMN consists of the Process Manager and the Notification Server.

(In Oracle 10g, OPMN manages all Application Server components except Oracle AS Metadata Repository and Application Server Control Console; it can be configured to manage Oracle AS Port Tunnel and custom processes because of its extensible design.)

Oracle Notification Server (ONS) is the transport mechanism for failure, recovery, startup and other related notifications between components in Oracle Application Server. It operates according to a publish-subscribe model: an Oracle AS component receives a notification of a certain type as per its subscription to ONS. When such a notification is published, ONS sends it to the appropriate subscribers.

Oracle Process Manager (PM) is the centralized process management mechanism in Oracle Application Server and is used to manage Oracle AS processes. It starts, stops, restarts and detects death of these processes. The Oracle AS processes that PM is configured to manage are specified in the opmn.xml file. The PM waits for a user command to start specific or all processes. When a specific or all processes are to be stopped, the PM receives a request as specified by the request parameters. OPMN is monitored by a shadow process that restarts upon request or after a catastrophic failure.

The PM uses ONS to:

  • detect that a process has completed initialization and is ready to receive requests
  • determine what ports are in use
  • obtain component specific runtime information

Four parameters determine the behavior of the Oracle Process Manager and Notification services process in managing the iAS middle tier comprising of OC4J instances and the Apache HTTP server.

They are as follows :

a) restart-on-death
b) ping timeout
c) ping interval
d) reverse-ping timeout

The settings for these parameters need to be governed by the heap sizing of the OC4J container JVMs, the latencies involved with garbage collection algorithms and the response times of the HTTP server.

The way in which the parameters affect the functioning of OPMN is as follows:

By default, as in the schema definition file, opmn.xsd, the restart-on-death parameter takes a default BOOLEAN value of “TRUE” which means that OPMN’s mandate is to ping the managed processes ( OC4J instances and Apache ) at certain pre-defined intervals, monitor them for a response within a certain specified timeout period and retry the operation 3 times before concluding that the process is dead due to its non-responsive state and killing and restarting it to guarantee that the managed processes are up and able to service client requests on an ongoing basis – this is OPMN’s mandate in ensuring failover and availability of the processes it manages.
Oracle HTTP Server

There could be a variety of reasons for the non-responsiveness of the Apache server :

  • due to a high load of concurrent requests competing for the web server’s attention
  • because of timeouts between the various modules of Apache and the servers servicing client requests
  • while it is in the middle of handling chunk data received from its modules
  • when it is involved with dealing with persistent connections that have fully used up the number of servers
  • it can spawn, with many connections remaining in the CLOSE_WAIT state
  • due to thrashing when NFS hiccups cause files that need to be served to be unavailable to it
  • Because of synchronization issues with the various mutexes that it needs to support for the proper functioning of its modules.

In any such case, due to Apache’s unresponsiveness over the ping period, OPMN will kill and restart

OHS as needed.
OC4J containers

In the case of the OC4J instances (Oracle containers for J2EE), OPMN follows similar logic to determine whether or not to kill and restart them. While the container is processing servlet or EJB logic within the JVM within which it runs, new objects get created in its heap memory area all the while.

When the garbage collection thread starts to run, it looks for objects that it can release to the heap memory pool based upon several algorithms that depend upon the kind of references the objects have to themselves. Since the collection is “generational”, i.e., objects having references are promoted to an older generation and presumed to have a longer lifetime, objects with weak references are candidates for “cleaning” up, and their occupied memory gets released to the global heap of the JVM.

In this way, memory is reclaimed back into the heap memory pool and made available for use in the creation of newer objects. The forays made by the garbage collector to reclaim memory in the heap are governed by several algorithms and every such collection takes a finite amount of time during which no other work of application processing is possible. And when the collection is over the entire heap, the full GC consists of a mark/sweep/compact cycles that “mark” the memory to be reclaimed, “sweep” the memory into the corresponding generations and “compact” the holes created when the memory is reclaimed, in order as to create contiguous memory for future object creation.

These strategies consume more time, as to be expected, and can result in a delay in the container responding to an OPMN ping cycle. During such full GC scans, OPMN can and will kill and restart the container, causing it to lose the state of the application or request it was processing at that time.

Since full GC scans (referred to as stop-the-world scans) can happen at any time during the lifetime of a request or an application, there is always the danger of OPMN killing a perfectly functioning container on the assumption that it was “hung” since it was “unresponsive”.
Heap memory settings for OC4J containers

These settings are made in the opmn.xml file in the <java-option> sections for each OC4J instance:

The settings for heap must include the -Xms (for start heap memory) and -Xmx (for maximum heap memory). Always use the “-server” option as the first option in the <java-option> sections, for Server HotSpot JVMs, best suited to long running JVMs in terms of performance. The recommended settings for the -Xmx value are 512MB as typical applications need that much of memory to avoid java.lang.OutOfMemoryError exceptions as seen from experience. Start with an -Xms value of 128MB to prevent side effects of “Too many files open” errors when this setting is higher, as garbage collection kicks in only later for higher -Xms values, resulting in open file handles not getting released by the GC.

<java-option>-server -Xms128M -Xmx512M

Thread pool sizing

In the server.xml file, set the thread-pool sizes as follows for optimum operation of the thread pool:

<global-thread-pool min=”40″ max=”40″ queue=”80″ keepAlive=”-1″/>

This sets the min and max thread-pool sizes to the same value and the keepAlive parameter to “-1″ – recommended for production environments, this will ensure that idle threads are never destroyed to allow for thread reuse without the overhead for new thread creation. The min, max and queue values can be left at the default as specified here.
Redundancy and load balancing

More than one OC4J instance can be started to accommodate the higher volume of concurrent requests that the container may need to handle. This is set through the “numProcs” parameter in the opmn.xml file and this parameter takes the value of 1 by default, to start a single OC4J instance. For multiple instances, the “numProcs” parameter can be adjusted to different values (2 for two instances, and so on ) and PM needs to be restarted with this value for the modules under its control. Very often, the applications that are being run may be process or memory intensive and may require one to adjust the value of the “numProcs” parameter to effect load-balancing via multiple instances.


I hope it will help you all while understanding OPMN. And if you have more information and any changes required in above post kindly update me..

Enjoyy working with Middleware technology…

Regards,
Ajinkya Vichare
ajinkya-vichare.blogspot.com

STOP REPORTS SERVER FROM STARTING UP AUTOMATICALLY.

Hi Everyone,

Following needs to be done to stop an auto restart of the reports server on AIX for 10g application server.

Step 1) Login as owner of 10g application server.

Stop all opmn services

cd $ORACLE_HOME/opmn/bin

./opmnctl stopall

Step 2) Take backup of rwservlet.properties files backup..

cd $ORACLE_HOME/reports/conf

cp rwservlet.properties rwservlet.properties.backup

Step 3) Edit $ORACLE_HOME/reports/conf/rwservlet.properties

Change

SERVER_IN_PROCESS=YES

To:

SERVER_IN_PROCESS=NO

Step 4) take back up of opmn.xml file

cd $ORACLE_HOME/opmn/conf

cp opmn.xml opmn.xml.backup.

Step 5) Edit $ORACLE_HOME/opmn/conf/opmn.xml.

Change
category id=”urlping-parameters”
data id=”/reports/rwservlet/pingserver?start=auto” value=”200″/

To:
category id=”urlping-parameters”
data id=”/reports/rwservlet/” value=”200″/

Step 6) start all opmn services ..

cd $ORACLE_HOME/opmn/bin

./opmnctl startall

This will stop the report server from starting automatically.

I hope this will help you… Enjoy working with middleware..

Regards,
Ajinkya Vichare
 

Thursday, June 23, 2011

How to Reset / Change ias_admin Password

Hi Everyone,

I came across the situation where i forget my ias_admin password of oracle Application server.
Below are the steps for reset/change ias_admin password.


You can reset/change ias_admin password in following ways

Step 1. Using Enterprise Manager (Application Server Control) Web Site:


–Login to Instance Home Page (ias-console)

–Click on Preferences on top right

–In new screen, click on “Change Password” on left menu

–Enter current password and New Password

.
2. Using Command line tool

we can also reset password of ias-console for oracle application server :

emctl set password <old_password> <new_password>

like

emctl set password oracle  oracle123(Here oracle is current ias_admin password and oracle123 is new password which you wish to reset)

If you don’t know current ias_admin password then change it in configuration file (And the last which i have faced problem)

.

3. Change ias_admin password directly in configuration file

–Backup /oracle/orainfra/sysman/j2ee/config/jazn-data.xml and /oracle/orabi/sysman/j2ee/config/jazn-data.xml

–Search for entry like below

  <user>
    <name>ias_admin</name>
      <credentials>{903}8QkQ/crno3lX0f3+67dj6WxW9KJMXaCu</credentials>
  </user>

and Update new password (oracle123 like )

  <user>
    <name>ias_admin</name>
      <credentials>!oracle123</credentials>
  </user>

Note ! (Exclamation Mark in front of password. This signifies that password is stored in clear text)

This helped me alot.. Hope it helps you too..

Enjoyy working with Middleware.

Regards,
Ajinkya Vichare



.

Friday, June 17, 2011

"OIMAuthenticationProvider is not specified" Error while Starting Managed Servers using Node manager in OIM 11g

Hi Everyone,


I have tried hands on OIM implementation in cluster mode but when i tried to start my Managed server, have receive following error while while Starting Managed Servers using Node manager in OIM 11g.
When attempting to start managed server using Node manager, having extended domain with Oracle Identity Manager the following error occurs.

Managed logs are given below :

<Jun 2, 2010 6:01:37 PM IST> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool>
<Jun 2, 2010 6:01:37 PM IST> <Notice> <Log Management> <BEA-170019> <The server log file /oracle/app/admin/IDMDomain/mserver/IDMDomain/servers/wls_ods1/logs/wls_ods1.log is opened. All server side log events will be written to this file.>
<Jun 2, 2010 6:01:37 PM IST> <Warning> <NodeManager> <BEA-300043> <Node manager native library not found - server process id not saved.>
<Jun 2, 2010 6:01:37 PM IST> <Error> <Socket> <BEA-000438> <Unable to load performance pack. Using Java I/O instead. Please ensure that libmuxer library is in :'/tmp/OraInstall2010-10-10_02-35-47PM/jre/lib/amd64/server:/tmp/OraInstall2010-10-10_02-35-47PM/jre/lib/amd64:/tmp/OraInstall2010-10-10_02-35-47PM/jre/../lib/amd64:/oracle/app/product/fmw/idm/lib:/oracle/app/product/fmw/idm/lib:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib:/oracle/app/product/fmw/idm/lib/:/oracle/app/product/fmw/idm/jdk/jre/lib/i386/:/oracle/app/product/fmw/wlserver_10.3/server/native/linux/i686:/oracle/app/product/fmw/idm/lib/'
>
Jun 2, 2010 6:01:42 PM oracle.security.jps.internal.policystore.util.PolicyStoreRefreshThread run
INFO: Policy store cleanup thread started.
<Jun 2, 2010 6:01:43 PM IST> <Error> <Security> <BEA-090870> <The realm "myrealm" failed to be loaded: weblogic.security.service.SecurityServiceException: com.bea.common.engine.ServiceInitializationException: com.bea.common.engine.SecurityServiceRuntimeException: [Security:097533]SecurityProvider service class name for OIMAuthenticationProvider is not specified..
weblogic.security.service.SecurityServiceException: com.bea.common.engine.ServiceInitializationException: com.bea.common.engine.SecurityServiceRuntimeException: [Security:097533]SecurityProvider service class name for OIMAuthenticationProvider is not specified.
at weblogic.security.service.CSSWLSDelegateImpl.initializeServiceEngine(CSSWLSDelegateImpl.java:342)

This issues has occured due to missing OIMAuthenticator.jar and oimsignaturembean.jar in the classpath on affected machine node.

To overcome this problem, you can follow the steps given below :

Solution :

Step 1) Copy OIMAuthenticator.jar and oimsignaturembean.jar from \Oracle\Middleware\Oracle_IDM1\server\loginmodule\wls\ location to affected machines location \Oracle\Middleware\wlserver_10.3\server\lib\mbeantypes on the affected machine.

2) Also add the location of these jar files into ALT_TYPES_DIR in the setDomainEnv.sh.

3) After copying jars, servers needs to be restarted for this to take effect.

[ Reference  : metalink note : 1271932.1 ]

Thanks to Oracle metalink..Will post OIM clustering very soon.....!

And enjoy working with Middleware technologies :).

Regards,
Ajinkya Vichare

Wednesday, June 15, 2011

Restarting the Application Server After a Crash - OID Failure


Dear All,


While working with oracle application server many of the people come accross the sevirity 1 issues for OID crash issues.

I also face the same many times, so today we will discuss about possible solutions for OID crash issue.

The Oracle Application Server 10g is a group of interdependent components.  Many times the application server will not restart after a crash or improper shutdown. The culprit is almost always the Oracle Internet Directory or OID.

If you get the error "1 of 4 Components Started" when running opmnctl startall, the problem is that OID is not being started.  The only infrastructure component not dependent on OID is the Oracle HTTP Server or  OHS.  No matter how many times you reboot the server, the application server will not start correctly without OID.

This problem happens in  9iAS and AS 10g

OID is started, stopped and monitored by a process called oidmon.  Oidmon will periodically check a database table called ods.ods_process to determine if an OID process needs to be started, stopped or restarted. It is the row in the ods_process table that usually causes the problem.  If the application server
crashed or was improperly shutdown, oidmon may not have been able to update the ods_process table.  When the application server restarts, oidmon will find the row in the table identifying a running OID process and so will not start OID. The fix is to remove the row in the ods_process tables.

There are two possible fixes.

First shutdown the application server, but not the metadata repository database.

On windows make sure that all the services set to automatic are started.  

On UNIX/Linux ensure the oidmon is running.

# ps -ef |grep oid

oracle 3331 3318 0 Mar30 ? 00:00:02     /oracle/orainfra/bin/oidmon

If OID is running you will get two other process called oidldap.  If you have all three processes, then starting OID is not your issue so this solution will not solve you problem.

oidmon must be running to start OID.  If oidmon is not running, start it with the command below:

ORACLE_HOME=C:\oracle\orainfra

$ORACLE_HOME/bin/oidmon start

On windows oidmon is a service, insure the Oracle<Infra>InternetDirectory_iasdb services is started.

Solution 1.  Using Windows -UNIX/Linux

Set the environment:

For windows Environment :

c:\> set ORACLE_HOME=c:\oracle\orainfra
c:\> set ORACLE_SID=iasdb

For Unix Environment :

Login with oracle user :

export ORACLE_HOME=/oracle/orainfra

export ORACLE_SID=iasdb

Log onto the database :

c:\> SQLPLUS "/ as sysdba"

SQL> select * from ods.ods_process;

Should get one line returned. If not go to solution 2.

SQL> deleted from ods.ods_process;
one line deleted

SQL> commit;
commit complete

SQL> exit

Now reboot the server to bring up the appsvr normally.

Solution 2;

If there is no entry in the ods.ods_process table then oidmon was never told to start OID. Here we need to tell oidmon to start OID.

for windows :

c:\oracle\orainfra\bin>oidctl server=oidldapd configset=0 instance=1 start

for Unix platform :

/oracle/orainfra/bin>./oidctl server=oidldapd configset=0 instance=1 start

Now restart the application server instances using opmnctl startall.

Once the Oracle Internet Directory is running, the other components should start normally

I hope it will help you while solving OID crash issues...

Enjoy working with Middleware Technologies...

Regards,
Ajinkya

Wednesday, April 20, 2011

How to Create Datasource in Websphere Application Server (ND)

Hello        

Today will discuss about Configuring a database connection between WebSphere Application Server V6.1 (Network Deployment) and Oracle Databse 10g.
 Below i have given only steps... I hope it will help you while creating datasource. This i have done at early stage of my carrier.. just posting you on demand some of my friends who are newbie on Websphere Application Server.

Step 1. Ensure that the odbc14.jar file is from Oracle 10g (10.2) or later. Older versions of this file will not work. If necessary, copy the needed version of the file to a folder on the WebSphere Application Server server (for example, D:\Oracle).
  
Step 2. Start the WebSphere Administrative Console.

Step 3. Log in using the user ID admin and the password admin (defined in the earlier section "Configuring security," above). 

Step 4. Set up the Oracle driver path.
         1. Click Environment in the navigation pane.
         2. Click WebSphere Variables.
         3. Click New.
         4. In the Name field, selectOracle_JDBC_DRIVER_PATH
         5. In the Value field, select the path to the Oracle library with the required version of the ojdbc14.jar file (for example, D:\Oracle.)
         6. Click Apply.
         7. Click OK.

Step 5. Set up J2C authentication.
         1. Click Security.
         2. Click Global Security.
         3. In the Authentication section of the Global Security window, click JAAS Configuration.
         4. Click J2C Authentication Data.
         5. Click New.
         6. In the Alias Entry field, type RAM_Con.
         7. In the User ID field, type an Oracle user ID with administration privileges. For Oracle, the user ID defined here must be the name given to the schema (for example, ramschema).
         8. In the Password field, type the password for the user ID.
         9. Click Apply.
        10. Click OK.

Step   6. Create a database connection
         1. Click Resources in the navigation pane.
         2. Click JDBC Providers.
         3. If you use a remote installation of DB2®, make sure the Node and Server entries are cleared and click Apply.
         4. If you work in a clustered environment, type the name of the cluster in the Cluster field and click Apply.

Step 7. If any other JDBC drivers have been defined for Rational Asset Manager (for example, JNDI Name = jdbc/RAM_Con), delete those drivers before completing the following steps.

Step 8. Create a JDBC Provider.
         1. Click New.
         2. For the database type, select Oracle.
         3. For the provider type, select Oracle JDBC Driver.
         4. For the implementation type, select Connection pool data source.
         5. Click Next.
         6. Click Apply.
         7. Click Data sources.
         8. Click New.

Step 9. Bind the database to a JNDI name.
         1. For the JNDI name, select jdbc/RAM_Con.
         2. For the Data store helper class name, select the level of Oracle installed (for example, Oracle 9i and prior data store helper).
         3. For the Component-managed authentication alias field, select the J2C authentication that you created earlier.
         4. For the URL field, type the path that the Oracle administrator provides. It will have the following form:      jdbc:oracle:thin:fully_qualified_machine_name:oracle_port_number:database_name.
         5. Click Apply.
         6. Click OK.
         7. Click Test Connection.

Step 10. Save the WebSphere Application Server configuration.
         1. Click Save at the top of the window.
         2. In the next window, click Save.

Step 11. Log out of the console.

Step 12. Restart the server.

Step 13. In a clustered environment, the Domain Manager (DM) must be restarted.

Please let me know any mistakes or any changes required,

I hope it will help you,, Enjoy working on Middleware...

Regards,
Ajinkya Vichare
ajinkya-vichare.blogspot.com