Send your questions to appsdbauniverse@gmail.com

Friday, March 18, 2016

Do you know how to create a database link without full TNS connect string starting 11g ?


SQL> CREATE DATABASE LINK test
  2  CONNECT TO remoteschema IDENTIFIED BY password
  3  USING 'remoteserver:port/VIS1';
  
Database link created.

========================================================================

Wednesday, March 16, 2016

Useful Apache logging:


12.2 E-Business Suite - How To Enable FND: Debug / AF Logging When Login Is Not Possible (Doc ID 1563168.1)
12.2 Ebusiness Suite - Collecting Fusion Middleware Log Files (Doc ID 1362900.1)
Oracle Applications E-Business Suite 12.2 Fusion Middleware Log Files: Locate,View, and Control (Doc ID 1366187.1)
Troubleshooting the Self Service Framework with Oracle Applications (Doc ID 231137.1)
How to Gather HTTP Header Information From a Client PC (Doc ID 815734.1)

========================================================================

Wednesday, March 2, 2016

How to check locks on a particular table/object


set lines 400
col Object format a40
col Locker format a6
col Type format a9
SELECT
SESSION_ID "SID",
serial#,
c.status,
c.audsid "ora_sess_id",
OWNER||'.'||OBJECT_NAME "Object",
  ORACLE_USERNAME "Locker",
-- mysessf(lockwait) "Wait",
-- lockwait "Wait",
  DECODE(LOCKED_MODE,
    2, 'ROW SHARE',
    3, 'ROW EXCLUSIVE',
    4, 'SHARE',
    5, 'SHARE ROW EXCLUSIVE',
    6, 'EXCLUSIVE',  'UNKNOWN') "Lockmode",
  OBJECT_TYPE "Type",
  c.ROW_WAIT_ROW#,
  c.inst_id
-- PROGRAM "Program"
FROM
  SYS.gV_$LOCKED_OBJECT A,
  SYS.ALL_OBJECTS B,
  SYS.gV_$SESSION c
WHERE
  A.OBJECT_ID = B.OBJECT_ID AND
  C.SID = A.SESSION_ID
  and object_name in ('&object_name')
ORDER BY 1 ASC, 5 Desc
/

Provide table_name or object_name in question to check the locks on it. 

========================================================================

How to check progress of a long running job


For example:
Let say you are trying to rebuild a table ML_SYSTEM_ITEMS_B with move command

alter table INV.ML_SYSTEM_ITEMS_B move;

This session keep on running and you want to check the status.

select target, opname, totalwork, sofar,units, (sofar/totalwork)*100 PERCENTAGE,elapsed_seconds from v$session_longops where target like '%MTL%SYSTEM%' and totalwork <> sofar;

========================================================================