Wednesday, July 30, 2008

Locations

Scripts location: $COMMON_TOP/admin/scripts/TRIAL_dba2
To start all the servers, script is adstrtal.sh apps/apps
To stop all the servers, script is adstpall.sh apps/apps

Apache
adapcctl.sh start/stop/status
1) adapcctl.sh status
2) ps –ef grep http
3) ps –ef grep –i apache

Conf file $IAS_ORACLE_HOME/Apache/Apache/conf/httpd.conf
LOG file $IAS_ORACLE_HOME/Apache/Apache/conf/error.log, access.log
JServer
Uses apachectl script
Uses apache commands
$IAS_ORACLE_HOME/Apache/Jserv/etc/jserv.properties
log file $IAS_ORACLE_HOME/Apache/Jserv/logs/mod_jserv.log
Mod PL/SQL
Uses apache ctl script
Uses apache commands
$IAS_ORACLE_HOME/Apache/modplsql/cfg/wdbsvr.app
log file $IAS_ORACLE_HOME/Apache/modplsql/log
Apps listener
adalnctl.sh start/stop/status
ps –ef grep lsnrgrep APPS_
invokes FNDFS executable located at $FND_TOP/bin (starts Report Reviewing Agent (RRA) responsible for viewing CM log and output files)
Forms
adfrmctl.sh start/stop/status
1) adfrmctl.sh status
2) ps –ef grep f60
3) ls –of grep
$COMMON_TOP/html/bin/appsweb_$CONTEXT_NAME.cfg
log file
$ORACLE_HOME/forms60/log/TRIAL-dba or
$COMMON_TOP/admin/log/TRIAL-dba2
Reports
adrepctl.sh start/stop/status
1) adrepctl.sh status
2) ps –ef grep –i rep
3) ps –ef grep rwmts
$ORACLE_HOME/reports60/server/
CGIcmd.dat
Log file
$ORACLE_HOME/reports60/server/REP60_XX.log
or
$COMMON_TOP/admin/log/xxxx/rep60_xxx.txt
Concurrent Manager
adcmctl.sh start/stop/status apps/passwd
1) adcmctl.sh status apps/pwd
2) ps –ef grep FNDLIBR
Uses startmgr and batchmgr parameters
Located at $FND_TOP/bin

Discoverer
addisctl.sh start/stop/status
1) addisctl.sh status
2) ps –ef grep –i disco
Log file
$ORACLE_HOME/discwb4/util/locator.log
And
Oad.log
And
Osagent.log
Database Tier Scripts:

Scripts location: $ORACLE_HOME/appsutil/scripts/TRIAL_dba2
addbctl.sh stop
addbctl.sh start
ps –ef grep smon
Listener
adlnctl.sh start
adlnctl.sh stop
ps –ef grep tns grep –i

Saturday, July 26, 2008

Oracle User

create user alfredo identified by alfredos_secret;
create user alfredo identified externally;
create user alfredo identified globally as 'external_name';
create user alfredoidentified by alfredos_secretdefault tablespace ts_userstemporary tablespace ts_temp;
grant connect to alfredo;
ALTER USER username [ WITH PASSWORD 'password' ] [ CREATEDB NOCREATEDB ] [ CREATEUSER NOCREATEUSER ] [ VALID UNTIL 'abstime' ]

ALTER USER myuser IDENTIFIED BY new_password;
ALTER USER myuser
DEFAULT TABLESPACE users TEMPORARY TABLESPACE temp
QUOTA 100M ON users QUOTA 0 ON my_data;
ALTER USER myuser ACCOUNT LOCK;
ALTER USER myuser ACCOUNT UNLOCK;
ALTER USER myuser PASSWORD EXPIRE;
ALTER USER mark WITH PASSWORD 'ml0215em'
ALTER USER mark VALID UNTIL 'Dec 24 2012'
DROP USER myuser CASCADE;

Object privileges allow a user to perform a specified action on a specific object. Other users can access user-owned objects by preceding the object name with the user name (username.object). Object privileges extend down to table columns.
GRANT {object privilege [, ... ] ALL [PRIVILEGES] } ON [schema.] objectTO { { user role PUBLIC } [, ... ] } [WITH GRANT OPTION];

GRANT {object privilege [, ... ] ALL [PRIVILEGES] } [(column [, ... ])] ON [schema.] objectTO { { user role PUBLIC } [, ... ] }[WITH GRANT OPTION];

Only INSERT, UPDATE and REFERENCES privileges can be granted at the column level.
To create users in Oracle whose authentication is done by the operating system or by password files, the DBA will use:

Method 1:
Step 1. Set the initSID.ora parameters as:
remote_os_authent=TRUE os_authent_prefix = "OPS$"
Step 2. Generate a new spfile
CREATE spfile FROM pfile='initorabase.ora';
3. Add the following to the sqlnet.ora
sqlnet.authentication_services = (NTS)
Method 2:
Step 1: Connect as system/manager in SQL*Plus and create the Oracle user:
CREATE USER ops$oracle IDENTIFIED EXTERNALLY;
GRANT create session TO ops$oracle;
Step 2: Create a user in the operating system named oracle if one does not already exist.
Step 3: Go to command line (terminal window in UNIX, cmd in Windows. Type 'sqlplus' (without the single quotes).
Method 3:
Step 1: Connect as system/manager in SQL*Plus and create the Oracle user:
CREATE USER "PC100USER" IDENTIFIED EXTERNALLY;
where PC100 is the name of the client computer. Then
GRANT CREATE SESSION TO "PC100USER";
Step 2: Create a user in Windows named USER.
Step 3: Log on Windows as USER and go to the C: command line. Object privileges allow a user to perform a specified action on a specific object. Other users can access user-owned objects by preceding the object name with the user name (username.object). Object privileges extend down to table columns.
GRANT {object privilege [, ... ] ALL [PRIVILEGES] } ON [schema.] objectTO { { user role PUBLIC } [, ... ] } [WITH GRANT OPTION];
GRANT {object privilege [, ... ] ALL [PRIVILEGES] } [(column [, ... ])] ON [schema.] objectTO { { user role PUBLIC } [, ... ] }[WITH GRANT OPTION];
Only INSERT, UPDATE and REFERENCES privileges can be granted at the column level.
To create users in Oracle whose authentication is done by the operating system or by password files, the DBA will use:
Method 1:
Step 1. Set the initSID.ora parameters as:
remote_os_authent=TRUE os_authent_prefix = "OPS$"
Step 2. Generate a new spfile
CREATE spfile FROM pfile='initorabase.ora';
3. Add the following to the sqlnet.ora
sqlnet.authentication_services = (NTS)
Method 2:
Step 1: Connect as system/manager in SQL*Plus and create the Oracle user:
CREATE USER ops$oracle IDENTIFIED EXTERNALLY;
GRANT create session TO ops$oracle;
Step 2: Create a user in the operating system named oracle if one does not already exist.
Step 3: Go to command line (terminal window in UNIX, cmd in Windows. Type 'sqlplus' (without the single quotes).
Method 3:
Step 1: Connect as system/manager in SQL*Plus and create the Oracle user:
CREATE USER "PC100USER" IDENTIFIED EXTERNALLY;
where PC100 is the name of the client computer. Then
GRANT CREATE SESSION TO "PC100USER";
Step 2: Create a user in Windows named USER.
Step 3: Log on Windows as USER and go to the C: command line.

Wednesday, July 16, 2008

Table Spaces

How to space for each schema
select sum(bytes),tablespace_name from dba_free_space where
tablespace_name not like 'TEMP%' and tablespace_name
not like 'RBS%' group by tablespace_name;

How to find the size of the database
select sum(BYTES)/1024/1024 from dba_free_space

Freespace/Largest Ext

select TABLESPACE_NAME,sum(BYTES) Total_free_space,
max(BYTES) largest_free_extent from dba_free_space
group by TABLESPACE_NAME

Objects in SYSTEM TS

select OWNER,SEGMENT_NAME,SEGMENT_TYPE,TABLESPACE_NAME,BYTES
from dba_segments
where TABLESPACE_NAME = 'SYSTEM'
and OWNER not in ('SYS','SYSTEM')
order by OWNER, SEGMENT_NAME

SYSTEM TABLESPACE USAGE NOTES:

select USERNAME,CREATED,PROFILE,DEFAULT_TABLESPACE,TEMPORARY_TABLESPACE
from dba_users order by USERNAME

TABLESPACE USAGE NOTES:
select a.TABLESPACE_NAME,a.BYTES bytes_used,b.BYTES bytes_free, b.largest,
round(((a.BYTES-b.BYTES)/a.BYTES)*100,2) percent_used
from
( select TABLESPACE_NAME,sum(BYTES) BYTES
from dba_data_files
group by TABLESPACE_NAME
)
a,
( select TABLESPACE_NAME,sum(BYTES) BYTES ,max(BYTES) largest
from dba_free_space
group by TABLESPACE_NAME
)
b
where a.TABLESPACE_NAME=b.TABLESPACE_NAME
order by ((a.BYTES-b.BYTES)/a.BYTES) desc

TABLESPACE INFORMATION NOTES
select TABLESPACE_NAME,INITIAL_EXTENT,NEXT_EXTENT,MIN_EXTENTS,
MAX_EXTENTS,PCT_INCREASE,STATUS,CONTENTS
from dba_tablespaces
order by TABLESPACE_NAME
WAIT STATISTIC NOTES
select TABLESPACE_NAME,TOTAL_EXTENTS, EXTENTS_COALESCED, PERCENT_EXTENTS_COALESCED,TOTAL_BYTES, BYTES_COALESCED,
TOTAL_BLOCKS,BLOCKS_COALESCED, PERCENT_BLOCKS_COALESCED
from dba_free_space_coalesced
order by TABLESPACE_NAME

Table space with PCT free

select df.tablespace_name "Tablespace",
totalusedspace "Used MB",
(df.totalspace - tu.totalusedspace) "Free MB",
df.totalspace "Total MB",
round(100 * ( (df.totalspace - tu.totalusedspace)/ df.totalspace))
"Pct. Free"
from
(select tablespace_name,
round(sum(bytes) / 1048576) TotalSpace
from dba_data_files
group by tablespace_name) df,
(select round(sum(bytes)/(1024*1024)) totalusedspace, tablespace_name
from dba_segments
group by tablespace_name) tu
where df.tablespace_name = tu.tablespace_name ;

Monday, July 14, 2008

FNDLOAD

FNDLOAD Options --

1 - Printer Styles
FNDLOAD apps/apps pwd O Y DOWNLOAD $FND_TOP/patch/115/import/afcppstl.lct file_name.ldt STYLE PRINTER_STYLE_NAME="printer style name"

2 - Lookups
FNDLOAD apps/apps pwd O Y DOWNLOAD $FND_TOP/patch/115/import/aflvmlu.lct file_name.ldt FND_LOOKUP_TYPE APPLICATION_SHORT_NAME="FND" LOOKUP_TYPE="lookup name"

FNDLOAD apps/apps pwd O Y UPLOAD $FND_TOP/patch/115/import/aflvmlu.lct file_name.ldt

3 - Descriptive Flexfield with all of specific Contexts
FNDLOAD apps/apps pwd O Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct file_name.ldt DESC_FLEX P_LEVEL=’COL_ALL:REF_ALL:CTX_ONE:SEG_ALL’ APPLICATION_SHORT_NAME="FND" DESCRIPTIVE_FLEXFIELD_NAME="desc flex name" P_CONTEXT_CODE="context name"

4 - Key Flexfield Structures
FNDLOAD apps/apps pwd O Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct file_name.ldt KEY_FLEX P_LEVEL=’COL_ALL:FQL_ALL:SQL_ALL:STR_ONE:WFP_ALL:SHA_ALL:CVR_ALL:SEG_ALL’ APPLICATION_SHORT_NAME="FND" ID_FLEX_CODE="key flex code" P_STRUCTURE_CODE="structure name"

5 - Concurrent Programs
FNDLOAD apps/apps pwd O Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct file_name.ldt PROGRAM APPLICATION_SHORT_NAME="FND" CONCURRENT_PROGRAM_NAME="concurrent program short name"

FNDLOAD apps/apps pwd O Y UPLOAD $FND_TOP/patch/115/import/afcpprog.lct file_name.ldt

SQL> select application_short_name from fnd_application;

6 - Value Sets
FNDLOAD apps/apps pwd O Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct file_name.ldt VALUE_SET_VALUE FLEX_VALUE_SET_NAME="value set name"

7 - Value Sets with values
FNDLOAD apps/apps pwd O Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct file_name.ldt VALUE_SET FLEX_VALUE_SET_NAME="value set name"

8 - Profile Options
FNDLOAD apps/apps pwd O Y DOWNLOAD $FND_TOP/patch/115/import/afscprof.lct file_name.ldt PROFILE PROFILE_NAME="profile option" APPLICATION_SHORT_NAME="FND"

Select application_id,PROFILE_OPTION_NAME =PROFILE OPTION ID
USER_PROFILE_OPTION_NAME from FND_PROFILE_OPTIONS_VL
Where PROFILE_OPTION_NAME like ‘UPPER %profile option name ‘
Order by PROFILE_OPTION_NAME

FNDLOAD apps/apps pwd O Y $FND_TOP/patch/115/import/afscprof.lct file_name.ldt

9 - Request Groups
FNDLOAD apps/apps pwd O Y DOWNLOAD $FND_TOP/patch/115/import/afcpreqg.lct file_name.ldt REQUEST_GROUP_NAME="request group" APPLICATION_SHORT_NAME="FND"

FNDLOAD apps/apps pwd O Y UPLOAD $FND_TOP/patch/115/import/afcprepqg.lct

10 - Request Sets
FNDLOAD apps/apps pwd O Y DOWNLOAD $FND_TOP/patch/115/import/afcprset.lct file_name.ldt REQ_SETAPPLICATION_SHORT_NAME="FND" REQUEST_SET_NAME="request set"

SELECT request set name from fnd_requests_sets_vl where user_request_set_name=’user name ‘

FNDLOAD apps/apps pwd OY UPLOAD $FND_TOP/patch/115/import/afcprset.lct file_name.ldt

11 - Responsibilities
FNDLOAD apps/apps pwd O Y DOWNLOAD $FND_TOP/patch/115/import/afscursp.lct file_name.ldt FND_RESPONSIBILITY RESP_KEY="responsibility"

FNDLOAD apps/apps pwd O Y UPLOAD $FND_TOP/patch/115/import/afscursp.lct file_name.ldt

12 - Menus
FNDLOAD apps/apps pwd O Y DOWNLOAD $FND_TOP/patch/115/import/afsload.lct file_name.ldt MENU MENU_NAME="menu_name"

Select user_menu_name from fnd_menues_vl where menu_name=’xx’

FNDLOAD apps/apps pwd O Y UPLOAD $FND_LOAD/patch/115/import/afsload.lct file_name.ldt

13 – users
FNDLOAD apps/apps pwd O Y DOWNLOAD $FND_TOP/patch/115/import/afscurp.lct file_name.ldt
FND_USER USER_NAME=”XYX”

Printers / Print queues / Executables Printers / Print queues / Executables.
Roles / Responsibilities / Forms Roles / Responsibilities / Forms.
Menus / Users / Request Sets Menus / Users / Request Sets.
Request Groups / Request Queues Request Groups / Request Queues.
Work shifts / Programs / Libraries Work shifts / Programs / Libraries.
Attachments / Help Files Attachments / Help Files.
Mime Types Mime Types.
Security Information.

Metalink Note id -- 274667.1


.ldt converted data file
.lct configuration file

Sunday, July 13, 2008

SQls

Display the current cursor being executed by a session.
select a.sid, a.username, b.sql_textfrom v$session a, v$open_cursor b where a.saddr = b.saddr;

Display the entire SQL statement being executed by a session.
select a.sid, a.username, b.sql_textfrom v$session a, v$sqltext bwhere a.sql_address = b.addressand a.sql_hash_value = b.hash_valueorder by a.sid, a.username, b.piece;

Display each cursor of the shared cursor cache, including the times executed and loaded into the cache.
select sql_text, version_count, executions, loads from v$sqlarea;

Displays licensing information, including the maximum number of licensed concurrent or named users, the current number of active concurrent sessions, and the highest number of users that were concurrently logged on at anyone time since the last database startup.
select sessions_max, sessions_current, sessions_highwater, users_max from v$license;

Display all the init.ora parameters and the current values, along with signifying if the value is the default value.
select name, value, isdefault from v$parameter order by name;

Redo LogsDisplay details on the redo log files, including the filename, size, and archive status. select a.member, b.*from v$logfile a, v$log bwhere a.group# = b.group#;

Display a history of the archive logs created along with the file names.
select * from v$log_history;

Rollback SegmentsDisplay rollback information and determine if more segments are needed. If the waits to gets goes over one, then add more rollback segments.
select a.name, b.extents, b.rssize, b.xacts, b.waits, b.gets, optsize, statusfrom v$rollname a, v$rollstat bwhere a.usn = b.usn;

Determine the number of sessions for each user.
select username, count(*) from v$sessiongroup by username;
Display detail information about a session, including the operating system username and process, and terminal.
select sid, username, program, osuser, process, machine, terminal, typefrom v$session;

Display detailed statistics per session to determine a session’s resource usage.
select a.sid, a.username, b.name, c.valuefrom v$session a, v$statname b, v$sesstat cwhere a.sid = c.sidand b.statistic# = c.statistic#and a.username = upper(‘&username’)order by a.sid, a.username, b.name;

Determine the objects that are being accessed by each session.
select a.sid, a.username, b.owner, b.object, b.ob_typfrom v$session a, v$access bwhere a.sid = b.sid;

Display the processes for each session. If the process is a background process, then the operating system and identifier are retrieved from the process table.
select a.sid, decode(b.background,1,b.program,a.username) "user", b.pid,decode (b.background,1,b.spid,a.audsid) "os id"from v$session a, v$process bwhere a.paddr = b.addr;

How to get the Patch set level
Select patch_level from fnd_product_installation where patch_level like ‘%AD%’;

SELECT a.sid, a.username, b.sql_textFROM v$session a, v$sqltext bWHERE a.sql_address = b.addressAND a.sql_hash_value = b.hash_value
ORDER BY a.username, a.sid, b.piece

The following query can be used to determine all objects that are currently being accessed by a user.
SELECT a.sid, a.username, b.owner, b.object, b.ob_typFROM v$session a, v$access bWHERE a.sid = b.sid

What Indexes Are Available on a Table?
SELECT index_name, column_name, column_ positionFROM all_ind_columnsWHERE table_name = ‘ACCOUNT’ORDER BY index_name,column_position

How to get the responsibility of the users

SELECT UNIQUE u.user_id, u.user_name,r.responsibility_name,a.application_name FROM fnd_user u, fnd_user_resp_groups g, fnd_application_tl a, fnd_responsibility_tl r WHERE g.user_id = u.user_id AND g.responsibility_application_id = a.application_id AND a.application_id = r.application_id AND g.responsibility_id = r.responsibility_id and user_name like 'userid'
How to get concurrent request ... sid
SELECT a.request_id, d.sid, d.serial# ,d.osuser,d.process , c.SPID
FROM apps.fnd_concurrent_requests a,apps.fnd_concurrent_processes b,
v$process c,v$session d WHERE a.controlling_manager = b.concurrent_process_id
AND c.pid = b.oracle_process_id
AND b.session_id=d.audsid
AND a.phase_code = 'P'
AND a.request_id = xxxxxxxxxx;


select REQUEST_ID , PHASE_CODE , STATUS_CODE, CONCURRENT_PROGRAM_ID, PARENT_REQUEST_ID ,ORACLE_PROCESS_ID,
ORACLE_SESSION_ID, OS_PROCESS_ID,QUEUE_ID from fnd_concurrent_requests where REQUEST_ID=55243326;
How to kill the concurrent request
update fnd_concurrent_requests set status_code ='D', phase_code = 'C' where request_id= request number;
How to find the version of WF
select TEXT from WF_RESOURCES where NAME='WF_VERSION';

LocK
SELECT b.session_id AS sid,
NVL(b.oracle_username, '(oracle)') AS username,
a.owner AS object_owner,
a.object_name,
Decode(b.locked_mode, 0, 'None',
1, 'Null (NULL)',
2, 'Row-S (SS)',
3, 'Row-X (SX)',
4, 'Share (S)',
5, 'S/Row-X (SSX)',
6, 'Exclusive (X)',
b.locked_mode) locked_mode,
b.os_user_name
FROM dba_objects a,
v$locked_object b
WHERE a.object_id = b.object_id
ORDER BY 1, 2, 3, 4;

SELECT s.sid,s. serial#, s.last_call_et, s.MODULE, s.status,
s.machine,p. spid, s.osuser FROM v$process p, v$session s
WHERE p.addr = s.paddr and s.module like '&MODULE' and
s.last_call_et>3600;

select SID,SERIAL# ,LAST_CALL_ET,MODULE,STATUS from v$session where LAST_CALL_ET>3600 and MODULE='&MODULE';
select * from v$lock where LMODE=6 and block=1 order by sid;

select * from sys.dba_dml_locks order by session_id;
dead lock.... select * from v$lock where lmode>0 and id1 in (select distint id1 from v$lock where request >0)

fnd_concurrent_program_vl

select s.SID,s.SERIAL#,l.TIME_REMAINING,s.SQL_HASH_VALUE from v$session_longops l,v$session s where s.sid=l.sid and s.serial#=l.serial# and s.sid=$sid; .... to get the time for the query

select sum(BYTES/1024/1024) from dba_free_space where TABLESPACE_NAME like %XYZ%';
to get the free space

select sum( BYTES/1024/1024) from dba_data_files where TABLESPACE_NAME like '%SDBD%';
to get the total space

select FILE_NAME,TABLESPACE_NAME,BYTES/1024/1024 from dba_data_files where TABLESPACE_NAME like '% BOMX %’
toget the location of the datafile

alter database datafile '/busdata/rp01/eur0/_lgi/oracle/vol24/gld02.dbf ' resize 3072M.... to alter the datafile



How to check the NLS patchs applied or not

SELECT driver.driver_file_name
,TO_CHAR(run.start_date,'DD-Mon HH24:MI:SS') start_date
,TO_CHAR(run.end_date ,'DD-Mon HH24:MI:SS') end_date
,lang.language
FROM ad_patch_runs run
,ad_patch_driver_langs lang
,ad_patch_drivers driver
,ad_applied_patches applied
WHERE run.patch_driver_id = driver.patch_driver_id
AND driver.applied_patch_id = applied.applied_patch_id
AND applied.patch_name = '&p_patch_number'
AND lang.patch_driver_id = driver.patch_driver_id
ORDER BY 1,2,3;



Workfolw
==========
select fsc.COMPONENT_NAME,fsc.STARTUP_MODE, fsc.COMPONENT_ STATUS
from APPS.FND_CONCURRENT_QUEUES_VL fcq, fnd_svc_components fsc
where fsc.concurrent_queue_id = fcq.concurrent_ queue_id( +)
and fcq.USER_CONCURRENT_QUEUE_NAME like '%Mail%';

Check Maintanance Mode
============ ========= =
select fnd_profile.value('APPS_MAINTENANCE_MODE') from dual;

Enable/Disable Maintanance Mode
============ ========= =========
sqlplus -s apps/@$AD_TOP/patch/115/sql/adsetmmd.sql ENABLE
sqlplus -s apps/@$AD_TOP/patch/115/sql/adsetmmd.sql DISABLE

Find invalid Object Count
============ ========= =
Select count(*) from dba_objects where object_Name= 'INVALID' ;

Compile invalid object
============ =======
Alter package APPS.MSC_CL_PRE_PROCESS compile body;

Compile all invalid objects
============ ========= ==
SQL> @$ORACLE_HOME/rdbms/admin/utlrp.sql

Find Applications Release
============ ========= ==
select release_name from fnd_product_ groups;


Find Number of Languages installed in Oracle Applications
============ ========= ========= ========= ========= ====
select nls_language, language_code,installed_flag
from apps.fnd_languages where installed_flag in ('I','B');

Database Name and Version
============ ========= ===
select instance_name, version from v$instance;

Find Number of Nodes in instance
============ ========= ========
select node_name,support_cp from fnd_nodes;


Perl Version
==========
perl -version

Java Version
===========
$AFJVAPRG -version

Apache Server Version
============ ========
$IAS_ORACLE_ HOME/Apache/Apache/bin/httpd -version

Form Server Version
============ =======
f60gen |grep -i version

Reports Server Version
============ =========
rwcon60 |grep -version

Find workflow version
============ =======
exec $FND_TOP/sql/wfver.sql

Find apps password
============ =====
grep password $APACHE_TOP/modplsql/cfg/wdbsvr.app

Find URL of the isntance
============ =========
env |grep -i forms

select profile_option_ value from apps.fnd_profile_option_values
where profile_option_value like '%http%';


How to get the concurrent Manger Name from requested

SELECT b.user_concurrent_queue_name
FROM 
fnd_concurrent_processes a
,fnd_concurrent_queues_vl b
,fnd_concurrent_requests c
WHERE 1=1
AND a.concurrent_queue_id = b.concurrent_queue_id
AND a.concurrent_process_id = c.controlling_manager
AND c.request_id = &request_id 

FNDCPASS

FNDCPASS logon 0 Y system/password mode username new_password
Where MODE is SYSTEM/USER/ORACLE/ALLORACLE (Introduced with patch 4745998

Use this command to change the password of a schema provided by an individual product in Oracle Applications.
FNDCPASS apps/ 0 Y system/ ORACLE Ex: FNDCPASS apps/apps 0 Y system/manager ORACLE GL GL1
3.To change all ORACLE schema passwords:Use this command to change the passwords of all schemas provided by Oracle Application products.
FNDCPASS apps/ 0 Y system/ ALLORACLE Ex: FNDCPASS apps/apps 0 Y system/manager ALLORACLE welcome
4.To change an Oracle Applications user’s password:You can use this command to change an individual Oracle Applications user’s password.
FNDCPASS apps/ 0 Y system/ USER Ex: FNDCPASS apps/apps 0 Y system/manager USER sysadmin welcome
FNDCPASS apps/gat5s 0 Y system/wynk00p USER st2008 oracle12

Changing passwords frequently helps ensure database security. Oracle Applications provides a command line utility,FNDCPASS, to set Oracle Applications schema passwords. This utility changes the password registered in OracleApplications tables and changes the schema password in the database. This utility can also change user passwords.
Note: You cannot change a schema name, such as APPLSYS or GL, after a product is installed, with FNDCPASS.
Attention: Ensure that the entire Oracle Applications system has been shut down before changing any schema passwords.
All users should log out and the Applications system should be down before running this utility.
If Oracle Applications user passwords are being changed then the relevant users should not be logged in.
Attention: Before changing any passwords, you should make a backup of the tables FND_USER and FND_ORACLE_USERID.
1.To change the APPS and APPLSYS schema password:Use this command to change passwords for schemas that are used by shared components of Oracle Applications.
FNDCPASS apps/ 0 Y system/ SYSTEM APPLSYS Ex: $FNDCPASS apps/apps 0 Y system/manager SYSTEM APPLSYS NEWPASSWORDAttention: Passwords for APPLSYS and the APPS schemas — including the MRC schema — must be the same.If you change the password for one, FNDCPASS automatically changes the others.This command does the following:
1. Validates APPLSYS.2. Re-registers password in Oracle Applications.3. Changes the APPLSYS and all APPS passwords (for multi-APPS schema installations) to the same password.Because everything with a Privilege Level [set to any of (’E', ‘U’, ‘D’)] in the FND_ORACLE_USERID tablemust always have the same password, FNDCPASS updates these passwords as well as APPLSYS’s password.For example, the APPS password will be updated when the APPLSYS password is changed.4. ALTER USER is executed to change the ORACLE password
for the above ORACLE users.
2.To change an Oracle Applications schema password (other than APPS/APPLSYS):Use this command to change the password of a schema provided by an individual product in Oracle Applications.
FNDCPASS apps/ 0 Y system/ ORACLE Ex: FNDCPASS apps/apps 0 Y system/manager ORACLE GL GL1
3.To change all ORACLE schema passwords:Use this command to change the passwords of all schemas provided by Oracle Application products.
FNDCPASS apps/ 0 Y system/ ALLORACLE Ex: FNDCPASS apps/apps 0 Y system/manager ALLORACLE welcome
4.To change an Oracle Applications user’s password:You can use this command to change an individual Oracle Applications user’s password.
FNDCPASS apps/ 0 Y system/ USER Ex: FNDCPASS apps/apps 0 Y system/manager USER sysadmin welcome
5.Post Step:
1. Use the FNDCPASS utility to change the password.
FNDCPASS APPS/ 0 Y SYSTEM/SYSTEM ORACLE ALLORACLE USER 2. Update configuration files.If you changed the APPS schema password (and APPLSYS) or the APPLSYSPUB password,update the following configuration files using AutoConfig (do not manually editthese files). They are used when connecting to Oracle Applications.If you changed the APPS (and APPLSYS) password, update the password in these files: iAS_TOP/Apache/modplsql/cfg/wdbsvr.appORACLE_HOME/reports60/server/CGIcmd.dat
If you changed the APPLSYSPUB password, update the password in these files: FND_TOP/resource/appsweb.cfg OA_HTML/bin/appsweb.cfgFND_TOP/secure/_.dbcNote: When changing APPS (or APPLSYS) and APPLSYSPUB passwords, do not restart thesystem until the entire password change process has been completed.
3. Verify the new password.
If you changed the password for APPS (and APPLSYS),restart all concurrent managers, then log on to Oracle Applications to test the new password.
passwd_chg.sh
#!/usr/bin/sh################################################################################# Program ID : passwd_chg.sh# Version : V1.0# Description: EBS 11.5.10 APPS passwd change# Reversion History# Date Version Name Description# ———- ——- ————– —————————————-# 2005.12.8 1.0 Bandari Huang Initial################################################################################
########## Initial Parameter ###############module_pass=”"old_apps_pass=”"new_apps_pass=”"system_pass=”"############################################
echo “GL password : “$module_passFNDCPASS apps/$old_apps_pass 0 Y system/$system_pass oracle gl $module_pass
echo “AP password : “$module_passFNDCPASS apps/$old_apps_pass 0 Y system/$system_pass oracle ap $module_pass
echo “AR password : “$module_passFNDCPASS apps/$old_apps_pass 0 Y system/$system_pass oracle ar $module_pass
echo “FA password : “$module_passFNDCPASS apps/$old_apps_pass 0 Y system/$system_pass oracle fa $module_pass
echo “INV password : “$module_passFNDCPASS apps/$old_apps_pass 0 Y system/$system_pass oracle inv $module_pass
echo “PO password : “$module_passFNDCPASS apps/$old_apps_pass 0 Y system/$system_pass oracle po $module_pass
echo “BOM password : “$module_passFNDCPASS apps/$old_apps_pass 0 Y system/$system_pass oracle bom $module_pass
echo “WIP password : “$module_passFNDCPASS apps/$old_apps_pass 0 Y system/$system_pass oracle wip $module_pass
echo “HR password : “$module_passFNDCPASS apps/$old_apps_pass 0 Y system/$system_pass oracle hr $module_pass
echo “ZPGL password : “$module_passFNDCPASS apps/$old_apps_pass 0 Y system/$system_pass oracle oralnxgl $module_pass
echo “ZPAP password : “$module_passFNDCPASS apps/$old_apps_pass 0 Y system/$system_pass oracle oralnxap $module_pass
echo “ZPAR password : “$module_passFNDCPASS apps/$old_apps_pass 0 Y system/$system_pass oracle oralnxar $module_pass
echo “ZPFA password : “$module_passFNDCPASS apps/$old_apps_pass 0 Y system/$system_pass oracle oralnxfa $module_pass
echo “ZPINV password : “$module_passFNDCPASS apps/$old_apps_pass 0 Y system/$system_pass oracle oralnxinv $module_pass
echo “ZPPO password : “$module_passFNDCPASS apps/$old_apps_pass 0 Y system/$system_pass oracle oralnxpo $module_pass
echo “ZPBOM password : “$module_passFNDCPASS apps/$old_apps_pass 0 Y system/$system_pass oracle oralnxbom $module_pass
echo “ZPWIP password : “$module_passFNDCPASS apps/$old_apps_pass 0 Y system/$system_pass oracle oralnxwip $module_pass
echo “ZPHR password : “$module_passFNDCPASS apps/$old_apps_pass 0 Y system/$system_pass oracle oralnxhr $module_pass
echo “ZPCST password : “$module_passFNDCPASS apps/$old_apps_pass 0 Y system/$system_pass oracle oralnxcst $module_pass
echo “APPS password : “$new_apps_passFNDCPASS apps/$old_apps_pass 0 Y system/$system_pass system applsys $new_apps_pass
########## wdbsvr.app file update
cp $APACHE_TOP/modplsql/cfg/wdbsvr.app $APACHE_TOP/modplsql/cfg/wdbsvr.app.old
sed -e “s/$old_apps_pass/$new_apps_pass/g” $APACHE_TOP/modplsql/cfg/wdbsvr.app.old > $APACHE_TOP/modplsql/cfg/wdbsvr.app
rm $APACHE_TOP/modplsql/cfg/wdbsvr.app.old
########## CGIcmd.dat file update modified by huangbandari 07-09-19
cp $ORACLE_HOME/reports60/server/CGIcmd.dat $ORACLE_HOME/reports60/server/CGIcmd.dat.old
sed -e “s/$old_apps_pass/$new_apps_pass/g” $ORACLE_HOME/reports60/server/CGIcmd.dat.old > $ORACLE_HOME/reports60/server/CGIcmd.dat
rm $ORACLE_HOME/reports60/server/CGIcmd.dat.old
Note:159270.1, Note:159244.1, Note:398942.1

-->

Cron jobs

example :
applmgr@dnux062: /home/applmgr> crontab -l
# 0 6 * * * /opt/oracle/local/bin/applptmp_cleanup ERPPROD
0,15,30,45 0-23 * * * /opt/oracle/local/bin/applptmp_cleanup ERPPROD
0 * * * * /opt/oracle/local/bin/applcsf_cleanup ERPPROD
# 0 0-23 * * * /home/applmgr/kevin/gcca_update_oe_interface2.sh
minute(s) hour(s) day(s) month(s) weekday(s) command(s)

applmgr@dnux046: /etc> crontab -l
0 6 * * * /home/applmgr/local/bin/applptmp_cleanup ERPTEST1
0 6 * * * /home/applmgr/local/bin/applcsf_cleanup ERPTEST1


applmgr@dnux046: /home/applmgr/local/bin> vi applptmp_cleanup
"applptmp_cleanup" 4 lines, 221 characters
#!/bin/sh
find /opt/grc/mvs/$1/temprpt -mtime +3 -name "*.t" -exec rm -f {} \;
find /opt/grc/mvs/$1/temprpt -mtime +3 -name "*.tmp" -exec rm -f {} \;
find /opt/grc/mvs/$1/temprpt -mtime +3 -name "*.dbg" -exec rm -f {} \;

applmgr@dnux046: /home/applmgr/local/bin> vi applcsf_cleanup
#!/bin/sh
find /opt/grc/mvs/$1/temp/out/$1_dnux046 -mtime +1 -name "M*.dat" -exec rm -f {} \;
find /opt/grc/mvs/$1/temp/out/$1_dnux046 -mtime +1 -name "M*.ctl" -exec rm -f {} \;
find /opt/grc/mvs/$1/temp/out/$1_dnux046 -mtime +11 -name "*.r[12345]" -exec rm -f {} \;
find /opt/grc/mvs/$1/temp/out/$1_dnux046 -mtime +11 -name "p*.c[12345]" -exec rm -f {} \;


Summary of the problem: The permissions of the FIFO file in /var/adm/cron was altered and the cron job started to work.

Can you check the following...
Verify that you actually have a /var/adm/cron/FIFO file.
If this file is absent, you can make the pipe by running:
mknod /var/adm/cron/FIFO p
Don't forget to include the p argument at the end.
The output destination for cron error messages is console.
cron aborted: can't change directory to the crontab directory.
Cause:
The directory could not be changed to the crontab directory.
Action:
Create a /usr/spool/cron/crontabs directory and restart cron.
cron aborted: can't read the crontab directory
Cause:
No directory information could be read from the crontab directory.
Action:
Check the permission of the /usr/spool/cron/crontabs directory and restart cron.
cron aborted: cannot create fifo queue
Cause:
A /usr/lib/cron/FIFO file could not be created.
Action:
There might be insufficient inodes in the disk containing usr/lib/cron or the directory might not exist. Check these possibilities, then restart cron.
cron aborted: cannot access fifo queue
Cause:
The FIFO file could not be accessed.
Action:
Check the permission of the /usr/lib/cron/FIFO file, enable the file to be accessed, then restart cron.
cron aborted: cannot stat cron: FIFO exists
Cause:
cron cannot be newly executed because the FIFO file already exists (cron is already active).
Action:
None.
cron aborted: cannot open fifo queue
Cause:
The FIFO file could not be opened.
Action:
Check the permission of the /usr/lib/cron/FIFO file, enable
Cause:
The log file could not be opened.
Action:
Check the permission of the /usr/lib/cron/log file, enable the file to be opened, then restart cron.
cron aborted: cannot start fifo queue
Cause:
No information could be acquired from the /usr/lib/cron/FIFO file.
Action:
The /usr/lib/cron/FIFO file or directory might not exist. Check these possibilities, then restart cron.
cron aborted: cron could not unlink FIFO
Cause:
The /usr/lib/cron/FIFO file could not be deleted.
Action:
Check whether the /usr/lib/cron/FIFO file exists. When the file exists, use the rm command to delete it.
cron aborted: SIGTERM
Cause:
cron terminated because it received the SIGTERM signal.
Action:
None.
cannot allocate n byte of space
Cause:
Memory could not be allocated.
Action:
If necessary, increase the value of the kernel system constant MAXUMEM.

Imp Links

http://neosatish.blogspot.com/2007/07/11idocid.html
http://advait.wordpress.com/2008/07/01/important-tables-for-adpatch/
http://www.redhat.com/docs/manuals/csgfs/Oracle_GFS-en-US/Setup_and_Scripts.html
http://www.dba-oracle.com/art_dbazine_conc_mgr.htm
http://www.orafaq.com/node/854 locks
http://www.itk.ilstu.edu/docs/Oracle/server.101/b10755/dynviews_1123.htm locks
http://www.fortunecity.com/skyscraper/oracle/699/orahtml/ioug/vtables.html
http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14237/toc.htm
http://www.techonthenet.com/oracle/sys_tables/
http://dbafix.blogspot.com/search/label/Oracle%20DBA%20Issues
http://www.blacksheepnetworks.com/security/resources/www.think-forward.com/sqltips.htm

user level export and import

expdp parfile=PLCT170.par oracle@uslp123sd7dfcvxsza > more PLCT050.par userid= "/ as sysdba" dumpfile=T050.dmp logfile=expdpT0...