Thursday, 4 May 2023

How to change Apps Password in R12.1

 /* CHANGE APPLICATION USER PASSWORD USING FNDCPASS*/


FNDCPASS apps/APPS_PASSWORD 0 Y system/SYSTEM_PASSWORD USER USER_WHOSE_PASSWORD_WILL_BE_CHANGED NEWPASSWORD

Example: FNDCPASS apps/apps 0 Y system/manager USER SYSADMIN sysadmin

/* CHANGE "APPS" USER PASSWORD USING FNDCPASS in "R11"*/
 
FNDCPASS apps/apps 0 Y system/SYSTEM_PASSWORD SYSTEM APPLSYS NEWPASSWORD
Note: Changing apps password will also change applsys password. apps and applsys passwords are always the same..

/* CHANGE "APPS" USER PASSWORD USING FNDCPASS in "R12"*/
FNDCPASS apps/APPS_PASSWORD 0 Y system/SYSTEM_PASSWORD SYSTEM APPLSYS NEW_PASSWORD

Form Migration R12


FORM Compilation UAT to PRODà
Copy the given FMB file from UAT to PROD.
Goto à AU_TOP/forms
/d03/UATAPPL/apps/apps_st/appl/au/12.0.0/forms/USà Uat form location.
Copy the .fmb file to PROD.
Nowà goto PROD.
Form locationà
Cd /ProdApp/oracle/PROD/apps/apps_st/appl/au/12.0.0/forms/US
From root
Change the ownership and permission to .fmb file.
Chmod –R 777 .fmb
Chown –R applprod:dba
Su – applprod
Now run the form compilation command from AU_TOP/forms Location only
In PROD
frmcmp_batch userid=apps/oracledba1 module=XXLTCEL_IOT.fmb output_file=$XXLTK_TOP/forms/US/XXLTCEL_IOT.fmx module_type=form batch=no compile_all=yes

IN UAT
frmcmp_batch userid=apps/apps module=XXLTK_ORDER_SHIP_BILL_DETAILS.fmb output_file=$XXLTK_TOP/forms/US/XXLTK_ORDER_SHIP_BILL_DETAILS.fmx module_type=form batch=no compile_all=yes
.Pll file compilation:à
[appldev@ltk1 resource]$ ls -ltr JAINTPTY.pll
-rwxr-xr-x. 1 appldev dba 147456 Jun 15 08:06 JAINTPTY.pll
[appldev@ltk1 resource]$ frmcmp_batch module=JAINTPTY.pll userid=apps/apps module_type=library compile_all=special

1.frmcmp_batch userid=apps/oracledba1 module=JAINBOEI.fmb output_file=/ProdApp/oracle/PROD/apps/apps_st/appl/ja/12.0.0/forms/US/JAINBOEI.fmx module_type=form batch=no compile_all=yes

2.frmcmp_batch userid=apps/oracledba1 module=JAINBOER.fmb output_file=/ProdApp/oracle/PROD/apps/apps_st/appl/ja/12.0.0/forms/US/JAINBOER.fmx module_type=form batch=no compile_all=yes

3.frmcmp_batch userid=apps/oracledba1 module=JAINTXRP.fmb output_file=/ProdApp/oracle/PROD/apps/apps_st/appl/ja/12.0.0/forms/US/JAINTXRP.fmx module_type=form batch=no compile_all=yes





How to Change WebLogic Password in R12.2

 Changing Weblogic Password in R12.2 Environment. 

*Login to primary application Node. 

goto cd $FND_TOP/patch/115/bin and run below command.

[applmgr@sreeniapps bin]$ perl txkUpdateEBSDomain.pl action=updateAdminPassword

Program: txkUpdateEBSDomain.pl started at Thu May  4 21:52:00 2023


AdminServer will be re started after changing WebLogic Admin Password

All Mid Tier services should be SHUTDOWN before changing WebLogic Admin Password

Confirm if all Mid Tier services are in SHUTDOWN state. Enter "Yes" to proceed or anything else to exit: yes


Enter the full path of Applications Context File [DEFAULT - /u01/oracle/VIS/fs2/inst/apps/VIS_valiapps/appl/admin/VIS_valiapps.xml]:

Enter the WLS Admin Password:

Enter the new WLS Admin Password:

Enter the APPS user password:


Executing: /u01/oracle/VIS/fs2/FMW_Home/webtier/perl/bin/perl /u01/oracle/VIS/fs2/EBSapps/appl/ad/12.0.0/patch/115/bin/adProvisionEBS.pl  ebs-get-serverstatus -contextfile=/u01/oracle/VIS/fs2/inst/apps/VIS_valiapps/appl/admin/VIS_valiapps.xml -servername=AdminServer -promptmsg=hide -logfile=/u01/oracle/VIS/fs2/inst/apps/VIS_valiapps/logs/appl/rgf/TXK/txkUpdateEBSDomain_Thu_May_4_21_52_00_2023/EBSProvisioner.log


Updating Weblogic Domain in online mode

---------------------------------------

