-- Database Details
SELECT * FROM v$database
-- Instance Details
SELECT * FROM v$instance
-- License Details
SELECT * FROM v$license
-- Version Details
SELECT * FROM v$version
--Release Details
SELECT * FROM apps.fnd_product_groups
-- Patch Details
SELECT * FROM ad_applied_patches
SELECT * FROM ad_bugs
-- Partitioning Installed
SELECT DECODE (COUNT (*), 0, 'No', 'Yes') partitioning
FROM (SELECT 1
FROM dba_part_tables
WHERE owner NOT IN ('SYSMAN', 'SH', 'SYS', 'SYSTEM') AND ROWNUM = 1);
-- Spatial Installed
SELECT DECODE (COUNT (*), 0, 'No', 'Yes') spatial
FROM (SELECT 1
FROM all_sdo_geom_metadata
WHERE ROWNUM = 1);
-- RAC Installed
SELECT DECODE (COUNT (*), 0, 'No', 'Yes') rac
FROM (SELECT 1
FROM v$active_instances
WHERE ROWNUM = 1);
-- Unix Product Top Value
SELECT variable_name, value
FROM apps.fnd_env_context
WHERE variable_name = 'AP_TOP'
AND concurrent_process_id =
(SELECT MAX (concurrent_process_id) FROM apps.fnd_env_context);
-- List of Installed Applications
SELECT fat.application_id, fat.application_name, fpi.creation_date, fpi.product_version, fpi.status, fpi.TABLESPACE, fpi.install_group_num, fpi.db_status, fpi.patch_level, fpi.industry
FROM fnd_product_installations fpi, fnd_application_tl fat
WHERE fpi.application_id = fat.application_id AND fpi.status = 'I'
Different Column Values are as below:
STATUS
S- Shared Install
I- Installed Product
L- Custom Product
N- Not Installed
INSTALL_GROUP_NUM
0- SOA Products
1- MOA (Multiple oracle account) Products. It needs multiple oracle account to support multiple set of books
INDUSTRY
C- Commercial
G- Educational or Non-Profit Use
B- Project Billing
P- Project Costing
-- Query to Find list of peoples Locking AP Object
SELECT c.owner, c.object_name, c.object_type, fu.user_name locking_user_name,
fl.start_time, vs.module, vs.machine, vs.osuser, vs.SID, vp.pid,
vp.spid AS os_process_to_kill, vs.serial#, vs.status, vs.saddr,
vs.audsid, vs.process
FROM fnd_logins fl,
fnd_user fu,
v$locked_object vlocked,
v$process vp,
v$session vs,
dba_objects c
WHERE vs.SID = vlocked.session_id
AND vlocked.object_id = c.object_id
AND vs.paddr = vp.addr
AND vp.spid = fl.process_spid(+)
AND vp.pid = fl.pid(+)
AND fl.user_id = fu.user_id(+)
AND c.object_name LIKE 'AP%';
-- Command to Kill Session for Releasing Lock
ALTER SYSTEM KILL SESSION '(sid, serial#)';
-- Check Users who are Online
SELECT
p.spid -- The UNIX PID
,s.sid ,s.serial#
,p.username as os_user
,s.username ,s.status
,p.terminal ,p.program
FROM v$session s ,v$process p
WHERE p.addr = s.paddr
ORDER BY s.username ,p.spid ,s.sid ,s.serial# ;
-- Locked Table Information
SELECT
p.spid -- The UNIX PID
,s.sid ,s.serial#
,p.username as os_user
,s.username ,s.status
,p.terminal ,p.program
FROM v$session s ,v$process p
WHERE p.addr = s.paddr
ORDER BY s.username ,p.spid ,s.sid ,s.serial# ;
No comments:
Post a Comment