Monday, March 21, 2022

Find Session Id Running Specific Query

 SET LINES 300

SET PAGES 999

COL SID FOR 99999

COL SER# FOR 9999999

COL OS_ID FOR A5

COL STATUS FOR A8

COL SQL_FULLTEXT FOR A60

SELECT

   SES.SID,

   SES.SERIAL# SER#,

   SES.PROCESS OS_ID,

   SES.STATUS,

   SQL.SQL_FULLTEXT

FROM 

   V$SESSION SES,

   V$SQL SQL,

   V$PROCESS PRC

WHERE

   SES.SQL_ID=SQL.SQL_ID AND

   SES.SQL_HASH_VALUE=SQL.HASH_VALUE AND 

   SES.PADDR=PRC.ADDR AND

   UPPER(SQL.SQL_FULLTEXT) LIKE UPPER('%CREATE%TABLE%');

Saturday, March 19, 2022

Disabled Trigger

 Disabled Trigger

 

SQL> select instance_name from v$instance;

 

INSTANCE_NAME

----------------

Raneshprod

 

SQL> sho user

USER is "APPS"

 

SQL> select object_name,object_type,status from dba_objects where object_name=‘ranesh_GL’;

 

OBJECT_NAME

--------------------------------------------------------------------------------

OBJECT_TYPE             STATUS

----------------------- -------

RA_CUST_TRX_LINE_GL_DIST_BRI

TRIGGER                 VALID

 

 

SQL> SELECT STATUS FROM USER_TRIGGERS WHERE TRIGGER_NAME =‘ranesh_GL’;

 

STATUS

--------

ENABLED

 

SQL> alter trigger RA_CUST_TRX_LINE_GL_DIST_BRI disable;

 

Trigger altered.

 

SQL> SELECT STATUS FROM USER_TRIGGERS WHERE TRIGGER_NAME =‘ranesh_GL’;

 

 

STATUS

--------

DISABLED

 

Table import and export.

Create Data Pump Directory. The first step in Oracle Data Pump is to create an OS level directory which will be used by Oracle for perform...