Backup Location : /u01/oracle/VIS/fs2/inst/apps/VIS_valiapps/logs/appl/rgf/TXK/txkUpdateEBSDomain_Thu_May_4_21_52_00_2023

Logfile Location: /u01/oracle/VIS/fs2/inst/apps/VIS_valiapps/logs/appl/rgf/TXK/txkUpdateEBSDomain_Thu_May_4_21_52_00_2023/updateAdminPassword.log


Executing: /u01/oracle/VIS/fs2/EBSapps/comn/util/jdk32/jre/bin/java -classpath :/u01/oracle/VIS/fs2/FMW_Home/wlserver_10.3/server/lib/weblogic.jar:/u01/oracle/VIS/fs2/FMW_Home/Oracle_EBS-app1/oui/jlib/srvm.jar:/u01/oracle/VIS/fs2/EBSapps/comn/java/classes:/u01/oracle/VIS/fs2/EBSapps/comn/shared-libs/ebs-3rdparty/WEB-INF/lib/ebs3rdpartyManifest.jar:/u01/oracle/VIS/fs2/FMW_Home/Oracle_EBS-app1/shared-libs/ebs-appsborg/WEB-INF/lib/ebsAppsborgManifest.jar oracle.apps.ad.util.UpdateEBSDomain updateAdminPassword  -contextfile /u01/oracle/VIS/fs2/inst/apps/VIS_valiapps/appl/admin/VIS_valiapps.xml -promptmsg hide -logdir /u01/oracle/VIS/fs2/inst/apps/VIS_valiapps/logs/appl/rgf/TXK/txkUpdateEBSDomain_Thu_May_4_21_52_00_2023 -logfile /u01/oracle/VIS/fs2/inst/apps/VIS_valiapps/logs/appl/rgf/TXK/txkUpdateEBSDomain_Thu_May_4_21_52_00_2023/updateAdminPassword.log


Domain updated successfully

Restarting AdminServer with new Admin Password.


You are running adadminsrvctl.sh version 120.10.12020000.11


Stopping WLS Admin Server...

Refer /u01/oracle/VIS/fs2/inst/apps/VIS_valiapps/logs/appl/admin/log/adadminsrvctl.txt for details


AdminServer logs are located at /u01/oracle/VIS/fs2/FMW_Home/user_projects/domains/EBS_domain_VIS/servers/AdminServer/logs


adadminsrvctl.sh: exiting with status 0


adadminsrvctl.sh: check the logfile /u01/oracle/VIS/fs2/inst/apps/VIS_valiapps/logs/appl/admin/log/adadminsrvctl.txt for more information ...



You are running adnodemgrctl.sh version 120.11.12020000.12



NodeManager log is located at /u01/oracle/VIS/fs2/FMW_Home/wlserver_10.3/common/nodemanager/nmHome1


adnodemgrctl.sh: exiting with status 0


adnodemgrctl.sh: check the logfile /u01/oracle/VIS/fs2/inst/apps/VIS_valiapps/logs/appl/admin/log/adnodemgrctl.txt for more information ...



You are running adadminsrvctl.sh version 120.10.12020000.11


Starting WLS Admin Server...

Refer /u01/oracle/VIS/fs2/inst/apps/VIS_valiapps/logs/appl/admin/log/adadminsrvctl.txt for details


AdminServer logs are located at /u01/oracle/VIS/fs2/FMW_Home/user_projects/domains/EBS_domain_VIS/servers/AdminServer/logs


adadminsrvctl.sh: exiting with status 0


adadminsrvctl.sh: check the logfile /u01/oracle/VIS/fs2/inst/apps/VIS_valiapps/logs/appl/admin/log/adadminsrvctl.txt for more information ...



*************** IMPORTANT ****************

WebLogic Admin Password is changed.

Restart all application tier services using control scripts.

********************************************



----------------------------------------

Inside generateMimeMappingsPropFile()...

----------------------------------------

/u01/oracle/VIS/fs2/FMW_Home/user_projects/domains/EBS_domain_VIS/config/mimemappings.properties already exists, updating it.

--------------------------------------

Inside updateMimeMappingsPropFile()...

--------------------------------------

-------------------------------------

Inside resetExistingMimeMappings()...

-------------------------------------

Overwriting the value for the parameter: png

Overwriting the value for the parameter: xml

Overwriting the value for the parameter: js

Overwriting the value for the parameter: svg

Overwriting the value for the parameter: swf

Reset of mime mappings completed.

---------------------------

Inside addMimeMappings()...

---------------------------

Adding of mime mappings completed.

Taking backup of existing mimemappings.properties.

Copying the file

----------------

SOURCE : /u01/oracle/VIS/fs2/FMW_Home/user_projects/domains/EBS_domain_VIS/config/mimemappings.properties

TARGET : /u01/oracle/VIS/fs2/FMW_Home/user_projects/domains/EBS_domain_VIS/config/mimemappings.properties_bkp

Copying temporary file as mimemappings.properties.

Copying the file

----------------

