Showing posts with label ip. Show all posts
Showing posts with label ip. Show all posts

Thursday, July 30, 2009

oafm,forms and oacore not starting up after IP adress change

oafm, forms and oacore not starting up after IP adress change of the Oracle Applications Error from the logs:
adformsctl.sh: exiting with status 204
adoafmctl.sh: exiting with status 204
adoacorectl.sh: exiting with status 204

This is because the OC4J lock files contains the IP adress, after the ip adress change the lock files includes the wrong Ip adress which caused the OJ4J to fail.

To implement the solution perform the following steps:

1 - open a new shell and set your apps environment
2 - cd $ADMIN_SCRIPTS_HOME3 - adopmnctl.sh stop
4 - check if it is really down: ps -ef grep grep opm
5 - delete the following:

rm -fr $INST_TOP/ora/10.1.3/j2ee/oacore/persistence/*
rm -fr $INST_TOP/ora/10.1.3/j2ee/oafm/persistence/*
rm -fr $INST_TOP/ora/10.1.3/j2ee/forms/persistence/*

6 - adopmnctl.sh start
7 - check if the issue has been resolved: adapcctl.sh status

Friday, June 26, 2009

Can the hostname and IP address for the database tier be changed?

For the database, you need to look at the tnsnames.ora, listener.ora and sqlnet.ora files, and make changes as needed (IP, Hostname, etc.). DBConsole uses a WEB URL that also includes either the hostname or IP address. Other than that, nothing else is be needed for the database. As with any change like this, it is recommended you make a good back up and then test it on another server before putting it into production.

Saturday, April 11, 2009

How To Get Client IP Address For a Locking User

This code is created using Forms Builder 10.1.2.0.2 and WebUtil Version 1.0.6.

For step (4), user needs execute privilege on DBMS_APPLICATION_INFO

For step (7), you need to connect to the DB using any user has a "Select" privilege on v$session

Create IP-Address Sample form

1. Install and configure your Developer installation to use webutil

http://www.oracle.com/technology/software/products/forms/files/webutil/webutil_106.zip


2. Create new form using webutil


3. Create a WHEN-NEW-FORM-INSTANCE trigger add the following:

======================================================================
declare
v_timer timer;
begin
v_timer := create_timer('ip_timer',2,no_repeat);
end;
======================================================================

4. Create a database procedure

======================================================================
create or replace procedure SETCLIENTINFO (p_info varchar2) is
begin
DBMS_APPLICATION_INFO.SET_CLIENT_INFO(p_info);
exception
when others then
raise_application_error(-20101,'SETCLIENTINFO: error: '||sqlerrm);
end;
======================================================================


5. Create a WHEN-TIMER-EXPIRED add the following code:

======================================================================
declare
v_trimer_name varchar2(30) := get_application_property(TIMER_NAME);
v_ip_address varchar2(40);
begin
if upper(v_trimer_name) = upper('ip_timer') THEN
v_ip_address := webutil_clientinfo.get_ip_address;
SETCLIENTINFO('Client IP='||v_ip_address);
end if;
end;
======================================================================

6. Call the form


7. Go to SQL*Plus or iSQL*Plus and run the following SQL statement:

======================================================================
select client_info from v$session where client_info is not null;
======================================================================

Sample Code Output


The SQL output in step (7) should be like :


Client IP = x.x.x.x