Showing posts with label configuration. Show all posts
Showing posts with label configuration. Show all posts

Wednesday, 10 November 2010

How to remove an Oracle E-Business Suite Release 12.x Windows Environment

There are many potential reasons for wishing to remove an environment, including an installation failure. Such a failure may result from improper install user privileges, missing prerequisite software, inadequate system resources, or other causes, if your installation does fail, you must clean your system before you attempt to re-install Oracle Applications.

For a multi-node installation, repeat the procedure for each node on your system. The procedure requires you to use the Registry Editor to alter the Windows registry, and to delete the faulty instances from your system. You should read and understand all steps described here before you begin.

Step 1. Back up the System
Back up your system and the Windows registry before you begin. 

Step 2. Alter the Windows Registry
Delete the relevant Oracle components from the Windows registry, as follows.
To delete a specific instance (in the case that there are multiple EBS instances or other Oracle software on the system):
  1. Launch the Registry Editor.
  2. Navigate to the HKEY_LOCAL_MACHINE\Software\ORACLE\APPLICATIONS\12.0.0 key.
  3. Delete the entry corresponding to the instance to be deleted.
  4. Navigate to the HKEY_LOCAL_MACHINE\System\Current Control Set\Services.
  5. Carefully select and delete each Oracle service corresponding to the instance you wish to delete.  For example, if you wish to delete "PROD", delete "OraclePROD__ToolsASControl".
  6. When you are finished, exit the Registry Editor. 
To delete all Oracle environments on the system:
  1. Launch the Registry Editor.
  2. Navigate to the HKEY_LOCAL_MACHINE\Software key.
  3. Select the Apache Group subkey and delete it.
  4. Select the Oracle subkey and delete it.
  5. Navigate to the HKEY_LOCAL_MACHINE\System\Current Control Set\Services.
  6. Carefully select and delete each service beginning with Oracle.  For example, delete "OraclePROD__ToolsASControl".
  7. When you are finished, exit the Registry Editor. 
Step 3. Alter Environment Settings
Complete these steps to delete Oracle parameters from the environment.
Navigate to the Environment Variables editing screen according to your system setup.  For example, right-click My Computer and select Properties. From the Advanced tab, click the Environment Variables button.
To delete a specific instance (in the case that there are multiple EBS instances, or there is other Oracle software on the system):
  1. Select the following system variable if created during the failed installation, and modify it to point to the environment(s) you would like to keep: PERL5LIB.
  2. Select the Path variable, but do not delete it.  Carefully edit it and remove any component that references the failed install. For example, delete "e:\oracle\PROD\db\tech_st\10.2.0\bin;".
  3. Save and exit System Properties.
Alternatively, to remove all Oracle environments from the system:
  1. Select the following system variable if created during the failed installation, and delete it: PERL5LIB.
  2. Select the Path variable, but do not delete it.  Carefully edit it and remove any component with "Oracle" in the name, or that otherwise references the failed install. For example, delete "e:\oracle\PROD\db\tech_st\10.2.0\bin;".
  3. Save and exit System Properties.
Step 4. Clean up the Program Menu
Launch the Program menu (Start->Programs). Carefully delete all Oracle programs associated with the instance or instances to be removed. Select each one, right-click it, and choose the Delete option.

Step 5. Restart your Machine
Restart your machine.  This removes all Windows services that you deleted from the registry and frees up the files accessed by the associated processes so that they may also be deleted (see next step).

Step 6. Delete the Oracle Filesystem
It is now safe to remove the Oracle filesystem that was partially installed during the failed installation. Go to the base install directory, or top-level directory under which you installed the Database Server (DB) or the Applications Tier Server (APPS) directories, or both.
Note that you may choose to rename a directory before you delete it. This allows you to use the same directory name and start a new installation even before you finish the delete filesystem operation. For example, if you placed your filesystem in a "test" directory under "E:\oracle":
C:\>  E:
E:\>  cd oracle
E:\>  rename test oldtest
E:\>  del /s /q oldtest

Step 7. Delete Programs and Oracle Inventory Entries
To delete the inventory associated with a specific instance:
  1. Start the Oracle Universal Installer using: Start >> All Programs >> Oracle-_db102_RDBMS>>Oracle Installation Products>>Universal Installer
  2. Select Installed Products
  3. Enable "Show empty homes"
  4. Deinstall the entries in the global inventory associated with the Oracle Applications R12 instance which you removed earlier. For example, for the PROD instance, you would delete:
    1. RDBMS ORACLE HOME (e.g. "PROD_DB__oracle_PROD_db_tech_st_10_2_0")
    2. 10gAS ORACLE HOME (e.g."PROD_WEBOH__oracle_PROD_apps_tech_st_10_1_3")
    3. Developer 10g ORACLE HOME (for example, "PROD_TOOLS__oracle_PROD_apps_tech_st_10_1_2")
  5. Exit the Universal Installer
To delete the files associated with all Oracle environments on the system:
  1. Open a command window and navigate to the C:\Program Files\ directory.
  2. Delete the Oracle subdirectory.
  3. If your Oracle Inventory directory was not C:\Program Files\Oracle\Inventory and was therefore not deleted in the previous step, locate it and delete it.

Cheers!!!

SocialTwist Tell-a-Friend

Wednesday, 16 June 2010

Pfile vs SPfile

Until Oracle 8i DBAs have been using a text file called the pfile (parameter file) to store the database initialization parameters.

As of Oracle9i, new feature called the spfile (server parameter file). The spfile is a binary file that contains the same information as the old pfile.

The spfile is a server-side initialization parameter file; parameters stored in this file are persistent across database startups.

This makes all the changes made to the instance using the ALTER SYSTEM statement persistent. Oracle requires that you start an instance for the first time using the pfile and then create the spfile.

The server parameter file (also called SPFILE) is in a single location where all the necessary parameters are defined and stored. The defined parameter values are applicable for all the instances in the cluster.

The SPFILE permits dynamic changes without requiring you to bring down the instance.

By default, if you do not specify PFILE in your STARTUP command, Oracle will use a server parameter file.

SERVER PARAMETER FILE ( SPFILE )

A server parameter file is basically a repository for initialization parameters.

Initialization parameters stored in a SPFILE are persistent, meaning any parameter changes made while an instance is running can persist across instance shutdown and startup.

In this way, all the initialization parameters manually updated by ALTER SYSTEM SET commands become persistent.

It also provides a basis for the Oracle database server to self-tune.

Another advantage, particularly for multi-instance RAC systems, is that a single copy of the parameter file can be used by all instances. Even though a single file is used to specify parameters, it has different format styles to support both the common values for all instances, as well as the specific values for an individual instance.

A server parameter file is initially built from the traditional text initialization parameter file, using the create SPFILE statement. It is a binary file that cannot be browsed or edited with a text editor.

Oracle provides other interfaces for viewing and modifying parameter settings.  At system startup, the default behavior of the STARTUP command is to read a SPFILE to obtain initialization parameter settings. If the STARTUP command doesn't have a PFILE clause, it reads the SPFILE from a location
specified by the operating system.

If you choose to use the traditional text initialization parameter file, you must specify the PFILE clause when issuing the STARTUP command.

Some initialization parameters are dynamic since they can be modified using the ALTER SESSION or ALTER SYSTEM statement while an instance is running. Use the following syntax to dynamically alter
initialization parameters:

ALTER SESSION SET parameter_name = value
ALTER SYSTEM SET parameter_name = value [DEFERRED]

Use the SET clause of the ALTER SYSTEM statement to set or change initialization parameter values. Additionally, the SCOPE clause specifies the scope of a change as described below:

SCOPE = SPFILE

(For both static and dynamic parameters, changes are recorded in the spfile, to be given effect in the next restart.)

SCOPE = MEMORY

(For dynamic parameters, changes are applied in memory only. No static parameter change is allowed.)

SCOPE = BOTH

For dynamic parameters, the change is applied in both the server parameter file and memory. No static parameter change is allowed.)

For dynamic parameters, we can also specify the DEFERRED keyword. When specified, the change is effective only for future sessions.

How to create server parameter file (SPFILE)
The server parameter file is initially created from a text initialization parameter file (init.ora).

It must be created prior to its use in the STARTUP command.
The create SPFILE statement is used to create a server parameter file.

The following example creates a server parameter file from an initialization parameter file.

CREATE SPFILE FROM PFILE='/u01/oracle/product/10.2.0/dbs/initTEST.ora';

Below is another example that illustrates creating a server parameter file and supplying a name.

CREATE SPFILE='/u01/oracle/product/10.2.0/dbs/TEST_spfile.ora'
FROM PFILE='/u01/oracle/product/10.2.0/dbs/initTEST.ora';

The following example creates a text initialization parameter file from the server parameter file:

CREATE PFILE FROM SPFILE;

The example below creates a text initialization parameter file from a server parameter file, where the names of the files are specified:

CREATE PFILE='/u01/oracle/product/10.2.0/dbs/initTEST.ora'
FROM SPFILE='/u01/oracle/product/dbs/10.2.0/TEST_spfile.ora';

How to find-out that whether database using spfile or pfile ?

The following query will let you know..

1) SQL> SELECT name,value FROM v$parameter WHERE name = 'spfile';
2) SQL> show parameter spfile;

Tuesday, 18 May 2010

Database Initialization Parameters for Oracle Applications 11i - R12

The following metalink note will help you setting init.ora parameters for EBS suite databases

Note: 216205.1 - Database Initialization Parameters for Oracle Applications Release 11i
Note: 396009.1 - Database Initialization Parameters for Oracle Applications Release 12

These note will helps you when upgrade your system to R12 from 11i, or managing these instances.

Monday, 3 May 2010

How to Change IP, Hostname, Domain and Ports - Oracle E-Business Suite

This post will help you to change of IP, hostname, domain and ports setting from single node instance of existing oracle e-business suite configuration. Most of them are aware of how to reconfigure an E-Business 11i system using AutoConfig, (i will explain the steps for autoconfig in next post) however certain configuration changes are not reflected in the configuration files. The Net Services Topology Data Model stores the entire topological information about a single Oracle Application instance. The data model stores information about each node in the Oracle Applications instance which is then used to generate the Net Service configuration files (for example tnsnames.ora). AutoConfig seeds the data model with relevant data.

The Net Services Topology Data Model stores the following information:
On the database tier: Hostname, Database SID, Database Name, Instance Name, TNS Descriptors.....
On the application tier: Hostname, FNDFS and FNDSM alias descriptors.........

This functionality is causing confusion for those who are trying to reconfigure their existing systems using AutoConfig. Changes such as hostname or Database port are not reflected in the configuration files after AutoConfig is run.

In Oracle E-Business Suite IP address is not dependent, so one can easily change the IP address of nodes without any effect on E-Business Suite.

But Hostname, Domain and Ports are not like that, Oracle E-Business Suite is dependent to these entries. So, we couldn’t change these values without co-ordination of E-Business Suite itself.
There are two methods available for changing Hostname, Domain and Ports of Oracle E-Business Suite. The first method, that will be explaining here, is using autoconfig and another method is by cloning. It is very easy to use autoconfig method to change hostname, domain and ports and use cloning method for changing other configurations of Oracle E-Business Suite.

In this post, assume that our E-Business Suite has just one node so that all Tiers and Servers reside on this node. For changing hostname, domain and ports of a multinode Oracle E-Business Suite, please refere metalink note: 341322.1 - How to change the hostname of an Applications Tier using AutoConfig, metalink note: 338003.1 - How to change the hostname and/or port of the Database Tier using AutoConfig  and Note: 391406.1 - How to get a clean Autoconfig Environment.


a. DB Tier: Deregister the current database server (Required)

As the database hostname and domain will be changed, the current database server node needs to be de-registered. To deregister the current database server node, run the following command as the owner of the Oracle RDBMS file system and current database instance :

SQL> select NAME, SERVER_TYPE from FND_APP_SERVERS, FND_NODES
where FND_APP_SERVERS.NODE_ID = FND_NODES.NODE_ID and
SERVER_TYPE='DB' and FND_NODES.NODE_NAME=UPPER('oldhost');

NAME            SERVER_TYPE
--------------- -----------
oldhost_DEVT_DB  DB

# cd $ORACLE_HOME/appsutil
# perl ./bin/adgentns.pl appspass= contextfile=./DEVT_oldhost.xml -removeserver

SQL> select NAME, SERVER_TYPE from FND_APP_SERVERS, FND_NODES
where FND_APP_SERVERS.NODE_ID = FND_NODES.NODE_ID and
SERVER_TYPE='DB' and FND_NODES.NODE_NAME=UPPER('oldhost');
no rows selected

b. DB Tier: Create a new Context file

You can create the new context file using whichever of the following methods:
a. Manuall Method:
# cd $ORACLE_HOME/appsutil
# cp PROD_oldhost.xml DEVT_newhost.xml
Edit DEVT_newhost.xml manually:
Replace all oldhost with newhost
Replace all olddomain with newdomain


b. Script Method:
# cd $ORACLE_HOME/appsutil
# perl ./bin/adclonectx.pl contextfile=./DEVT_oldhost.xml

Provide the values required for creation of the new Database Context file.
Do you want to use a virtual hostname for the target node (y/n) [n] ?:
Target hostname [oldhost]:newhost
Target System database name [DEVT]:
Target instance is a Real Application Cluster (RAC) instance (y/n) [n]:
Target system domain name [olddomain]:newdomain
Oracle OS User [oradevt]:
Oracle OS Group [dba]:
Target system RDBMS ORACLE_HOME directory [/oracle/devtdb/9.2.0]:
Target system utl_file accessible directories list [/usr/tmp]:
Number of DATA_TOP's on the target system [4]:1
Target system DATA_TOP 1:/oracle/devtdata
Do you want to preserve the Display set to oldhost:0.0 (y/n) [y] ?:n
Target system Display [newhost:0.0]:
Target system JAVA_TOP location [null]:/oracle/devtcomn/java
Do you want to preserve the port values from the source system on the target system (y/n) [y] ?:
Database port is 1521
New context path and file name [DEVT_newhost.xml]:
Creating the new Database Context file from :
/oracle/devtdb/9.2.0/appsutil/template/adxdbctx.tmp
The new database context file has been created :
/oracle/devtdb/9.2.0/appsutil/DEVT_newhost.xml

Note: The command above will create a new Context file of the format DEVT_newhost.xml in the current working directory.

c. APPS Tier: Deregister the current Applications server

As the Applications hostname and domain will be changed, the current Applications server node needs to be de-registered.
To deregister the current Applications server node, run the following command as the owner of the Oracle Applications file system and current database instance:

SQL> select NAME, SERVER_TYPE from FND_APP_SERVERS, FND_NODES
where FND_APP_SERVERS.NODE_ID = FND_NODES.NODE_ID and
SERVER_TYPE='APPS' and FND_NODES.NODE_NAME=UPPER('oldhost');
NAME              SERVER_TYP
----------------- ----------
oldhost_DEVT_APPS  APPS

# cd $APPL_TOP/admin
# perl $AD_TOP/bin/adgentns.pl appspass= contextfile=./DEVT_oldhost.xml -removeserver

SQL> select NAME, SERVER_TYPE from FND_APP_SERVERS, FND_NODES
where FND_APP_SERVERS.NODE_ID = FND_NODES.NODE_ID and
SERVER_TYPE='APPS' and FND_NODES.NODE_NAME=UPPER('oldhost');

no rows selected

d. APPS Tier: Create a new Context file

You can create the new context file using whichever of the following methods:


a. Manuall Method:
# cd $APPL_TOP/admin
# cp DEVT_oldhost.xml DEVT_newhost.xml
Edit DEVT_newhost.xml manually:
Replace all oldhost with newhost
Replace all olddomain with newdomain


b. Script Method:
# cd $APPL_TOP/admin
# perl $AD_TOP/bin/adclonectx.pl contextfile=./DEVT_oldhost.xml

Provide the values required for creation of the new APPL_TOP Context file.
Do you want to use a virtual hostname for the target node (y/n) [n] ?:
Target hostname [oldhost]:newhost
Target system database SID [DEVT]:
Target system domain name [olddomain]:newdomain
Username for the applications file system owner [appldevt]:
Group for the applications file system owner [dba]:
Target system database server node [oldhost]:newhost
Does the target system have more than one application tier server node (y/n) [n] ?:
Is the target system APPL_TOP divided into multiple mount points(y/n)[n]?:
Target system APPL_TOP mount point [/apps/devtappl]:
Target system COMMON_TOP directory [/apps/devtcomn]:
Target system 8.0.6 ORACLE_HOME directory [/apps/devtora/8.0.6]:
Target system iAS ORACLE_HOME directory [/apps/devtora/iAS]:
Do you want to preserve the Display set to oldhost:0.0 (y/n) [y] ?:n
Target system Display [newhost:0.0]:
Location of JDK 1.3.1 on the target system [/usr/java14]:
Do you want to preserve the port values from the source system on the target system (y/n) [y] ?:
Web Listener port is 8000
Complete port information available at /apps/devtappl/admin/out/DEVT_newhost/portpool.lst
New context path and file name [DEVT_newhost.xml]:
Creating the new APPL_TOP Context file from :
/apps/devtappl/ad/11.5.0/admin/template/adxmlctx.tmp
The new APPL_TOP context file has been created :
/apps/devtappl/admin/DEVT_newhost.xml

Note: The command above will create a new Context file of the format DEVT_newhost.xml in the current working directory.

e. APPS Tier: Shutdown the Application Tier Services

# $COMMON_TOP/admin/scripts/DEVT_oldhost/adstpall.sh apps/

f. Change the hostname and domain

Change the hostname and domain at OS level.
# hostname -s newhost
# edit /etc/hosts as follow:
OLD: IP-Address     oldhost.olddomain     oldhost
NEW: IP-Address     newhost.newdomain     newhost

Verify that the /etc/sysconfig/network file contains an entry that is similar to the following:
HOSTNAME=.
Check to see if the /etc/sysconfig/networking/profiles/default/network file exists. If it does, remove it.
If you changed any files in the previous steps, reboot the system.

g. DB Tier: Reseed the Net Services Topology Model

# cd $ORACLE_HOME/appsutil
# ./bin/adconfig.sh contextfile=./DEVT_newhost.xml

h. APPS Tier: Reseed the Net Services Topology Model

The Net Services Topology Model is automatically updated by running AutoConfig.
# $AD_TOP/bin/adconfig.sh contextfile=$APPL_TOP/admin/DEVT_newhost.xml appspass=

i. DB Tier: Shutdown the database and listener

# $ORACLE_HOME/appsutil/scripts/DEVT_oldhost/addbctl.sh stop
# $ORACLE_HOME/appsutil/scripts/DEVT_oldhost/addlnctl.sh stop DEVT

j. DB Tier: Start the listener and database
# $ORACLE_HOME/appsutil/scripts/DEVT_newhost/addlnctl.sh start DEVT
# $ORACLE_HOME/appsutil/scripts/DEVT_newhost/addbctl.sh start

k. APPS Tier: Start the Application Tier Services

# $COMMON_TOP/admin/scripts/DEVT_newhost/adstrtal.sh apps/

Sometimes you will encounter the following errors when you start the listener?
Error listening on: (ADDRESS=(PROTOCOL=TCP)(Host=newhost)(Port=1521))
TNS-12532: TNS:invalid argument
TNS-12560: TNS:protocol adapter error
TNS-00502: Invalid argument
IBM/AIX RISC System/6000 Error: 515: Error 515 occurred.

Please check $ORACLE_HOME/network/admin/DEVT_newhost/sqlnet.ora to insure it is using new values:
OLD: tcp.invited_nodes=(oldhost.olddomain, newhost.newdomain)
NEW: tcp.invited_nodes=(newhost.newdomain)

Another possible error is that in Jinitiator console when you try to start form applications?
java.lang.NoClassDefFoundError: org/apache/regexp/RESyntaxException
at oracle.ewt.lwAWT.lwText.LWTextField.getText(LWTextField.java:196)
at oracle.ewt.lwAWT.lwText.LWTextField._getDisplayString(LWTextField.java:787)

Please change $OA_HTML/bin/appsweb_DEVT_newhost.cfg for the value of ‘archive2′. It should be as follow:
archive2=,/OA_JAVA/regexp.jar

May be this also will encounter you when start Jinitiator console form applications?
java.lang.Error: RE internal error: Corrupt program
at org.apache.regexp.RE.internalError(RE.java:820)
at org.apache.regexp.RE.matchNodes(RE.java:1414)

Do make the following changes in JAVA_TOP
# cd $JAVA_TOP
# mv org org.back

Please send your comments....