0% found this document useful (0 votes)
179 views

Oracle APPS-DBA Commands

Basic Commands for Apps DBA

Uploaded by

Asif
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
179 views

Oracle APPS-DBA Commands

Basic Commands for Apps DBA

Uploaded by

Asif
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 18

ORACLE-APPS-DBA-Commands

To start Database & Application Database

First Start Database & Listener on Database Tire


># su - oracle (To go to Oracle User)
>$cd /u01/db/tech_st/10.2.0/appsutil/scripts/PROD_node7
(To go to Database Script Location)
>$./addbctl.sh start prod (To start Database)
>$./addlnctl.sh start prod (To start Listener)
>$sqlplus sys as sysdba (To connect to sql prompt)
Second start the Application on Apps Tire
>#su - applmgr (To connect to Application User)
>$cd $ADMIN_SCRIPTS_HOME (To to go to Apps Script Location)
>$./adstrtal.sh apps/apps (To start Application)
>$sqlplus apps/apps (To connect to Sql prompt)

Control Scripts of Application Database Servers:-


• ./adstrtal.sh apps/apps = (To start all the Application Server)
• ./adstrtal.sh status apps/apps = (To see status all the Application Server)
• ./adstpall.sh stop = (To stop all the Application Server)
• ./adapcctl.sh = (Start, Status, Stop (Apache Web Server))
• ./adcmctl.sh start apps/apps = Control Script for (CPS Server)
• ./adformctl.sh = (Start, Status, Stop (Forms Server in Servlet mode))
./adformsrvctl.sh = Control Script for (Form Server in Socket mode) in (R12)
• ./adoafmctl.sh = (Start, Status, Stop (OC4J oanf Web Service Mapviewer)
• ./adrepctl.sh = Control Script for (Report Server)
• ./adtums.sql =
• ./addisctl.sh = Control Script for (Discoverer Server)
• ./jtffmctl.sh = (Start, Stop Fulfillment Server)
• ./gsmstart.sh = (Start, Stop FNDSM)

Database Control Scripts(R12):-


• ./addbctl.sh start prod (To start Database)
• ./addbctl.sh stop prod (To stop Database)

Listener Control Scripts(R12):-


• ./addlnctl.sh start list1 (To start Listener)
• ./addlnctl.sh stop list1 (To stop Listener)

Control Scripts for Instances (R12):-


• ./adopmnctl.sh start = (To start all the 3 Instances)
• ./adopmnctl.sh stop = (To stop all the 3 Instances)
• ./adopmnctl.sh status = (To check Status of Instances)

• ./adoacorectl.sh start = (To start OC4j O A Core Instance)


• ./adoacorectl.sh stop = (To stop OC4J O A Core Instance)

• ./adformsctl.sh start = (To start oc4j Instance)


• ./adformsctl.sh stop = (To stop oc4j Instance)

• ./adoafmctl.sh start = (To start oc4j oafm Instance) Fusion Middleware)


• ./adoafmctl.sh stop = (To stop oc4j oafm Instance)Fusion Middleware)
AD Utilities:-
• ./adadmin = It is for AD Administration/Maintenance/Compilation of
Application files.
• ./adrelink.sh = It is to relink Application Program files.
• ./adctrl = It is to Monitor AD Worker back ground Processes.
• ./adident = I is to check File version.
• ./adautocfg.sh = It is to Automate Configuration Management.
• ./adpatch = It is to Apply Oracle Application Patches.
• ./opatch = It is to Apply Oracle RDBMS Patches.
• ./admrgpch = It is to Merge the Patches.
• ./adphmigr = It is to Migrate Patch history.
• adsplice = It is to add a New Products.
• adaimgr = It is to Auto Upgrade the Application Products.
• adlicmgr.sh = It is to License the Product after installation of Application.
• adchkcfg = It is to check which Files get changes during Autoconfig.
• adrepgen = It is to Compile oracle Report Files.
• adncnv = It is for File Character Set Controller.
• adautcfg.sh = It is for AD Configuration.
• adopmn.sh =
• adtimrpt.sql = It is for AD Timing Report.
• ./adclone.pl =
• ./adpreclone.pl =
• ./adcfgclone.pl =
• ./ perl admsi.pl = It will provide manual steps to apply the Patches.
• ./adodfcmp = It is to compare the Data model of customer to a
standard set of Data
• ./adncnv = It is to Convert Characture set of Oracle Application files.
• ./adautostg.pl = It is to create a Stage area of Rapid Install.
• ./adgendbc.sh = It is to create DBC file.
• ./adexecsql.pl = It is to Execute Sql Script that update Profile in Autoconfig.
• ojspCompile.pl = It is to Compile JSPs.
• Java.sh = It call java executable with additional args used by opmn ConcMgr)