SOURCE : /u01/oracle/VIS/fs2/FMW_Home/user_projects/domains/EBS_domain_VIS/config/mimemappings.properties_temp

TARGET : /u01/oracle/VIS/fs2/FMW_Home/user_projects/domains/EBS_domain_VIS/config/mimemappings.properties

/u01/oracle/VIS/fs2/FMW_Home/user_projects/domains/EBS_domain_VIS/config/mimemappings.properties updated successfully.

Program: txkUpdateEBSDomain.pl completed at Thu May  4 21:55:28 2023

[applmgr@sreeniapps bin]$


*Start all application services using adstrtall.sh 

*Log in to the WebLogic Administrative console.

*Click Lock & Edit and click Domain.

Click on the Security tab and click on the Advanced tab.





Enter the new password that you want for the WebLogic admin user in the Node Manager Password.




click on save and activate changes









Friday, 9 March 2018

Forms Tracing Apps R12

2.1.1 Steps to Activate Forms Trace using Application Profiles

Note: Forms Trace should only be activated as and when required, and for specific users.
Forms Level Activation
  1. Sign on to Oracle Applications as a user with the System Administrator responsibility.
  2. Select the System Administrator responsibility.
  3. Select the Profile -> System function (this will launch Forms).
  4. Search for the Applications user and the profile option Forms Runtime Parameters.
  5. Add the required parameters, using the syntax: record=forms tracegroup=<value(s)>.
    Examples:

    record=forms tracegroup=0-97
    record=forms tracegroup=medium


    Note the space between the parameter/value pairs.
  6. Commit the changes and log out of Applications.
  7. Log in to Applications as the user whose Forms Runtime Parameters profile option was amended.
The forms trace file will be written to the $FORMS_TRACE_DIR directory. By default, this directory is named forms_<pid>.trc, where <pid> is the process identifier.

Wednesday, 30 August 2017

Startup and shutdown scripts in Apps Release R12

Application startup and shutdown scripts
[sreenidba@sreenidba scripts]$  cd $ADMIN_SCRIPTS_HOME
1.adalnctl.sh  
2.adautocfg.sh        
3.adformsctl.sh   
4.adoacorectl.sh  
5.adopmnctl.sh   
6.adstpall.sh 
7.adapcctl.sh  
8.adcmctl.sh     
9.adformsrvctl.sh 
10.adoafmctl.sh    
11.adpreclone.pl  
12.adstrtal.sh 
1.adalnctl.sh  : script used to start the application listener services.
logfile located in LOG_HOME or INST_TOP/admin/log
adalnctl.txt
To know the status of apps listner 

[sreenidba@sreenidba log]$ adalnctl.sh status

adalnctl.sh version 120.3

Checking status for listener process APPS_UAT.

LSNRCTL for Linux: Version 10.1.0.5.0 - Production on 30-AUG-2017 12:47:58

Copyright (c) 1991, 2004, Oracle.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=TCP)(Host=sreenidba)(Port=1600))
STATUS of the LISTENER
------------------------
Alias                     APPS_UAT
Version                   TNSLSNR for Linux: Version 10.1.0.5.0 - Production
Start Date                21-AUG-2017 15:02:36
Uptime                    8 days 21 hr. 45 min. 23 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /d03/UATAPPL/inst/apps/UAT_sreenidba/ora/10.1.2/network/admin/listener.ora
Listener Log File         /d03/UATAPPL/inst/apps/UAT_sreenidba/logs/ora/10.1.2/network/apps_uat.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=sreenidba.bw.ltindia.com)(PORT=1639)))
Services Summary...
Service "FNDFS" has 1 instance(s).
  Instance "FNDFS", status UNKNOWN, has 1 handler(s) for this service...
Service "FNDSM" has 1 instance(s).
  Instance "FNDSM", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

adalnctl.sh: exiting with status 0


adalnctl.sh: check the logfile /d03/UATAPPL/inst/apps/UAT_sreenidba/logs/appl/admin/log/adalnctl.txt for more information ...

[sreenidba@sreenidba log]$
FNDFS:
  • FNDFS or the Report Review Agent (RRA) is the default text viewer within Oracle Applications, which allows users to view report output and log files. 
  • Report Review Agent is also referred to by the executable FNDFS.
FNDSM  
  • FND Service Manager is a concurrent manager in GSM( Generic Service Management Framework ), and serves requests like CM’s
[sreenidba@sreenidba ~]$ ps -ef | grep APPS_
sreenidba   5242  5161  0 13:05 pts/1    00:00:00 grep APPS_
sreenidba  22028     1  0 Aug21 ?        00:00:00 /d03/UATAPPL/apps/tech_st/10.1.2/bin/tnslsnr APPS_UAT -inherit
appldev  22274     1  0 Aug29 ?        00:00:00 /d04/DEVAPPL/apps/tech_st/10.1.2/bin/tnslsnr APPS_DEV -inherit
[sreenidba@sreenidba ~]$

