Sunday, March 25, 2012

How to change Oracle applications 11i/R12passwords using FNDCPASS:

Based on Note:159244.1

NOTE 1: FNDCPASS should be run from the database tier to prevent encryption issues.

- Issue the commands at the Unix command line similar to the following:
    >> To change the APPS and APPLSYS passwords:
    FNDCPASS apps/apps 0 Y system/manager SYSTEM APPLSYS <new password>
    Ex: FNDCPASS apps/apps 0 Y system/manager SYSTEM APPLSYS NEWPASSWORD

>> Restart Concurrent manager services.

NOTE 2: Changing the APPLSYS password automatically changes the APPS password to match as these two must always agree.

    >> To change an Oracle user password:
    FNDCPASS apps/apps 0 Y system/manager ORACLE <oracle user> <new
    password
    Ex: FNDCPASS apps/apps 0 Y system/manager ORACLE GL GLPASSWORD

NOTE 3: Altering the ORACLE User name (schemas) passwords with FNDCPASS without first updating the APPS/APPLSYS password with FNDCPASS will cause the ORACLE User password to be undecodable by Applications.
Use FNDCPASS to "refresh" the APPS/APPLSYS password, even if it is to the same value.

    >> To change an application user password:
    FNDCPASS apps/apps 0 Y system/manager USER  <username>  <password>
    Ex: FNDCPASS apps/apps 0 Y system/manager USER   VISION  WELCOME

NOTE 4: VERY IMPORTANT!! >> For 11i ONLY!
When changing the password for APPS it is important to manually change the APPS
password in the following files as well as necessary:


1. $ORACLE_HOME/listener/cfg/wdbsvr.app file as well. (Otherwise users will not
be able to login to the Personal Home Page or Self-service web apps.) This may also be necessary in the $IAS_ORACLE_HOME\Apache\modplsql\cfg\wdbsvr.app file
 
2. Workflow Notification Mailer - $FND_TOP/resource/wfmail.cfg

3. The concurrrent manager start script.

4. $OA_HTML/bin/appsweb.cfg

5. $AD_TOP/admin/template/CGIcmd.dat may contain the password if it is being
used.
(Please refer to Note 159033.1 How to Setup Oracle Reports in Portal to Use
CGICMD.DAT File)

6. If your instance is Multi-node and Autoconfig enabled, it may be necessary to invoke Autoconfig to implement the above changes.

Regards,
Mohamed
How to mount NTFS media on oracle Linux 5.5:
========================================================
> If you already have the needed packages installed:

[root@ebsdb01 /]# mount -t ntfs-3g /dev/sde1 /u01 -o force
$LogFile indicates unclean shutdown (0, 0)
WARNING: Forced mount, reset $LogFile.
[root@ebsdb01 /]#

 
> If this is your first time to use NTFS on this OS:

Needed tar files have been uploaded to 4shared:
As the "root" user do:

mkdir /mnt/ntfs; cd /mnt/ntfs

tar xzf fuse-2.7.1.tar.gz

cd fuse-2.7.1;./configure --exec-prefix=/; make; make install

cd ..;tar xzf ntfs-3g-1.1120.tgz

cd ntfs-3g-1.1120;./configure; make; make install

Then:

fdisk -l  => check for your media

Mount your NTFS media:

mount -t ntfs-3g /dev/sde1 /mnt/ntfs/
Which responsibilities assigned to which users:
==================================================
- To get the list of users who assigned certain responsibility use the below query

SELECT furga.user_id
, fu.user_name
, furga.responsibility_id
, frtl.responsibility_name
, furga.responsibility_application_id
, fa.application_short_name
, furga.security_group_id
, fsg.security_group_key
, furga.start_date
, furga.end_date
, furga.created_by
, fucb.user_name
, furga.creation_date
, furga.last_updated_by
, fulub.user_name
, furga.last_update_date
, furga.last_update_login
, fulul.user_name
FROM
fnd_user_resp_groups_all furga,
fnd_user fu,
fnd_user fucb,
fnd_user fulub,
fnd_user fulul,
fnd_application fa,
fnd_responsibility_tl frtl,
fnd_security_groups fsg
WHERE
upper(frtl.responsibility_name) like upper ('%&resp_name%')
and fu.end_date is null    -- user is active
and furga.end_date is null  -- responsibility not end dated for the user.
and furga.user_id = fu.user_id (+)
and furga.created_by = fucb.user_id (+)
and furga.last_updated_by = fulub.user_id (+)
and furga.last_update_login = fulul.user_id (+)
and furga.responsibility_application_id = fa.application_id (+)
and furga.responsibility_id = frtl.responsibility_id (+)
and furga.security_group_id = fsg.security_group_id (+)
ORDER BY start_date;

Regards,
Mohamed

Tuesday, March 20, 2012


How to change IP address for Oracle E-business EBS 11i/R12 server:

- Make sure that your EBS instance services are cleanly down.

1- Change the IP at the OS level

2- Ping the server name and ensure you are pinging the new IP

ping <server_name>  (it should show the new IP) => Otherwise make sure that your entries in /etc/hosts file matches the new IP