Database level Commands & Views:-


Sql>connect apps/apps (To connect to Apps User)
Sql>connect applsys/apps (To connect to Applsys User)
Sql>conn gl/gl (To connect to General ledger User)
Sql>conn ar/ar (To connect to Oracle Reciveable)
Sql>conn ap/ap (To connect to oracle Payable)

Sql>desc icx_parameters (To See URL and Daemon)


Sql>desc fnd_user; (To check all Application User Information)
Sql>desc fnd_tables; (To check all Registrated Tables to AOL)
Sql>desc fnd_views; (To check Views)
Sql>desc fnd_indexes; (To see Indexes)
Sql>desc fnd_tablespaces; (To see Tablespaces)
Sql>desc fnd_deferred_jobs; (Table to check adworker pending jobs)
Sql> desc fnd_profile_options_tl ; (To check FND Profile Information)
Sql>desc fnd_td_flexs; (To See Flex Field Information)
Sql>desc fnd_td_key; (To See Flex Field View Information)
Sql>desc fnd_rescriptive_flexs; (To See Prescriptive Flex Field Information)
Sql>desc fnd_concurrent_requests; (To check Concurrent Requests)
Sql>desc fnd_resp_functions;
Sql>desc fnd_resp_tl;
Sql>desc fnd_responsibility_functions;
Sql>select distinct,phase_code from fnd_concurrent_requests;
(To check Concurrent Request Information)
Sql>desc fnd_nodes;
(To check which Application Services is running on which Node)
Sql>desc fnd_product_installation;
Sql>desc fnd_product_groups;
Sql> desc ad_bugs; (To See Installed Patch Information)
Sql>desc ad_applied_patches; (To See Patch Information Installed by Users)
Sql>desc ad_patch_dreivers; (To See Patch Driver Action Information)
Sql>desc wf_resource; (To check all Information about Fork Flow)
Sql>desc tab; (To See all Tables, Views, Synonyms)

Sql>select home_url from icx_parameters; (To See URL of Apache Server)


Sql>select fnd_profile.value(‘APPS_MAINTENANCE_MODE’) from dual;
(To check the Application Maintenance Mode)
Sql>select fnd_profile.value(‘sitename’) from dual; (To check FND Profile Value)
Sql>select fnd_profile.value(‘PROFILE_VALUE_NAME’) from dual;
(To See the Profile Value)
Sql>select release_name from fnd_product_group;
(To check Application Version)
Sql>select text from wf_resources where name=’WF_VERSION’;
(To check Work Flow Version)
Sql>select text from wf_resources where name=’WF_ADMIN_ROLE’;
(To check current Work Flow Administrator)
Sql>select user_profile_option_name,profile_option_name from
fnd_profile_option_tl where user_profile_option_name=’site_name’;
(To check Site Level Profile)
Sql>select patch_name from ad_patches where patch=’12345’
(To check whether this Patch is already Installed or not)
Sql>select release_name from fnd_product_groups;
(To check Oracle Application Version)
Sql>select patch_level from fnd_product_installation where patch_level
like ‘%AD%’; (To check AD Patch)
Sql>select patch_name, creation_date from ad_applied_patvhes;
(To Check Patch Information)
Sql>select driver_file_name,driver_type_C_flag C, driver_type_D_flag D,
driver_type_G_flag G from adpatch_drivers where driver_file_name
like ‘%5161780%%’;
(To check Patch Driver Action by giving Patch Number)
Sql>select count(*), module from v$session where program like %JDBC%
group by module; (To check JDBC Thin Driver Version)
Sql>select * from tab where tname like 'NFD%';
Sql>select *from tab where tname like 'gl%';
Sql>select *from tab where tname='Po_usages';
Sql>select *from tab where tname-='gl_upgrades_status';