adautocfg.sh
  • script used to run the autoconfig, if any changes has been done in context file that time we need to run autoconfig.
  • when you run auto config it wiil update all template files and driver files in oracle applications.
  • logfile located in INST_TOP/admin/log
[sreenidba@sreenidba scripts]$ sh adautocfg.sh
Enter the APPS user password:

The log file for this session is located at: /d03/UATAPPL/inst/apps/UAT_sreenidba/admin/log/08301310/adconfig.log

AutoConfig is configuring the Applications environment...

AutoConfig will consider the custom templates if present.
        Using CONFIG_HOME location     : /d03/UATAPPL/inst/apps/UAT_sreenidba
a       Classpath                   : /d03/UATAPPL/apps/apps_st/comn/java/lib/appsborg2.zip:/d03/UATAPPL/apps/apps_st/comn/java/classes

pps
        Using Context file          : /d03/UATAPPL/inst/apps/UAT_sreenidba/appl/admin/UAT_sreenidba.xml

Context Value Management will now update the Context file
 Updating Context file...COMPLETED

        Attempting upload of Context file and templates to database...COMPLETED

Configuring templates from all of the product tops...
        Configuring AD_TOP........COMPLETED
        Configuring FND_TOP.......COMPLETED
        Configuring ICX_TOP.......COMPLETED
AutoConfig completed successfully.

adformsctl.sh 
  • this script is used to start formservices in servletmode.
  • Log file located at INST_TOP/admin/log
 [sreenidba@sreenidba scripts]$ adformsctl.sh status

You are running adformsctl.sh  version 120.16.12010000.3

Checking status of OPMN managed FORMS OC4J instance ...

Processes in Instance: UAT_sreenidba.sreenidba.bw.ltindia.com
---------------------------------+--------------------+---------+---------
ias-component                    | process-type       |     pid | status
---------------------------------+--------------------+---------+---------
OC4JGroup:default_group          | OC4J:oafm          |   22463 | Alive
OC4JGroup:default_group          | OC4J:forms         |   22385 | Alive
OC4JGroup:default_group          | OC4J:oacore        |   22131 | Alive
OC4JGroup:default_group          | OC4J:oacore        |   22130 | Alive
HTTP_Server                      | HTTP_Server        |   22070 | Alive


adformsctl.sh: exiting with status 0

adformsctl.sh: check the logfile /d03/UATAPPL/inst/apps/UAT_sreenidba/logs/appl/admin/log/adformsctl.txt for more information ...

[sreenidba@sreenidba scripts]$
adopmnctl.sh 
  • this script is used to start and stop all forms and apache services OC4J, oafm, oacore HTTP_Server.
  • to start/stop all services forms and apache services using below cmd.
  • logfile located at INST_TOP/admin/log

[sreenidba@sreenidba scripts]$ adopmnctl.sh start all
[sreenidba@sreenidba scripts]$ adopmnctl.sh stop all

  • [sreenidba@sreenidba scripts]$ adopmnctl.sh status all

You are running adopmnctl.sh version 120.6.12010000.5

Checking status of OPMN managed processes...

Processes in Instance: UAT_ltk1.ltk1.bw.ltindia.com
---------------------------------+--------------------+---------+---------
ias-component                    | process-type       |     pid | status
---------------------------------+--------------------+---------+---------
OC4JGroup:default_group          | OC4J:oafm          |   22463 | Alive
OC4JGroup:default_group          | OC4J:forms         |   22385 | Alive
OC4JGroup:default_group          | OC4J:oacore        |   22131 | Alive
OC4JGroup:default_group          | OC4J:oacore        |   22130 | Alive
HTTP_Server                      | HTTP_Server        |   22070 | Alive


adopmnctl.sh: exiting with status 0

adstrtall.sh

  • this script is used to start all services listner, forms,oc4j,oacore,oafm, concurrent managers and apache services.
  • logfile located at INST_TOP/admin/log
  • to start the all services issue the folloing command.

[sreenidba@sreenidba scripts]$ adstrtal.sh

You are running adstrtal.sh version 120.15.12010000.3


Enter the APPS username: apps

Enter the APPS password:
The logfile for this session is located at /d03/UATAPPL/inst/apps/UAT_ltk1/logs/appl/admin/log/adstrtal.log
Executing service control script:
/d03/UATAPPL/inst/apps/UAT_ltk1/admin/scripts/adopmnctl.sh start

.end std out.

.end err out.

****************************************************


Executing service control script:
/d03/UATAPPL/inst/apps/UAT_ltk1/admin/scripts/adalnctl.sh start
script returned:
****************************************************

adalnctl.sh version 120.3

Checking for FNDFS executable.
Starting listener process APPS_UAT.

adalnctl.sh: exiting with status 0


adalnctl.sh: check the logfile /d03/UATAPPL/inst/apps/UAT_ltk1/logs/appl/admin/log/adalnctl.txt for more information ...


.end std out.

.end err out.

****************************************************


Executing service control script:
/d03/UATAPPL/inst/apps/UAT_ltk1/admin/scripts/adapcctl.sh start
script returned:
****************************************************