3- Start the DB listener

lsnrctl start $ORACLE_SID

4- Start the DB

SQL> startup

select NODE_NAME, STATUS, NODE_MODE, NODE_ID,SERVER_ADDRESS, HOST, DOMAIN, WEBHOST, VIRTUAL_IP from fnd_nodes where node_name = upper('hostname');

eg.

SQL> select NODE_NAME, STATUS, NODE_MODE, NODE_ID,SERVER_ADDRESS, HOST, DOMAIN, WEBHOST, VIRTUAL_IP from apps.fnd_nodes where node_name = upper('erptestdb02');

NODE_NAME     S N    NODE_ID SERVER_ADDRES HOST     DOMAIN         WEBHOST               VIRTUAL_IP
------------- - - ---------- ------------- ------------ ---------------- ----------------------------- ---------------
ERPTESTDB02   Y O    8120 10.30.10.176  erptestdb02    rsteel.com erptestdb02.rsteel.com  erptestdb02


5- De-register the server which has the new IP:

Run the following command to remove the old IP address from Oracle Applications tables:

a- As the OS owner on the affected node run:

perl $AD_TOP/bin/adgentns.pl appspass=apps contextfile=$CONTEXT_FILE -removeserver

Then,

b- connect to sqlplus as apps user
c- Locate the System Name :
    The System name is the database name

select DB_NAME from FND_DATABASES;
        

d- Locate the server name corresponding to the tier in question :

    Query on the server :

        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('hostname');
 eg.
col name for a30
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('erptestdb02');
        
SQL>

NAME                   SERVER_TYPE
------------------------------ ------------------------------
erptestdb02_STAGE8_DB           DB

SQL>

e- Run the following PL/SQL block :

begin
   FND_NET_SERVICES.remove_server('<SYSTEM_NAME>','<SERVER_NAME>');
end;
/
       
commit;

eg.

SQL> begin
FND_NET_SERVICES.remove_server('STAGE8','ERPTESTDB02_STAGE8_APPS');
end;
/

PL/SQL procedure successfully completed.

SQL> commit;

Commit complete.

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

no rows selected

SQL>


6- Run autoconfig to populate the new IP Address


a- Ensure you can connect as apps/apps from the affected node.
b- Run AC as the DB file owner - oruser.
    $ORACLE_HOME/appsutil/bin/adconfig.sh
c- Run AC as the MT file owner - apuser.
    $AD_TOP/bin/adconfig.sh
d- Source your newly updated environment files inside your shell terminal. 
    - DB-Tier Environment. ($ORACLE_HOME/$CONTEXT_NAME.env)
    - MT-Tier Environment. ($APPL_TOP/APPS$CONTEXT_NAME.env)

7- Confirm the IP address has been changed to the new value changed in step 1:


select NODE_NAME, STATUS, NODE_MODE, NODE_ID,SERVER_ADDRESS, HOST, DOMAIN, WEBHOST, VIRTUAL_IP from apps.fnd_nodes where node_name = upper('erptestdb02');

eg.

SQL> select NODE_NAME, STATUS, NODE_MODE, NODE_ID,SERVER_ADDRESS, HOST, DOMAIN, WEBHOST, VIRTUAL_IP from apps.fnd_nodes where node_name = upper('erptestdb02');

NODE_NAME     S N    NODE_ID SERVER_ADDRES HOST     DOMAIN         WEBHOST               VIRTUAL_IP
------------- - - ---------- ------------- ------------ ---------------- ----------------------------- ---------------
ERPTESTDB02   Y O    8120 10.30.11.176  erptestdb02    rsteel.com erptestdb02.rsteel.com  erptestdb02

SQL>

8- Start MT services and do your health check.

            

- Issues you may face:

> Autoconfig may fail with the following error:
 ...
Updating s_tnsmode to 'generateTNS'
UpdateContext exited with status: 0
AC-50480: Internal error occurred: java.lang.Exception: Error while generating listener.ora.
Error generating tnsnames.ora from the database, temporary tnsnames.ora will be generated using
templates
Instantiating Tools tnsnames.ora
Tools tnsnames.ora instantiated
Web tnsnames.ora instantiated

adgentns.pl exiting with status 512
ERRORCODE = 512 ERRORCODE_END

...

Solution


1. Open a new shell and source the APPS Environment. ($APPL_TOP/APPS<SID>_<HOST>.env)

2. Start "sqlplus" and execute following commands :
$ sqlplus apps/<Password>
SQL> exec fnd_conc_clone.setup_clean

3. Open a new terminal or shell and source the DB-Tier Environment. ($ORACLE_HOME/$CONTEXT_NAME.env)

4. Execute Autoconfig on the DB Tier. ($ORACLE_HOME/appsutil/bin/adconfig.sh)

5. Switch back to the APPS environment or start a new shell and source the APPS environment. ($APPL_TOP/APPS$CONTEXT_NAME.env)

6. Execute Autoconfig at the Apps Tier. ($AD_TOP/bin/adconfig.sh)

7. Check the Autoconfig log for any errors and ensure that the services start correctly.

Regards,
Mohamed