Commands:-
>$ cp –R $APPL_TOP /u02
(To take Backup of APPL_TOP on /u02 Location)
>$cp –R $COMMON_TOP /u02 (To take Backup of APPL_TOP on /u02)
>$cp –R $ORACLE_HOME /u02 (To take backup of ORACLE_HOME)
>$cp –R $IAS_ORACLE_HOME /u02
(To take backup of IAS_ORACLE_HOME)
>$ ps x (To see all Processes)
>$ps –ef | grep Apache (To check Apache Processes)
>$ps –ef | grep REP (To check Report Processes)
>$ps –ef | grep rwmts60 (To check report Server)
>$ps –ef | grep Disc (To check Discoverer Processes)
>$ps –ef | grep f60 (To check Forms Server Processes & other Info)
>$ps –ef | grep f60webmx | wc –l (To check number of Forms server Users)
>$ps –ef | grep srvm (To check Forms Executable Proecess)
>$ps –ef | grep FNDLIBR (To check Concurrent Server Processes)
>$ps –ef | grep FNDLIBR | grep appmgr01 (To check Concurrent Manager running or not)
>$ps –ef | grep FNDSM (To See Service Manager Process ID)
>$ps –ef | grep sm_pid
>$ps –a |grep adworker (To determine Worker ID Process)
>$ps –ef | grep httpd grep vis (To check Apache Processes)
>$ps –x (To see all Processes)
>$nestat -a | grep 9000 (To check the Status of Form Server)

>$which perl (To check Environment is Picking up the Correct Path or not)
>$echo $ORACLE_SID (To check Oracle SID)
>$echo $ORACLE_HOME (To see the Oracle Home directory Location)
>$echo $APPL_TOP (To see the Application Home directory Location)
>$echo $COMN_TOP (To see the COMN_TOP directory Location)
>$echo $INST_TOP (To see INST_TOP directory Location)
>$echo $AU_TOP (To see AU_TOP directory Location)
>$echo $GL_TOP (To see GL_TOP directory Location)
>$echo $FND_TOP (To see the FND_TOP directory Location)
>$echo $AO_HTML (To see the AO_HTML directory Location)
>$echo $TNS_ADMIN (To see the TNS_ADMIN directory Location)
>$echo $APPLTMP (To check the TEMP diretory Location)
>$cd $APPL_TOP (To go to Application directory)
>$cd $AU_TOP (To go to AU directory)
>$cd $COMMON_TOP (To go Common Top directory)
>$cd $INST_TOP (To go to Instance directory)
>$cd $FND_TOP (To go to FND directory)
>$cd $JAVA_TOP (To go Java directory)
>$cd $GL_TOP (To go to GL directory)
>$cd $APPLCSF/APPLLOG (To go to Log file Location)
>$cd $APPLCSF/APPLOUT (To go to OUT file Location)
>$. /APPSORA.env (To Set APPS Environment Variables)
>$rpm –a glibc (To verify Kernel Requirement)
>$Perl –v (To verify Perl Version & to conform if it is in the Path)
>$f60gen help=y (To see details of Command)
>$tracert www.domain.com
(To see the Network Path taken to connect to Network Domain)
>$ping vis.domain.com
>$adopmn.sh status (To check the Status of OPMS Managed Process)

Commands:-
• Ctrl + = To Insert New Records
• Ctrl + s = To save the Records
• F11 = (To bring the Form in Query Mode)
• Ctrl + F11 = (To see All the Form Contents)
• F4 = (To Close the Forms)
Tablespaces:-
• APPS_TS_TX_DATA = This Tablespace contain all the Modules
Transaction Data or Application Data like Data Dictionary.
• APPS_TS_TX_IDX = This Tablespace contain User Index Data
• APPS_TS_TX_interface = This Tablespace contain Interface Data
• APPS_TS_TX_media = This Tablespace contain Media & Graphic
Information like Pictures.

Tables:-
• AOL Data will be stored in FND_Tables in Applsys Schema.
• AD Data will be stored in AD_Tables in Applsys Schema.
• FW Data will be stored in FW_Tables in Appisys Schema.
Utilities:-
• FNDCPASS = It is an O/S level Utility to change Application Users Password.
• CONSCUB = It is an O/S level Utility to stop Concurrent Manager

SQL Scripts:-
Sql>@$AD_TOP/patch/115/sql/adsetmmd.sql enable
(To Enable Application Maintenance Mode)

Sql>@$AD_TOP/patch/115/sql/adsetmmd.sql disable
(To Disable Application Maintenance Mode)

Sql>cmclean.sql (To Clean Concurrent Manager Tables)