You are running adapcctl.sh version 120.7.12010000.2

Starting OPMN managed Oracle HTTP Server (OHS) instance ...
opmnctl: opmn is already running.
opmnctl: starting opmn managed processes...

adapcctl.sh: exiting with status 0

adapcctl.sh: check the logfile /d03/UATAPPL/inst/apps/UAT_ltk1/logs/appl/admin/log/adapcctl.txt for more information ...


.end std out.

.end err out.

****************************************************


Executing service control script:
/d03/UATAPPL/inst/apps/UAT_ltk1/admin/scripts/adoacorectl.sh start
script returned:
****************************************************

You are running adoacorectl.sh version 120.13

Starting OPMN managed OACORE OC4J instance  ...

adoacorectl.sh: exiting with status 0

adoacorectl.sh: check the logfile /d03/UATAPPL/inst/apps/UAT_ltk1/logs/appl/admin/log/adoacorectl.txt for more information ...


.end std out.

.end err out.
All enabled services for this node are started.

adstrtal.sh: Exiting with status 0

adstrtal.sh: check the logfile /d03/UATAPPL/inst/apps/UAT_ltk1/logs/appl/admin/log/adstrtal.log for more information ...

Note: status existing with "0" then all services well and started, if the status existing '1" then we need to crosscheck all services.

to stop all services using followning command
[sreenidba@sreenidba scripts]$ adstpall.sh

You are running adstpall.sh version 120.10.12010000.4


Enter the APPS username: apps

Enter the APPS password:
The logfile for this session is located at /d03/UATAPPL/inst/apps/UAT_sreenidba/logs/appl/admin/log/adstpall.log
Executing service control script:
/d03/UATAPPL/inst/apps/UAT_sreenidba/admin/scripts/jtffmctl.sh stop
script returned:
****************************************************

You are running jtffmctl.sh version 120.3

Shutting down Fulfillment Server for UAT on port 9313 ...

jtffmctl.sh: exiting with status 0


.end std out.

.end err out.

****************************************************


Executing service control script:
/d03/UATAPPL/inst/apps/UAT_sreenidba/admin/scripts/adcmctl.sh stop
script returned:
****************************************************

You are running adcmctl.sh version 120.17.12010000.5

Shutting down concurrent managers for UAT ...
ORACLE Password:
Submitted request 59028128 for CONCURRENT FND SHUTDOWN


adcmctl.sh: exiting with status 0





Monitoring Concurrent Programs

Query to find running concurrent programs
SQL>SELECT vs.username,
 vs.osuser,
 vh.sid locking_sid,
 vs.status status,
 vs.module module,
 vs.program program_holding,
 jrh.job_name,
 vsw.username,
 vsw.osuser,
 vw.sid waiter_sid,
 vsw.program program_waiting,
 jrw.job_name,
 'alter system kill session ' || ''''|| vh.sid || ',' || vs.serial# || ''';'  "Kill_Command"
FROM v$lock vh,
 v$lock vw,
 v$session vs,
 v$session vsw,
 dba_scheduler_running_jobs jrh,
 dba_scheduler_running_jobs jrw
WHERE     (vh.id1, vh.id2) IN (SELECT id1, id2
 FROM v$lock
 WHERE request = 0
 INTERSECT
 SELECT id1, id2
 FROM v$lock
 WHERE lmode = 0)
 AND vh.id1 = vw.id1
 AND vh.id2 = vw.id2
 AND vh.request = 0
 AND vw.lmode = 0
 AND vh.sid = vs.sid
 AND vw.sid = vsw.sid
 AND vh.sid = jrh.session_id(+)
 AND vw.sid = jrw.session_id(+);
[oraprod@ltkbwlndb01 Sreeni_Monitoring_Scripts]$ cat rr.sql
set pages 1000 lines 1000 pagesize 1000;
select a.request_id ,decode(a.phase_code,'R','Running','Normal') Phase,
to_char(a.actual_start_date,'DD-MON-RRRR HH24:MI:SS')
Start_time , substr(b.user_concurrent_program_name,1,40) Program , a.ORACLE_SESSION_ID
from apps.fnd_concurrent_requests a, apps.fnd_concurrent_programs_tl b
where a.concurrent_program_id = b.concurrent_program_id and
a.status_code = 'R'
order by Start_time;
REQUEST_ID PHASE   START_TIME           PROGRAM                                  ORACLE_SESSION_ID
---------- ------- -------------------- ---------------------------------------- -----------------
  89896545 Running 30-AUG-2017 03:46:01 sreenidba-sreenidba REGISTER (RECEIPT NO-WISE)
  89896594 Running 30-AUG-2017 03:50:51 sreenidba-sreenidba REGISTER (RECEIPT NO-WISE)
  89896700 Running 30-AUG-2017 03:59:29 sreenidba-sreenidba REGISTER (RECEIPT NO-WISE)
  89898623 Running 30-AUG-2017 05:26:34 sreenidba-Transfer Order Lines to AR Interfa


Tuesday, 29 August 2017

Identifying table locks

Query to find table locks
SQL>SELECT vs.username,
 vs.osuser,
 vh.sid locking_sid,
 vs.status status,
 vs.module module,
 vs.program program_holding,
 jrh.job_name,
 vsw.username,
 vsw.osuser,
 vw.sid waiter_sid,
 vsw.program program_waiting,
 jrw.job_name,
 'alter system kill session ' || ''''|| vh.sid || ',' || vs.serial# || ''';'  "Kill_Command"
FROM v$lock vh,
 v$lock vw,
 v$session vs,
 v$session vsw,
 dba_scheduler_running_jobs jrh,
 dba_scheduler_running_jobs jrw
WHERE     (vh.id1, vh.id2) IN (SELECT id1, id2
 FROM v$lock
 WHERE request = 0
 INTERSECT
 SELECT id1, id2
 FROM v$lock
 WHERE lmode = 0)
 AND vh.id1 = vw.id1
 AND vh.id2 = vw.id2
 AND vh.request = 0
 AND vw.lmode = 0
 AND vh.sid = vs.sid
 AND vw.sid = vsw.sid
 AND vh.sid = jrh.session_id(+)
 AND vw.sid = jrw.session_id(+);

Compiling JSP files in Apps R12

in Linux:
---------------------------------
take the backup of jsp files in COMMON_TOP/_pages
cd $COMMON_TOP/
[sreenidba@sreenidba comn]$ ls
admin  clone  cz  exclude.xml  java  mvtaglib  _pages  temp  _TldCache  util  webapps
[sreenidba@sreenidba comn]$ mv _pages _pages_backup
create ne directory under common_top
[sreenidba@sreenidba comn]$ mkdir _pages
Now run the ojspCompile.pl script from FND_TOP/patch/115/bin
cd $FND_TOP/patch/115/bin
[sreenidba@sreenidba bin]$ pwd
/d04/sreenidba/apps/apps_st/appl/fnd/12.0.0/patch/115/bin
[sreenidba@sreenidba bin]$ ls ojspCompile.pl
ojspCompile.pl
[sreenidba@sreenidba bin]$ perl ojspCompile.pl -compile -flush -p 2
perl ojspCompile.pl –compile –flush -p 2(here "P" represents number of processes)
Now check the new jsp files created or not in COMMON_TOP/_jsppages
[sreenidba@sreenidba _pages]$ pwd
/d04/sreenidba/apps/apps_st/comn/_pages
[sreenidba@sreenidba _pages]$
csfwAddr.class                              _jtfbCreateParamStr.class                             _pvxEnrlReprtRunMain.class
_csfwAddReqLine.class                        _jtfbGraphColMetadata.class                           _pvxEnrlReprtRunPrz.class
_csfwAdvPartSearch.class                     _jtfbGraphColMetadataSub.class                        _pvxEnrlReprtRunTbl.class
_csfwAdvTaskLOV.class                        _jtfbGraphMetadata.class                              _pvxEnrlViewEnrMain.class
_csfwAdvTaskSearch.class                     _jtfbGraphMetadataSub.class                           _pvxEnrlViewEnrRTbl.class
_csfwainv.class                              _jtfbGraphSummary.class                               _pvxEnrlViewEnrUTbl.class

Monday, 28 August 2017

Find the oracle database 32bit or 64bit

[appldev@sreendba admin]$ sqlplus apps/apps

SQL*Plus: Release 10.1.0.5.0 - Production on Tue Aug 29 11:21:19 2017

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select (case length(address) when 16 then '64-bit Oracle'
when 8 then '32-bit Oracle'
when 32 then '128-bit Oracle'
end) Wordsize
from v$sql
where rownum <2
/
  2    3    4    5    6    7
WORDSIZE
------------------------------------------
64-bit Oracle

SQL>

Tuesday, 22 August 2017

Linux command's for DBA's

findout number of user process
[sreenidba@sreenidba ~]$ ps -ef|grep sreenidba|wc -l
456
[sreenidba@sreenidba ~]$ ps -ef|grep sreenidba|wc -l
266
[sreenidba@sreenidba ~]$
find the disk space
[root@sreenidba ~]# df -h
Filesystem                         Size  Used Avail Use% Mounted on
sreeni/sda2                           25G   17G  7.0G  71% /
tmpfs                               32G  283M   32G   1% sreeni/shm
sreeni/sda1                          788M   46M  702M   7% /boot
sreeni/sda6                          6.9G  224M  6.4G   4% /tmp
sreeni/sda5                           15G  5.9G  8.3G  42% /usr
sreeni/sda7                          487G  327G  137G  71% /d03
sreeni/sreenidba                   1.6T  1.2T  309G  80% /d01
sreeni/sreenidba                   591G  268G  293G  48% /d02
sreeni/sreenidba                     345G  177G  151G  55% /ProdApp
192.168.145.81:/home/ftve0148/H2H   17G  8.5G  7.3G  54% /CE
[root@sreenidba ~]#

Find server performance every 5 seconds 5 times using sar command
[root@sreenidba ~]# sar 5 5
Linux 2.6.32-431.el6.x86_64 (sreenidb01.ltindia.com)   08/21/2017      _x86_64_        (8 CPU)

01:49:39 AM     CPU     %user     %nice   %system   %iowait    %steal     %idle
01:49:44 AM     all      1.03      0.00      0.23      0.08      0.00     98.67
01:49:49 AM     all      2.76      0.00      1.18      0.10      0.00     95.96
01:49:54 AM     all      0.68      0.00      0.30      0.05      0.00     98.97
01:49:59 AM     all      4.02      0.00      0.60      0.13      0.00     95.25
01:50:04 AM     all      5.52      0.00      1.08      0.33      0.00     93.07
Average:        all      2.80      0.00      0.68      0.14      0.00     96.38
[root@sreenidba ~]#

top command
[root@sreenidba ~]#top
top - 01:51:14 up 46 days, 49 min,  2 users,  load average: 0.90, 0.70, 0.83
Tasks: 1032 total,   2 running, 1029 sleeping,   0 stopped,   1 zombie
Cpu(s):  6.2%us,  1.0%sy,  0.0%ni, 90.1%id,  2.7%wa,  0.0%hi,  0.1%si,  0.0%st
Mem:  65863632k total, 65171192k used,   692440k free,   717556k buffers
Swap: 16777208k total,    42268k used, 16734940k free, 49945532k cached

   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
126620 sreenidba   20   0 20.2g 184m 177m R 98.4  0.3   0:00.86 oracle
123032 sreenidba  20   0 91208  45m  14m S 11.6  0.1   0:46.46 frmweb
126090 sreenidba  20   0 1437m 537m  10m S  7.7  0.8  19:18.66 java
118425 sreenidba   20   0 20.2g 199m 190m S  5.8  0.3   0:01.26 oracle
123040 sreenidba   20   0 20.3g 642m 633m S  3.9  1.0   0:11.96 oracle
126930 root      20   0 15700 1880  836 R  3.9  0.0   0:00.02 top
115545 sreenidba   20   0 20.2g 113m 105m S  1.9  0.2   0:00.33 oracle
119527 sreenidba   20   0 20.2g  61m  56m S  1.9  0.1   0:00.15 oracle
125659 sreenidba   20   0 20.2g  35m  32m S  1.9  0.1  13:20.40 oracle
127227 sreenidba  20   0  719m 179m 7848 S  1.9  0.3   8:05.95 java
127493 sreenidba  20   0 23692  11m 5492 S  1.9  0.0   2:02.28 FNDLIBR
127527 sreenidba  20   0 23928  11m 5484 S  1.9  0.0   2:01.91 FNDLIBR
     1 root      20   0 19356 1536 1228 S  0.0  0.0  11:10.52 init
     2 root      20   0     0    0    0 S  0.0  0.0   0:01.64 kthreadd
     3 root      RT   0     0    0    0 S  0.0  0.0   0:30.14 migration/0
     4 root      20   0     0    0    0 S  0.0  0.0   4:26.00 ksoftirqd/0
     5 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/0
     6 root      RT   0     0    0    0 S  0.0  0.0   0:02.17 watchdog/0
     7 root      RT   0     0    0    0 S  0.0  0.0   0:03.07 migration/1
SCP command
copying tarfile (apps.tar) from production.
scp -r 192.168.137.89: /App/appsbkp/apps.tar ./ à(command Execute in dest server only ).

tar command:
tar the apps directory using below command
tar –cvzf /ProdApp/appsbkp/apps.tar apps
for untar using below
tar –xvzf /ProdApp/appsbkp/apps.tar apps
Mounting files from one server to another server uning mount command
mount -t nfs 192.168.137.89:/d03/BACKUP_OLD/prodbackup_1417 /d02/prodbackup -o hard,rw,noac,rsize=32768,wsize=32768,suid,bg,proto=tcp,vers=3
Findout server information using below commands:
[root@sreenidba ~]# cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Intel(R) Xeon(R) CPU           E5430  @ 2.66GHz
stepping        : 6
cpu MHz         : 2660.053
cache size      : 6144 KB
physical id     : 0
siblings        : 4
core id         : 0
cpu cores       : 4
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes

cache_alignment : 64
address sizes   : 38 bits physical, 48 bits virtual
power management:

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Intel(R) Xeon(R) CPU           E5430  @ 2.66GHz
stepping        : 6
cpu MHz         : 2660.053
cache size      : 6144 KB
physical id     : 0
siblings        : 4
core id         : 1
cpu cores       : 4
apicid          : 1
initial apicid  : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
clflush size    : 64
cache_alignment : 64
address sizes   : 38 bits physical, 48 bits virtual
power management:

processor       : 2
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Intel(R) Xeon(R) CPU           E5430  @ 2.66GHz
stepping        : 6
cpu MHz         : 2660.053
cache size      : 6144 KB
physical id     : 0
siblings        : 4
core id         : 2
cpu cores       : 4
apicid          : 2
initial apicid  : 2
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
processor       : 3
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Intel(R) Xeon(R) CPU           E5430  @ 2.66GHz
stepping        : 6
cpu MHz         : 2660.053
cache size      : 6144 KB
physical id     : 0
siblings        : 4
core id         : 3
cpu cores       : 4
apicid          : 3
initial apicid  : 3
fpu             : yes
fcx16 xtpr pdcm dca sse4_1 lahf_lm dts tpr_shadow vnmi flexpriority
bogomips        : 5320.10
clflush size    : 64
cache_alignment : 64
address sizes   : 38 bits physical, 48 bits virtual
power management:

[root@sreenidba ~]#
findout memory information
[root@sreenidba ~]# cat /proc/meminfo
MemTotal:       32878880 kB
MemFree:          751404 kB
Buffers:          788148 kB
Cached:         24819976 kB
SwapCached:       264352 kB
Active:         17300548 kB
Inactive:       12643340 kB
Active(anon):    5159516 kB
Inactive(anon):  1048964 kB
Active(file):   12141032 kB
Inactive(file): 11594376 kB
Unevictable:           0 kB
Mlocked:               0 kB
[root@sreenidba ~]#
Find the server 32bit or 64bit using uname command
[root@sreenidba ~]# uname -i
x86_64
[root@sreenidba ~]# uname -a
Linux sreeni.ltindia.com 2.6.32-431.el6.x86_64 #1 SMP Sun Nov 10 22:19:54 EST 2013 x86_64 x86_64 x86_64 GNU/Linux
[root@sreenidba ~]#
[root@sreenidba ~]# uname -r
2.6.32-431.el6.x86_64
[root@sreenidba ~]# uname -i
x86_64
[root@sreenidba ~]# uname
Linux
[root@sreenidba ~]# hostname -i
192.162.177.99
[root@sreenidba ~]# hostname
sreeni.ltindia.com
[root@sreenidba ~]#

find the linux version
[root@sreenidba ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.5 (Santiago)

[root@sreenidba ~]#
(or)
[root@sreenidba ~]# tail /etc/redhat-release
Red Hat Enterprise Linux Server release 6.5 (Santiago)
[root@sreenidba ~]#
References:
---------------------
Oracle Applications Release Notes, Release 12.1.1 ( Doc ID 798258.1 )
Oracle E-Business Suite Release 12 Installation Guidelines ( Doc ID 405565.1 )
Oracle E-Business Suite Installation and Upgrade Notes Release 12 (12.1.1) for Linux x86 ( Doc ID 761564.1 )

Finding Schema size

Query to find schema size in GB
SQL>select
   owner,
   sum(bytes)/1024/1024/1024 schema_size_gig
from
   dba_segments
group by

   owner;
---------------------------------------------------------------------------
OWNER                          SCHEMA_SIZE_GIG
------------------------------ ---------------
APPLSYS                             111.531372
AK                                   .35546875
BSC                                 .297851563
CRP                                 .071289063
IGS                                 4.46289063
OKS                                 .247070313
XNP                                  .19921875
POA                                 .556640625
finding the table size in GB group by owner 
COLUMN TABLE_NAME FORMAT A32
COLUMN OBJECT_NAME FORMAT A32
COLUMN OWNER FORMAT A10

SELECT
   owner,
   table_name,
   TRUNC(sum(bytes)/1024/1024/1024) Geg,
   ROUND( ratio_to_report( sum(bytes) ) over () * 100) Percent
FROM
(SELECT segment_name table_name, owner, bytes
 FROM dba_segments
 WHERE segment_type IN ('TABLE', 'TABLE PARTITION', 'TABLE SUBPARTITION')
 UNION ALL
 SELECT i.table_name, i.owner, s.bytes
 FROM dba_indexes i, dba_segments s
 WHERE s.segment_name = i.index_name
 AND   s.owner = i.owner
 AND   s.segment_type IN ('INDEX', 'INDEX PARTITION', 'INDEX SUBPARTITION')
 UNION ALL
 SELECT l.table_name, l.owner, s.bytes
 FROM dba_lobs l, dba_segments s
 WHERE s.segment_name = l.segment_name
 AND   s.owner = l.owner
 AND   s.segment_type IN ('LOBSEGMENT', 'LOB PARTITION')
 UNION ALL
 SELECT l.table_name, l.owner, s.bytes
 FROM dba_lobs l, dba_segments s
 WHERE s.segment_name = l.index_name
 AND   s.owner = l.owner
 AND   s.segment_type = 'LOBINDEX')
WHERE owner in UPPER('&owner')
GROUP BY table_name, owner
HAVING SUM(bytes)/1024/1024/1024 > 1
ORDER BY SUM(bytes) desc;

How to change Apps Password in R12.1

  /* CHANGE APPLICATION USER PASSWORD USING FNDCPASS*/ FNDCPASS apps/APPS_PASSWORD 0 Y system/SYSTEM_PASSWORD USER USER_WHOSE_PASSWORD_WILL_...