Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: DBA_OBJECTS

Re: DBA_OBJECTS

From: Danisment Gazi Unal (Unal Bilisim) <danisment.unal_at_unal-bilisim.com>
Date: Mon, 04 Jun 2001 02:20:45 -0700
Message-ID: <F001.00319EEC.20010604022521@fatcity.com>

Bunyamin,
Why don't you use v$locked_object ?
"Bunyamin K. Karadeniz" wrote:

I
want to select locked_objects in a view.I runCREATE OR REPLACE VIEW
V_BUN_LOCKED_OBJECTS AS SELECT
sn.username, m.sid, m.type,
    DECODE(m.lmode,
0, 'None'

                 

, 1, 'Null'
                 

, 2, 'Row Share'
                 

, 3, 'Row Excl.'
                 

, 4, 'Share'
                 

, 5, 'S/Row Excl.'
                 

, 6, 'Exclusive'
                 

, lmode, ltrim(to_char(lmode,'990'))) lmode,
    DECODE(m.request,
0, 'None'
                 

, 1, 'Null'
                 

, 2, 'Row Share'
                 

, 3, 'Row Excl.'
                 

, 4, 'Share'
                 

, 5, 'S/Row Excl.'
                 

, 6, 'Exclusive'
                 

, request, ltrim(to_char(request,'990'))) request,
         
obj1.object_name objname, obj2.object_name objname  FROM v$session sn, V$lock m,
dba_objects obj1, dba_objects obj2
 WHERE sn.sid = m.sid
 AND m.id1 = obj1.object_id (+)
 AND m.id2 = obj2.object_id (+)
   AND lmode != 4 ;  and 

gives error or ora-942. Can not find dba_objects .But with the same user I can query dba_objects table since my user has dba privilege.The inside of
view runs perfectly.Why
can it be??
--
Web: http://www.unal-bilisim.com
*********
Questions and Answers: http://www.unal-bilisim.com/qa/discus/
*********
itrprof SQL Analyzer: http://www.unal-bilisim.com/products/itrprof/itrprof.html
itrprof SQL Analyzer is a web based tool which analyzes
SQL_TRACE/Event10046 trace files of Oracle,
finds bottlenecks and offersinformation on how to tune them.
*********
iOraBugFinder: http://www.unal-bilisim.com/products/iorabugfinder/iorabugfinder.html
iOraBugFinder is a web based tool which scans Oracle's alert log files,
ORA-600 and ORA-7445 trace files; extracts relevant information from
them
and generates URL links to relevant bugs, notes, forums at Metalink.
*********
 
Received on Mon Jun 04 2001 - 04:20:45 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US