Sql>$FND_TOP/admin/sql/afpub.sql
(To set up grants and Synonyms for Application Public Schema) (APPLSYSPUB)
Sql>$FND_TOP/sql/afimchk.sql (To check the Status of ICM & PMON methods)

Sql>$FND_TOP/sql/afcmstat.sql (To list Active Manager Processes)

Sql>$FND_TOP/sql/afrqrun.sql (To List all Running, Waiting, & Terminating


Concurrent requests)

Sql>$FND_TOP/sql/afrqwait.sql (To List requests that are Constrained and


waiting for the ICM to release them)

Sql>$FND_TOP/sql/afrqscm.sql (To Print Log file Name of Managers that can run a
given request)

Sql>$FND_TOP/sql/afcmcreq.sql (To Print Log file Name of the Manager


that processes the request)

Sql>$FND_TOP/sql/afrqstat.sql (To check Summery of completed Concurrent requests)

Sql>$FND_TOP/sql/afimlock.sql (To List Locks that the Internal Concurrent


Manager is waiting to get)

Sql>$FND_TOP/sql/afcmrrq.sql (To Manager that currently running a request)

Sql>$FND_TOP/sql/afcmrrq.sql (To

Sql>@adgrants.sql Applsys (To create System objects and grant Privileges on objects)
Sql>$AD_TOP/admin/sql/adappsgs.pls
(To set up grants and Synonyms for every Oracle Application base Schema)

Sql>$FND_TOP/admin/sql/pub.sql (To set up Grants & Synonyms for the


Application Public Schema (APPLSYSPUB by default)

SqL>$AD_TOP/admin/sql/adgs.pls (To set up every Oracle Application


base product Schema)

Sql>$FND_TOP/startmgr/startmgr.sh (To starts the Internal Concurrent Manager)

Files & Its Contents:-


• PROD_node10.env = It is a Application Environment Variable file.
All the Environment Variables will in this files.

• PROD_node10.xml = All the Application Tire configuration information will


be in this file.
• PROD.dbc = It is the Database connectivity file used by Apache.
• APPSPROD_node10.env = It is the Consulted environment file, that
contain location of other environment files.

Q:- For Every Server & Component there will be a main Configuration file:-
1. Apache Server = httpd.conf
2. Form Server = appsweb.conf
3. OC4J = opmn.xml
4. oacore = server.xml
5. DMS = dms.conf
6. security = security.conf
5. RRA (Application Listener) = listener.ora

Location of All Files, Directories and Utilities:-

• Database Control Scripts:-


$ORACLE_HOME/appsutil/scripts/<CN> in (11i)
$ORACLE_HOME/appsutil/scripts/<CN> in (R12)

• Application Control Scripts:-


$COMMON_TOP/admin/scripts/<CN> In (11i)
$ADMIN_SCRIPTS_HOME/scripts/<CN> In (R12)

• Apache Server Configuration files:-


$IAS_ORACLE_HOME/Apache/Apache/httpd.conf in (11i)
$IAS_ORACLE_HOME/Apache/Apache/httpd.conf in (R12)

• Forms Server Configuration files:-


OA_HTML/bin/appsweb.conf in (11i)
OA_HTML/bin/appsweb.conf in (R12)

Report Server Configuration file:-


806_ORACLE_HOME/reports60/server/.ora in (11i)

OC4J Configuration file:-


$INST_TOP/ora/10.1.3/opmn/conf/opmn.xml in (R12)
• OACORE Configuration file:-
server.xml
• DMS Configuration file:-
dms.conf
• Security Configuration file:-
security.conf

• Database Context file:-


$ORACLE_HOME/appsutil/<CN>.xml in (11i)
$ORACLE_HOME/appsutil/<CN>.xml in (R12)

• Application Context files:-


$APPL_TOP/admin/<CN>.xml In (11i)
$INST_TOP/appl/admin/<CN>.xml In (R12)

• Database Environment files:-


$ORACLE_HOME/9.2.0/<CN>.env in (11i)
$ORACLE_HOME/appsutil/<CN>.xml in (R12)

• Application Environment files:-


$APPL_TOP/<CN>.env in (11i)
$AppL_TOP/apps_st/apps/<CN>.env in (R12)

• Cloning Utilities:-
$COMMON_TOP/clone/bin/.pl (for Appl) in (11i)
$ORACLE_HOME/appsutil/clone/bin/.pl (for Oracle) in (11i)
• Template files:-
$FND_TOP/admin/template/ in (11i)
$AD_TOP/admin/template/

DBC files:-
$FND_TOP/ in (11i)
$INST_TOP/appl/fnd/12.0.0/ in (R12)

AutoConfig Restore Script for Application:-


$APPL_TOP/admin/PROD/out/<DDMM:HHMM>/restore.sh

AutoConfig Restore Script for Database:-


$ORACLE_HOME/appsutil/out/PROD/<DDMM:HHMM>/restore.sh

Concurrent Manager Log file:-


If ($APPLCSF)Environment Variable is set the log file will be in
$APPLCSF/$APPLLOG in (11i)
If ($APPLCSF)Environment Variable is not set the log file will be in
$FND_TOP/$APPLLOG in (11i)
$INST_TOP/logs/appl/conc/log in (R12)

• AD Utilities:-
$AD_TOP/bin in (11i)

• FNDCPASS Utility:-
$FND_TOP/bin in (11i)
• Work Flow Load Utility:-
$FND_TOP/bin in (11i)

• Apache Log files:-


$INST_TOP/log/10.1.3/Apache/ In (R12)

• AD Patch Log files-


$APPL_TOP/admin/<SID>/log In (R12)

• AD Tools Log Files:-


$INST_TOP/APPL_CONFIG_HOME/admin/$TWO_TAKS/log In (R12)

• AD Scripts Log files:-


$INST_TOP/logs/appl/admin/log In (R12)

• AD Utilities log file:-


$APPL_TOP/admin/<SID>/adadmin.log In (11i)

• AD Worker Log file:-


$APPL_TOP/admin/<SID>/adworker.log In (R12)

• Report Server Log file:-


$806_ORACLE_HOME/reports60/server in (11i)

• OPMN Log files:-


$INST_TOP/logs/10.1.3/opmn/ in (R12)
• OC4J Log files (Text):-
$INST_TOP/logs/10.1.3/j2ee/oacore/ in (R12)

• OC4J Log files (ODL):-


$INST_TOP/logs/10.1.3/j2ee/oacore/log/oacore.default_group/oc4j in (R12)

J_Serv Log files:-


$IAS_ORACLE_HOME/Apache/Jserv/log

wdbsvr.app file:-
$IAS_ORACLE_HOME/Apache/modplsql/cfg

• Database Connectivity file:-


$FND_SECURE/<SID>.dbc In (11i)
$FND_SECURE/<SID>.dbc In(R12)

• Concurrent Program Out file:-


$APPLCSF/$APPLOUT In (11i)
$APPLCF/$APPLOUT In (R12)

AD Utilities out file


$APPL_TOP/admin/<SID>/out In (11i)
$APPL_TOP/admin/<SID>/out In (R12)

Application Schema out file:-


$APPL_TOP/admin/<SID>/out/APPS.lst
AD Utility Default Answer file:-
$APPL_TOP/admin/<SID>/adalldefaults.txt In (11i)

AD Utilities Restart Directories:-


$APPL_TOP/admin/<SID>/restart/ In (11i)
$APPL_TOP/admin/<SID>/restart/ In (R12)

D, C, R. files:-
/u01/<SID>data/ In (11i)
/u01/db/apps_st/data/ In (R12)

J_Serv Configuration file


$IAS_ORACLE_HOME/Apache/Jserv/etc/serv.con
$IAS_ORACLE_HOME/Apache/Jserv/Jserv.properties
$IAS_ORACLE_HOME/Apache/Jserv/etc/zone.properties

OC4J Configuration Files:-


$IAS_ORACLE_HOME/opmn/conf.xml
$IAS_ORACLE_HOME/j2ee/forms/config/server.xml
$IAS_ORACLE_HOME/j2ee/aocore/config/server.xml
$IAS_ORACLE_HOME/j2ee/forms/application-deployment/forms/orion-application.xml
$IAS_ORACLE_HOME/j2ee/oacore/application-deployment/oacore/orion-
Application.xml
$IAS_ORACLE_HOME/j2ee/forms/application-deployment/forms/formsweb/orion-
web.xml
$IAS_ORACLE_HOME/j2ee/aocore/application-
deployment/aocore/html/Orion-web.xml
Other Directories:-
• US = It contain language files
• Media = it contain Pictures files
• Report =It contain all Report Files
• Forms = It contain Forms files
• Mesg = It contain Messages files
• Sql = It contain Sql Scripts.

You might also like