DOYENSYS Knowledge Portal




We Welcome you to visit our DOYENSYS KNOWLEDGE PORTAL : Doyensys Knowledge Portal




Monday, March 7, 2016

Query to find out the bind variable by using sql_id, duplicate datafile in a database.

Query to find out the duplicate datafile in a database.


select substr(name, instr(name, '/',-1)+1) ,count(*) from v$datafile group by substr(name, instr(name, '/',-1)+1) having count(*) >1;

select substr(name, instr(name, '/',-1)+1) df from v$datafile;



Query to find out the bind variable by using sql_id


column name format a30
column datatype_string format a30
column value_string format a30

set lines 120 pages 200
accept v_sql_id prompt 'Enter SQL_ID->'

Select name, datatype_string, value_string
    from v$sql_bind_capture
  where sql_id = '&v_sql_id';

No comments: