Professional Documents
Culture Documents
11i/r12 Scripts: Os Level Command
11i/r12 Scripts: Os Level Command
11i/r12 Scripts: Os Level Command
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
PL/SQL Release 11.1.0.7.0 - Production
CORE 11.1.0.7.0 Production
TNS for Linux: Version 11.1.0.7.0 - Production
NLSRTL Version 11.1.0.7.0 - Production
SQL> select
INST_ID,
INSTANCE_NUMBER ,
INSTANCE_NAME ,
HOST_NAME ,
VERSION ,
STATUS ,
PARALLEL ,
THREAD#
from gv$instance ;
VERSION
--------------------------------------------------------------------------------
10.1.2.0.2
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
RELEASE_NAME
--------------------------------------------------
12.1.1
2. Start Listener:-
[oracle@r0469 scripts]$ cd /oracle/VIS/db/tech_st/11.1.0/appsutil/scripts/VIS_r0469/
[oracle@r0469 VIS_r0469]$ ./addlnctl.sh start VIS
Starting listener process VIS ...
3. Start Applications:-
[oracle@r0469 ~]$ cd /oracle/VIS/apps/apps_st/appl/
[oracle@r0469 appl]$ . APPSVIS_r0469.env
[oracle@r0469 appl]$ cd $ADMIN_SCRIPTS_HOME
[oracle@r0469 scripts]$ ./adstrtal.sh apps/apps
2. Down Listener:-
[oracle@r0469 scripts]$ cd /oracle/VIS/db/tech_st/11.1.0/appsutil/scripts/VIS_r0469/
[oracle@r0469 VIS_r0469]$ ./addlnctl.sh stop VIS
Logfile: /oracle/VIS/db/tech_st/11.1.0/appsutil/log/VIS_r0469/addlnctl.txt
COUNT(DISTINCTD.USER_NAME)
--------------------------
3
This will give the number of users on the system in the past 1 hour:-
SQL> select count(distinct user_id) "users" from icx_sessions where last_connect >
sysdate - 1/24 and user_id != '-1';
users
----------
4
This will give the number of users on the system in the past 1 day:-
SQL> select count(distinct user_id) "users" from icx_sessions where last_connect >
sysdate - 1 and user_id != '-1';
users
----------
12
This will show the activity in the last 15 minutes:-
SQL> select limit_time, limit_connects, to_char(last_connect, 'DD-MON-RR HH:MI:SS')
"Last Connection time", user_id, disabled_flag from icx_sessions where last_connect >
sysdate - 1/96;
ROUND(SUM(BYTES/1024/1024/1024))
--------------------------------
184
ROUND(SUM(BYTES/1024/1024/1024))
--------------------------------
38
COUNT(*)
----------
641
COUNT(*)
----------
0
COUNT(*)
----------
1
Total no of session :-
SQL> SELECT count(*) FROM v$session;
COUNT(*)
----------
105
Total no of concurrent Process:-
SQL> SELECT COUNT(*) FROM apps.fnd_concurrent_processes;
COUNT(*)
----------
672
SYSDATE-1 COUNT(*)
------------------ ----------
18-SEP-12 218
Database Size:-
SQL> select tablespace_name,sum(bytes/1024/1024) from dba_data_files group by
tablespace_name order by 1;
TABLESPACE_NAME SUM(BYTES/1024/1024)
------------------------------ --------------------
APPS_CALCLIP 4770
APPS_OMO 1150
APPS_TS_ARCHIVE 1101
APPS_TS_DISCO 856
APPS_TS_DISCO_OLAP 1350
APPS_TS_INTERFACE 2404
APPS_TS_MEDIA 5211.25
APPS_TS_NOLOGGING 575
APPS_TS_QUEUES 4299
APPS_TS_SEED 3803
APPS_TS_SUMMARY 22369
TABLESPACE_NAME SUM(BYTES/1024/1024)
------------------------------ --------------------
APPS_TS_TX_DATA 62692.25
APPS_TS_TX_IDX 32471
B2B_DT 68
B2B_IDX 16
B2B_LOB 12
B2B_RT 42
BAM 8
BIA_RTL 1000
CTXSYS 79
CUST 20
CWMLITE 23
TABLESPACE_NAME SUM(BYTES/1024/1024)
------------------------------ --------------------
DATA 7200
DCM 198
DEMANTRA 5400
DISCO_PTM5_CACHE 108
DISCO_PTM5_META 3
DSGATEWAY_TAB 7
DW_AGGREGATE_IDX 100
DW_AGGREGATE_TBS 100
DW_BASE_IDX 100
DW_BASE_TBS 100
DW_DERIVED_IDX 100
TABLESPACE_NAME SUM(BYTES/1024/1024)
------------------------------ --------------------
DW_DERIVED_TBS 100
DW_DM_TBS 100
DW_LOOKUP_TBS 100
DW_MVLOG_TBS 100
DW_REFERENCE_IDX 100
DW_REFERENCE_TBS 133.9375
GEOR_TBS 2136
HTMLDB 287
IAS_META 221
MTR 4
OCATS 3
TABLESPACE_NAME SUM(BYTES/1024/1024)
------------------------------ --------------------
ODM_DATA 40
OLAP_BAAD 1500
OLTS_ATTRSTORE 15
OLTS_BATTRSTORE 15
OLTS_CT_STORE 8
OLTS_DEFAULT 3
OLTS_SVRMGSTORE 3
OPMOR 6
ORABPEL 12
OWAPUB 10
PERFSTAT_TS 500
TABLESPACE_NAME SUM(BYTES/1024/1024)
------------------------------ --------------------
RBS_MIG 43
RE 8
SYNCSERVER 54
SYSAUX 1327
SYSTEM 19297
TS_DP 50
TS_SALES_DATA 50
TS_SALES_DATA_ENGINE 50
TS_SALES_DATA_ENGINE_X 50
TS_SALES_DATA_X 50
TS_SIM 50
TABLESPACE_NAME SUM(BYTES/1024/1024)
------------------------------ --------------------
TS_SIM_X 50
UDDISYS_TS 21
UNDO_TBS 3686.40625
USERS 10
WCRSYS_TS 3
XDB 61
72 rows selected.
TABLESPACE_NAME SUM(BYTES/1024/1024)
------------------------------ --------------------
APPS_CALCLIP 1543.75
APPS_OMO 511.875
APPS_TS_ARCHIVE 197.375
APPS_TS_DISCO 86.125
APPS_TS_DISCO_OLAP 1333.875
APPS_TS_INTERFACE 220.125
APPS_TS_MEDIA 495.75
APPS_TS_NOLOGGING 285.25
APPS_TS_QUEUES 610
APPS_TS_SEED 420.75
APPS_TS_SUMMARY 2208.75
TABLESPACE_NAME SUM(BYTES/1024/1024)
------------------------------ --------------------
APPS_TS_TX_DATA 6836
APPS_TS_TX_IDX 3728.875
B2B_DT 7.125
B2B_IDX 1.6875
B2B_LOB 1.3125
B2B_RT 4
BAM 1.6875
BIA_RTL 999.9375
CTXSYS 29.5
CUST 19
CWMLITE 1.75
TABLESPACE_NAME SUM(BYTES/1024/1024)
------------------------------ --------------------
DATA 7199.6875
DCM 19.75
DEMANTRA 5399.75
DISCO_PTM5_CACHE 10.5
DISCO_PTM5_META 1.0625
DSGATEWAY_TAB 1.5
DW_AGGREGATE_IDX 99.9375
DW_AGGREGATE_TBS 99.9375
DW_BASE_IDX 99.9375
DW_BASE_TBS 99.9375
DW_DERIVED_IDX 99.9375
TABLESPACE_NAME SUM(BYTES/1024/1024)
------------------------------ --------------------
DW_DERIVED_TBS 99.9375
DW_DM_TBS 99.9375
DW_LOOKUP_TBS 99.9375
DW_MVLOG_TBS 99.9375
DW_REFERENCE_IDX 99.9375
DW_REFERENCE_TBS 133.875
GEOR_TBS 214.25
HTMLDB 28.625
IAS_META 21.875
MTR 2.3125
OCATS 1.25
TABLESPACE_NAME SUM(BYTES/1024/1024)
------------------------------ --------------------
ODM_DATA 9.5625
OLAP_BAAD 1499.8125
OLTS_ATTRSTORE 14.6875
OLTS_BATTRSTORE 14.6875
OLTS_CT_STORE .8125
OLTS_DEFAULT 1.4375
OLTS_SVRMGSTORE .8125
OPMOR 1.375
ORABPEL .5
OWAPUB 9.9375
PERFSTAT_TS 347.25
TABLESPACE_NAME SUM(BYTES/1024/1024)
------------------------------ --------------------
RBS_MIG 3.9375
RE 1.4375
SYNCSERVER 5.2265625
SYSAUX 80.25
SYSTEM 1862.41406
TS_DP 49.9375
TS_SALES_DATA 49.9375
TS_SALES_DATA_ENGINE 49.9375
TS_SALES_DATA_ENGINE_X 49.9375
TS_SALES_DATA_X 49.9375
TS_SIM 49.9375
TABLESPACE_NAME SUM(BYTES/1024/1024)
------------------------------ --------------------
TS_SIM_X 49.9375
UDDISYS_TS 1.875
UNDO_TBS 1176.25
USERS 1.9375
WCRSYS_TS 1.3125
XDB 6.1875
72 rows selected.
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+
COMMAND
24483 oracle 15 0 111m 66m 16m S 15.3 1.7 2:03.81
frmweb
23176 oracle 16 0 45524 7720 4920 S 3.3 0.2 0:30.07
httpd
24487 oracle 15 0 1194m 488m 476m S 1.7 12.3 1:18.22
oracle
26519 oracle 15 0 2360 1164 800 R 0.7 0.0 0:00.27
top
23850 oracle 17 0 1159m 90m 86m S 0.3 2.3 0:02.34
oracle
24080 oracle 17 0 1158m 54m 51m S 0.3 1.4 0:01.02 oracle
5. Total size and free size on apps mount point (All Servers):-
[oracle@r0469 ~]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda5 434G 358G 54G 87% /
/dev/sda2 9.5G 151M 8.9G 2% /tmp
/dev/sda1 965M 23M 893M 3% /boot
tmpfs 2.0G 3.0M 2.0G 1% /dev/shm
How to bounce Apache, clear HTML cache and have updated Java
code class active in R12:-
The pages directory under $COMMON_TOP should not be cleared for E-Biz
R12,
which we used to do in 11i applications.
For clearing middle tier cache in R12, Navigate to
Login as sysadmin/sysadmin
Functional Administrator responsibility > Core Services > Caching
Framework > Global Configuration > Clear cache
Bouncing apache or Application....
Instead of clearing the _pages, in R12 creates blank login page issue, as in
R12 the jsp files does not get compiled automatically.
[oracle@r0469 ~]$ cd /oracle/VIS/inst/apps/VIS_r0469/admin/scripts
At R12 level bouncing apache command is different from the one to bounce
oacore, oc4j engine and others.
In 11i the apache start and stop command, also bounce the JVM running on
JSERV and clear caches by doings as below :
But in R12 the command to stop and start apache only takes action on
Apache web server and not on the OC4J container that executes the JVM.
Monitor Highest SQL Wait Time Using Active Session History (ASH)
SELECT h.session_id, h.session_serial#, h.sql_id, h.session_state,
h.blocking_session_status, h.event, e.wait_class, h.module, u.username, SQL.sql_text,
SUM(h.wait_time + h.time_waited) “Total Wait Time (ms)”
FROM v$active_session_history h, v$sqlarea SQL, dba_users u, v$event_name e
WHERE h.sample_time BETWEEN sysdate – 1/24 AND sysdate –event in the last hour
AND h.sql_id = SQL.sql_id
AND h.user_id = u.user_id
AND h.event# = e.event#
GROUP BY h.session_id, h.session_serial#, h.sql_id, h.session_state,
h.blocking_session_status, h.event, e.wait_class, h.module, u.username, SQL.sql_text
ORDER BY SUM(h.wait_time + h.time_waited) DESC
Monitor Highest Object Wait Time Using Active Session History (ASH)
SELECT o.owner, o.object_name, o.object_type, h.session_id, h.session_serial#,
h.sql_id, h.module, SUM(h.wait_time + h.time_waited) “Total Wait Time (ms)”
FROM v$active_session_history h, dba_objects o, v$event_name e
WHERE h.sample_time BETWEEN sysdate – 1/24 AND sysdate –event in the last hour
AND h.current_obj# = o.object_id
AND e.event_id = h.event_id
GROUP BY o.owner, o.object_name, o.object_type, h.session_id, h.session_serial#,
h.sql_id, h.module
ORDER BY SUM(h.wait_time + h.time_waited) DESC
Monitor Highest Event Wait Time Using Active Session History (ASH)
SELECT h.event “Wait Event”, SUM(h.wait_time + h.time_waited) “Total Wait Time
(ms)”
FROM v$active_session_history h, v$event_name e
WHERE h.sample_time BETWEEN sysdate – 1/24 AND sysdate –event in the last hour
AND h.event_id = e.event_id
AND e.wait_class <> ‘Idle’
GROUP BY h.event
ORDER BY SUM(h.wait_time + h.time_waited) DESC
You can query this for how much free, used, total, and percentage filled space is
available for each tablespace
select tablespace_name, ROUND(bytes_free,2) free,ROUND(bytes_total-bytes_free,2)
used, ROUND(bytes_total,2) total,perused
from (select a.tablespace_name, a.bytes_free,b.bytes_total,
ROUND((100-(100*a.bytes_free/b.bytes_total)),2) perused from
(Select tablespace_name,sum(bytes)/1024/1024 bytes_free From dba_free_space
Group by tablespace_name) a,
(Select tablespace_name,sum(bytes)/1024/1024 bytes_total From dba_data_files
Group by tablespace_name) b
where a.tablespace_name=b.tablespace_name) where perused >= 0 ORDER BY
tablespace_name;
select tablespace_name,sum(bytes)/(1024*1024) from dba_free_space
group by tablespace_name;
[oracle@r0469 ]$ cd /oracle/VIS/inst/apps/VIS_r0469/admin/scripts
[oracle@r0469 scripts]$ ll
total 176
-rwx------ 1 oracle dba 7301 Aug 31 12:33 adalnctl.sh
-rwx------ 1 oracle dba 8243 Aug 31 12:34 adapcctl.sh
-rwx------ 1 oracle dba 1540 Aug 31 12:33 adautocfg.sh
-rwx------ 1 oracle dba 16497 Aug 31 12:33 adcmctl.sh
-rwx------ 1 oracle dba 7215 Aug 31 12:33 adexecsql.pl
-rwx------ 1 oracle dba 8728 Aug 31 12:34 adformsctl.sh
-rwx------ 1 oracle dba 10208 Aug 31 12:34 adformsrvctl.sh
-rwx------ 1 oracle dba 7996 Aug 31 12:34 adoacorectl.sh
-rwx------ 1 oracle dba 8004 Aug 31 12:34 adoafmctl.sh
-rwx------ 1 oracle dba 7282 Aug 31 12:34 adopmnctl.sh
-rwx------ 1 oracle dba 15298 Aug 31 12:33 adpreclone.pl
-rwx------ 1 oracle dba 5801 Aug 31 12:33 adstpall.sh
-rwx------ 1 oracle dba 5945 Aug 31 12:33 adstrtal.sh
-rwx------ 1 oracle dba 2240 Aug 31 12:34 gsmstart.sh
drwxrwxrwx 2 oracle dba 4096 May 5 14:53 ieo
-rwx------ 1 oracle dba 2277 Aug 31 12:34 java.sh
-rwx------ 1 oracle dba 6388 Aug 31 12:36 jtffmctl.sh
drwxrwxrwx 2 oracle dba 4096 May 5 14:53 msc
-rwxrwxr-- 1 oracle dba 6632 Aug 31 12:36 mwactl.sh
-rwxrwxr-- 1 oracle dba 6645 Aug 31 12:36 mwactlwrpr.sh
-rwxrwxrwx 1 oracle dba 1438 May 16 11:56 sqlnet.log
Connecting to (ADDRESS=(PROTOCOL=TCP)(Host=r0469)(Port=1626))
STATUS of the LISTENER
------------------------
Alias APPS_VIS
Version TNSLSNR for Linux: Version 10.1.0.5.0 - Production
Start Date 20-SEP-2012 09:47:09
Uptime 0 days 3 hr. 4 min. 58 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File
/oracle/VIS/inst/apps/VIS_r0469/ora/10.1.2/network/admin/listener.ora
Listener Log File
/oracle/VIS/inst/apps/VIS_r0469/logs/ora/10.1.2/network/apps_vis.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=r0469.oracle.com)
(PORT=1626)))
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
Below are some of the queries that can be used to get the database and Application
information.
M
-
Y
BEGIN
FND_USER_RESP_GROUPS_API.LOAD_ROW
(X_USER_NAME => 'ANATESH',
X_RESP_KEY => 'APPLICATION_DEVELOPER',
X_APP_SHORT_NAME => 'FND',
X_SECURITY_GROUP => 'STANDARD',
X_OWNER => 'SYSADMIN',
X_START_DATE => Trunc(sysdate),
X_END_DATE => NULL,
X_DESCRIPTION => NULL,
X_LAST_UPDATE_DATE => Trunc(sysdate));
COMMIT;
END
He needed query that can list all the responsibilities attached to a user.
Type of DB Links
There are 3 types of DB links. They are as follows:
2. PUBLIC: The Public DBLINK is available to all the users and all users can have the
access without any restrictions.
Types of Logins:
In dblink we can use 2 types of login. They are as follows:
1. DEFAULT LOGIN: The User name and Password is same in both the databases.
Syntax
======
CREATE [PUBLIC] DATABASE LINK CONNECT TO CURRENT_USER USING
Code: (Text)
Create public database link daslink connect to current_user using ‘ORCL’
2. EXPLICIT LOGIN: The User Name and Password is different in both the databases.
Syntax
======
CREATE [PUBLIC|SHARED] DATABASE LINK CONNECT TOIDENTIFIED BY USING
Code: (text)
CREATE PUBLIC DATABASE LINK DDLNK CONNECT TO SCOTT IDENTIFIED BY
TIGER USING ‘ORCL’
Note: To create the public DBLINK the user must have create public database link
system privileges.
path:D:\app\prasanthb\product\11.1.0\db_1\NETWORK\ADMIN
oracle2test =
(DESCRIPTION =
(ADDRESS_LIST =
(CONNECT_DATA =
(SERVICE_NAME =VIS)
(SRVR = DEDICATED)
)
)
If you want to find out the URL of the Application in the database in which table you can
check ?
Option 1:
SQL> select * from icx_parameters;
Option 2:
SELECT PROFILE_OPTION_VALUE
FROM FND_PROFILE_OPTION_VALUES
WHERE PROFILE_OPTION_ID = (SELECT PROFILE_OPTION_ID
FROM FND_PROFILE_OPTIONS
WHERE
PROFILE_OPTION_NAME ='APPS_FRAMEWORK_AGENT')
AND LEVEL_VALUE=0;
Query to find who and when update an Oracle Application user's profile
SELECT
fu.user_id,
fu.user_name,
fr.responsibility_name,
fr.description,
fa.application_name
FROM fnd_user fu,
fnd_user_resp_groups g,
fnd_application_tl fa,
fnd_responsibility_tl fr
WHERE
g.user_id(+) = fu.user_id
AND g.responsibility_application_id = fa.application_id
AND fa.application_id = fr.application_id
AND g.responsibility_id = fr.responsibility_id
AND fu.user_name =UPPER('User_Name');
How to get Login Passwords for application & Data Base instances
Most often, oracle apps developers have to work in different DB instances for
development as well as for testing purposes. In such situations we need to
get access to different oracle application instances and data base
(dev/test/crp etc.,) instances. So we have to request & follow a lengthy
approval process to get those login details, some times you may end up in
loosing your delivery schedules.
There is a simple way by which you can get the logins/passwords of your DB
& Application with out chasing the DBAs.
Oracle follows an encryption algorithm to encrypt user passwords. Most
references to the encryption algorithm point to either the PL/SQL package
APPS.FND_WEB_SEC or the Java class
"oracle.apps.fnd.security.WebSessionManagerProc".
For decryption and encryption, the following calls are made:
APPS.FND_WEB_SEC >
oracle.apps.fnd.security.WebSessionManagerProc>
oracle.apps.fnd.security.AolSecurity>
oracle.apps.fnd.security.AolSecurityPrivate
The actual encryption and decryption routines are in the
"oracle.apps.fnd.security.AolSecurityPrivate" Java class. This Java class is
stored both in the database as a Java Stored Procedure and in the operating
system directory $COMMON_TOP/java.
-- Package Body
CREATE OR REPLACE PAGE BODY get_pwd AS
FUNCTION decrypt (KEY IN VARCHAR2,VALUE IN VARCHAR2)RETURN
VARCHAR2 AS
LANGUAGE JAVA
NAME
'oracle.apps.fnd.security.WebSessionManagerProc.decrypt(java.lang
.String,java.lang.String) return java.lang.String';
END get_pwd;
STATUS_CODE
A Waiting
B Resuming
C
D Cancelled
E Error
F Scheduled
G Warning
H On Hold
I
M No Manager
Q Standby
R
S Suspended
T Terminating
U Disabled
W Paused
X Terminated
Z Waiting
SELECT
f.user_name
,a.request_id "Req Id"
,a.concurrent_program_id "Prg Id"
,a.RESPONSIBILITY_ID Responsibility
,a.phase_code,a.status_code
,b.os_process_id "OS"
,vs.sid
,vs.serial# "Serial#"
,vp.spid
,TO_CHAR(request_date,'DD-MON-YY hh24:mi:ss') request_date
,(NVL(a.actual_completion_date,SYSDATE)-
a.actual_start_date)*1440 "Time"
,c.concurrent_program_name||' - '||
c2.user_concurrent_program_name "Program"
FROM ASYS.fnd_Concurrent_requests a
,APPLSYS.fnd_concurrent_processes b
,applsys.fnd_concurrent_queues q
,APPLSYS.fnd_concurrent_programs_tl c2
,APPLSYS.fnd_concurrent_programs c
,APPLSYS.fnd_user f
,v$session vs
,v$process vp
WHERE
a.controlling_manager = b.concurrent_process_id
AND a.concurrent_program_id = c.concurrent_program_id
AND a.program_application_id = c.application_id
AND c2.concurrent_program_id = c.concurrent_program_id
AND c2.application_id = c.application_id
AND a.phase_code IN ('I','P','R','T')
AND a.requested_by = f.user_id
AND b.queue_application_id = q.application_id
AND b.concurrent_queue_id = q.concurrent_queue_id
AND c2.LANGUAGE = 'US'
AND a.oracle_process_id = vp.spid
AND vs.paddr = vp.addr
ORDER BY 9
Step 2 : Get Sid from step1 and Keep on executing this query in SQL.
This query will show the currently running SQL in the DB, as your
concurrent is submitted and running. You can now find out the exact
query ( select / insert / update ) which is actually taking time in
your concurrent program.
In iSQL*Plus, click the Help button to display iSQL*Plus help. Or Use the
below command line help system. In some DB system schema may not be
available, then use sys.help instead.
select *
from system.help
where upper(topic)=upper('string')
select request_id,
fcpt.user_concurrent_program_name,
completion_text,
actual_start_date,
actual_completion_date,
to_date((actual_completion_date - actual_start_date), 'HH:MM:SS')
duration
from fnd_concurrent_requests fcr,
fnd_concurrent_programs fcp,
fnd_concurrent_programs_tl fcpt
where fcr.concurrent_program_id = fcp.concurrent_program_id
and fcp.concurrent_program_id = fcpt.concurrent_program_id
and fcr.actual_start_date > sysdate - 1
order by actual_completion_date - actual_start_date desc
The below table shows all the data base object information:
select * from dba_objects where object_name like '%HEADER%' and
object_type = 'TABLE'
You can use the following query to locate the trace file, it takes as input the '
Concurrent Request id'
SELECT
'Request id: '||request_id ,
'Trace id: '||oracle_Process_id,
'Trace Flag: '||req.enable_trace,
'Trace Name: '||dest.value||'/'||lower(dbnm.value)||'_ora_'||
oracle_process_id||'.trc',
'File Name: '||execname.execution_file_name||
execname.subroutine_name ,
'Status : '||decode(phase_code,'R','Running') ||'-'||
decode(status_code,'R','Normal'),
'SID Serial: '||ses.sid||','|| ses.serial#, 'Module : '||
ses.module
from
fnd_concurrent_requests req,
v$session ses,
v$process proc,
v$parameter dest,
v$parameter dbnm,
fnd_concurrent_programs_vl prog,
fnd_executables execname where req.request_id = &request
and req.oracle_process_id=proc.spid(+)
and proc.addr = ses.paddr(+)
and dest.name='user_dump_dest'
and dbnm.name='db_name'
and req.concurrent_program_id = prog.concurrent_program_id
and req.program_application_id = prog.application_id
and prog.application_id = execname.application_id
and prog.executable_id=execname.executable_id;
In the above directory, do 'ls -l' for '*3465*trc' and any latest file that you
see with 3465 as a part of the file name would be the trace file.
Use ALTER SYSTEM command to KILL SESSION and this will release the
lock.
ALTER SYSTEM KILL SESSION 'SID,SERIALl#';
This script will report the SQL text of some of the locks currently
being held in the database
select s.username username,
a.sid sid,
a.owner||'.'||a.object object,
s.lockwait,
t.sql_text SQL
from v$sqltext t,
v$session s,
v$access a
where t.address=s.sql_address
and t.hash_value=s.sql_hash_value
and s.sid = a.sid
and a.owner != 'SYS'
and upper(substr(a.object,1,2)) != 'V$'
Query used for audit point of view i.e. when a profile is changed and
by which user
SELECT t.user_profile_option_name,
profile_option_value,
v.creation_date,
v.last_update_date,
v.creation_date - v.last_update_date "Change Date",
(SELECT UNIQUE user_name
FROM fnd_user
WHERE user_id = v.created_by) "Created By",
(SELECT user_name
FROM fnd_user
WHERE user_id = v.last_updated_by) "Last Update By"
FROM fnd_profile_options o,
fnd_profile_option_values v,
fnd_profile_options_tl t
WHERE o.profile_option_id = v.profile_option_id
AND o.application_id = v.application_id
AND start_date_active <= SYSDATE
AND NVL (end_date_active, SYSDATE) >= SYSDATE
AND o.profile_option_name = t.profile_option_name
AND level_id = :p_value
AND t.LANGUAGE IN (SELECT language_code
FROM fnd_languages
WHERE installed_flag = 'B'
SELECT nls_language
FROM fnd_languages
WHERE installed_flag = 'B')
ORDER BY user_profile_option_name;
:p_value is (10001 -> site level, 10002 -> application level, 10003 ->
responsibility level, 10004 – user level)
****************************************END******************************************