Select on dba_waiters

Hi All,
We have recently upgraded our db from 10.2.0.4 to 11.2.0.2, and now we have an issue with query on dba_Waiters.
when we do the select * from dba_waiters, it is taking very long time and finally getting failed with temp after running for 30mins and more.
by enabling a trace on the query, we found it is spending most of the time on "direct path write temp" wait event.
=====================
PARSING IN CURSOR #18446744071470188984 len=26 dep=0 uid=0 oct=3 lid=0 tim=1758952907349 hv=1408819362 ad='4bd952488' sqlid='cba5ap99zjs52'
select * from dba_waiters
END OF STMT
PARSE #18446744071470188984:c=420000,e=665459,p=97,cr=1592,cu=0,mis=1,r=0,dep=0,og=1,plh=2022232088,tim=1758952907348
EXEC #18446744071470188984:c=0,e=240,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,plh=2022232088,tim=1758952907730
WAIT #18446744071470188984: nam='SQL*Net message to client' ela= 5 driver id=1650815232 #bytes=1 p3=0 obj#=-1 tim=1758952907794
*** 2012-09-20 17:28:19.418
WAIT #18446744071470188984: nam='Disk file operations I/O' ela= 2101 FileOperation=2 fileno=1033 filetype=2 obj#=-1 tim=1758959581215
WAIT #18446744071470188984: nam='direct path write temp' ela= 14485 file number=1033 first dba=261784 block cnt=15 obj#=-1 tim=1758959629254
WAIT #18446744071470188984: nam='direct path write temp' ela= 15316 file number=1033 first dba=261799 block cnt=15 obj#=-1 tim=1758959646269
WAIT #18446744071470188984: nam='direct path write temp' ela= 4235 file number=1033 first dba=261814 block cnt=15 obj#=-1 tim=1758959662271
WAIT #18446744071470188984: nam='direct path write temp' ela= 13712 file number=1033 first dba=261844 block cnt=15 obj#=-1 tim=1758959696774
WAIT #18446744071470188984: nam='direct path write temp' ela= 13650 file number=1033 first dba=261859 block cnt=15 obj#=-1 tim=1758959711794
WAIT #18446744071470188984: nam='direct path write temp' ela= 22314 file number=1033 first dba=261874 block cnt=15 obj#=-1 tim=1758959735263
WAIT #18446744071470188984: nam='direct path write temp' ela= 11525 file number=1033 first dba=234904 block cnt=15 obj#=-1 tim=1758959767538
WAIT #18446744071470188984: nam='direct path write temp' ela= 15790 file number=1033 first dba=234919 block cnt=15 obj#=-1 tim=1758959783986
WAIT #18446744071470188984: nam='direct path write temp' ela= 5591 file number=1033 first dba=234934 block cnt=15 obj#=-1 tim=1758959799351
Any suggestion ?
Increased the pga (from 1GB to 2GB) and adding of the temp space didn't helped out in resolving this.
Regards
Suni

It looks like this problem: Re: Not able to query rman related views
exec dbms_stats.DELETE_TABLE_STATS('SYS','X$KCCRSR');
exec dbms_stats.LOCK_TABLE_STATS('SYS','X$KCCRSR');
alter system flush shared_pool;
exec dbms_stats.delete_fixed_objects_stats();
exec dbms_stats.gather_fixed_objects_stats();
It appears most of the time after a upgrade.

Similar Messages

  • BC4J application causes DB locks with iAS 1.0.2.2

    Hi,
    We've deployed a BC4J JSP application to iAS. After a few (not
    more then 5!!) requests, the application seems to hang. At
    first, we thought it was iAS that didn't respond, but after a
    while we noticed DB sessions with a lockwait.
    We configured the BC4J samples and did a few tests. The result
    was the same: we had a lock after a few requests.
    Here are the details about the lock:
    select sid, lockwait,status, sql_hash_value, prev_hash_value
    from v$session
    where username ='BC4J'
    and sid in (29,30)
    SID LOCKWAIT STATUS SQL_HASH_VALUE PREV_HASH_VALUE
    29 INACTIVE 2784278226 2784278226
    30 38117E20 ACTIVE 1756791003 1334541938
    select * from dba_blockers
    HOLDING_SESSION
    29
    select sql_text from v$sqltext
    where hash_value = '2784278226' -- Hash value and Previous hash
    value blocker
    order by piece
    SQL_TEXT
    SELECT InventoryItem.ID, InventoryItem.NAME, InventoryItem.DESCR
    IPTION, InventoryItem.IMAGE, InventoryItem.PRICE, InventoryItem.
    ONHAND, InventoryItem.SUPPLIER_ID, InventoryItem.CATEGORY_ID FRO
    M INVENTORY_ITEM InventoryItem WHERE (category_id=8)
    select * from dba_waiters
    WAITING_SESSION HOLDING_SESSION LOCK_TYPE
    MODE_HELD
    MODE_REQUESTED
    LOCK_ID1
    LOCK_ID2
    30 29 Transaction
    Exclusive
    Share
    327705
    63779
    select sql_text from v$sqltext
    where hash_value = '1756791003' -- Hash value waiter
    order by piece
    SQL_TEXT
    INSERT INTO LINE_ITEM(STATUS,QUANTITY,BACKORDER,ITEM_ID,ORD_ID,
    DISCOUNT) VALUES (:1,:2,:3,:4,:5,:6)
    select sql_text from v$sqltext
    where hash_value = '1334541938' -- Previous hash value waiter
    order by piece
    SELECT LINE_ITEM_SEQ.NEXTVAL FROM DUAL
    So my question is: what is causing the lock? I'm doing an insert
    and a select?
    Regards,
    Philip

    Can someone respond please!
    I tried to run the Online Orders sample application on iAS 1.0.2.1 and 1.0.2.2. On both iAS versions, the sample application created a DB session for each request to the page addtocart.jsp. After 2 (sometimes 3) requests, one DB session has a lockwait and the application stops responding.
    This problem is easy to reproduce. Just create the BC4J schema, go to http://localhost:7778/onlineorders_html/main.jsp and try to add a few items in your shopping cart....
    Thanks!

  • Index contention & row lock contention

    Hi,
    Recently our application loaded a handsome amount of data into our production database. The process took around 5 to 6 hours. During this process, we observed that the performance degraded.
    The major wait events are
    1) TX index contention (concurrency) and
    2) ROW LOCK CONTENTION (application).
    The sql which lead to index contention is a simple insert statement into a table x and row lock contention is into a table y.
    Both x and y are major detail tables of our application. X has around 4 foreign keys, one foriegn key is referencing table y. the foreign key column x is indexed.
    our database is on 10gR2 and using ASSM.
    The data block wait event stats during the load process is as follows
    select * from dba_hist_waitstat where snap_id between '21454' and '21462' AND WAIT_COUNT>0 and class='data block';
    SNAP_ID DBID INSTANCE_NUMBER CLASS WAIT_COUNT TIME
    21454 3937665896 1 data block 195089769 33899167
    21455 3937665896 1 data block 195095958 33902183
    21456 3937665896 1 data block 195096398 33902377
    21457 3937665896 1 data block 195097225 33902843
    21458 3937665896 1 data block 195628987 34037147
    21459 3937665896 1 data block 195944006 34055524
    21460 3937665896 1 data block 195944496 34055642
    21461 3937665896 1 data block 196183308 34112433
    21462 3937665896 1 data block 196213292 34127409
    9 rows selected.
    select snap_id,eq_type,req_reason, total_req#, total_wait#,failed_req#, cum_wait_time from dba_hist_enqueue_stat where snap_id between '21454' and '21462' and failed_req#>0 and eq_type='TM'
    SYS@sqdb AS SYSDBA> /
    SNAP_ID EQ REQ_REASON TOTAL_REQ# TOTAL_WAIT# FAILED_REQ# CUM_WAIT_TIME
    21454 TM contention 682928465 14 2735 1750
    21455 TM contention 682939964 14 2735 1750
    21456 TM contention 682950668 14 2735 1750
    21457 TM contention 682967980 14 2735 1750
    21458 TM contention 682983109 14 2735 1750
    21459 TM contention 682998136 14 2735 1750
    21460 TM contention 683006816 14 2735 1750
    21461 TM contention 683018179 14 2735 1750
    21462 TM contention 683432945 14 2735 1750
    9 rows selected.
    I dont see any significant ITL contention on these objects compared to other contention. (from segment statistics)
    SYS@sqdb AS SYSDBA> select b.object_name,a.snap_id, a.physical_writes_total,a.physical_writes_delta,a.physical_reads_total,a.physical_reads_delta, a.itl_waits_total,a.itl_waits_delta from dba_hist_seg_stat a,(select object_id,object_name from dba_objects where owner='ABCD') b where snap_id between '21454' and '21462' and a.obj#= b.object_id and a.itl_waits_delta> 0 order by itl_waits_delta,2,1;
    OBJECT_NAME SNAP_ID PHYSICAL_WRITES_TOTAL PHYSICAL_WRITES_DELTA PHYSICAL_READS_TOTAL PHYSICAL_READS_DELTA ITL_WAITS_TOTAL ITL_WAITS_DELTA
    IX4_Y 21462 37958 169 105668 174 38 1
    IX4_X 21462 102380 1480 147196 5780 56 1
    As per the application design, for each row of Y, there are multiple number of rows in X and it varies. What additional information do you think I should be collecting and any tips to fix the issue?
    Thanks,
    Murthy

    hi
    Are you using in your insert statement something like "SELECT ... FOR UPDATE"
    post the result of this query during the error:
    SELECT * FROM DBA_BLOCKERS;
    SELECT * FROM DBA_WAITERS;

  • SQL*Net more data to dblink event for hours or days

    Hello Everyone,
    in our production database when we commit a transaction we call a remote procedure over dblink.
    usually the call succeeds ,but every now and then a couple of sessions hang up,
    when I use the session browser of Toad I notice that these sessions are waiting with the event SQL*Net more data to dblink
    below are some queries and their results:
    select sid,event,wait_class,wait_time,seconds_in_wait,state from gv$session_wait where sid=225
    rslt:
    225 SQL*Net more data to dblink Network -1 18279 WAITED SHORT TIME
    select * from gv$session_wait_history where sid=225
    rslt:
    INST_ID     SID     SEQ#     EVENT#     EVENT     P1TEXT     P1     P2TEXT     P2     P3TEXT     P3     WAIT_TIME     WAIT_TIME_MICRO     TIME_SINCE_LAST_WAIT_MICRO
    2     225     1     344     SQL*Net more data to dblink     driver id     1413697536     #bytes     8144          0     0     8     41
    2     225     2     344     SQL*Net more data to dblink     driver id     1413697536     #bytes     8143          0     0     13     39
    2     225     3     344     SQL*Net more data to dblink     driver id     1413697536     #bytes     8149          0     0     7     37
    2     225     4     344     SQL*Net more data to dblink     driver id     1413697536     #bytes     8145          0     0     8     40
    2     225     5     344     SQL*Net more data to dblink     driver id     1413697536     #bytes     8145          0     1     11394     37
    2     225     6     344     SQL*Net more data to dblink     driver id     1413697536     #bytes     8143          0     0     7     37
    2     225     7     344     SQL*Net more data to dblink     driver id     1413697536     #bytes     8145          0     0     7     36
    2     225     8     344     SQL*Net more data to dblink     driver id     1413697536     #bytes     8138          0     0     8     37
    2     225     9     344     SQL*Net more data to dblink     driver id     1413697536     #bytes     8149          0     0     8     38
    2     225     10     344     SQL*Net more data to dblink     driver id     1413697536     #bytes     8149          0     1     11476     37I'm not sure but from the above results ,is it safe to conclude that I get stuck because I am caught in infinite loop trying to write to dblink?
    additional notes:
    <li>some times when I look at the current statement I find that the statement is a query or insert into a local table.
    <li>there were some network outages.
    <li>when viewing the database log files I found:Error 3135 trapped in 2PC on transaction 7.6.306086. Cleaning up.
    Error stack returned to user:
    ORA-03135: connection lost contact
    ORA-02063: preceding line from MPF//where MPF is the name of dblinkeven though we use the DBLink to execute the procedure only without any changes on the remote DB, and we don't use 2PC.
    <li> the local DB is a RAC
    select * from dba_blockers
    rslt:
    no rows
    select * from dba_waiters
    rslt:
    no rows
    select * from gv$lock where sid=225
    rslt:
    INST_ID     ADDR     KADDR     SID     TYPE     ID1     ID2     LMODE     REQUEST     CTIME     BLOCK
    2     0000000199D54F60     0000000199D54FB8     225     AE     100     0     4     0     20152     2
    2     000000018EA18108     000000018EA18180     225     TX     1114138     251539     6     0     19654     2
    select * from gv$session where sid=225
    rslt:
    INST_ID     SADDR     SID     SERIAL#     AUDSID     PADDR     USER#     USERNAME     COMMAND     OWNERID     TADDR     LOCKWAIT     STATUS     SERVER     SCHEMA#     SCHEMANAME     OSUSER     PROCESS     MACHINE     PORT     TERMINAL     PROGRAM     TYPE     SQL_ADDRESS     SQL_HASH_VALUE     SQL_ID     SQL_CHILD_NUMBER     SQL_EXEC_START     SQL_EXEC_ID     PREV_SQL_ADDR     PREV_HASH_VALUE     PREV_SQL_ID     PREV_CHILD_NUMBER     PREV_EXEC_START     PREV_EXEC_ID     PLSQL_ENTRY_OBJECT_ID     PLSQL_ENTRY_SUBPROGRAM_ID     PLSQL_OBJECT_ID     PLSQL_SUBPROGRAM_ID     MODULE     MODULE_HASH     ACTION     ACTION_HASH     CLIENT_INFO     FIXED_TABLE_SEQUENCE     ROW_WAIT_OBJ#     ROW_WAIT_FILE#     ROW_WAIT_BLOCK#     ROW_WAIT_ROW#     TOP_LEVEL_CALL#     LOGON_TIME     LAST_CALL_ET     PDML_ENABLED     FAILOVER_TYPE     FAILOVER_METHOD     FAILED_OVER     RESOURCE_CONSUMER_GROUP     PDML_STATUS     PDDL_STATUS     PQ_STATUS     CURRENT_QUEUE_DURATION     CLIENT_IDENTIFIER     BLOCKING_SESSION_STATUS     BLOCKING_INSTANCE     BLOCKING_SESSION     FINAL_BLOCKING_SESSION_STATUS     FINAL_BLOCKING_INSTANCE     FINAL_BLOCKING_SESSION     SEQ#     EVENT#     EVENT     P1TEXT     P1     P1RAW     P2TEXT     P2     P2RAW     P3TEXT     P3     P3RAW     WAIT_CLASS_ID     WAIT_CLASS#     WAIT_CLASS     WAIT_TIME     SECONDS_IN_WAIT     STATE     WAIT_TIME_MICRO     TIME_REMAINING_MICRO     TIME_SINCE_LAST_WAIT_MICRO     SERVICE_NAME     SQL_TRACE     SQL_TRACE_WAITS     SQL_TRACE_BINDS     SQL_TRACE_PLAN_STATS     SESSION_EDITION_ID     CREATOR_ADDR     CREATOR_SERIAL#     ECID
    2     00000001993E4F58     225     445     1353611     0000000198E2FA10     198     <schema>     47     2147483644     000000018EA18108          ACTIVE     DEDICATED     198     <schema>     oracle     1234     <cluster name>     49993     unknown     JDBC Thin Client     USER     00000001968A1250     3198676106     72y8ztfzagv4a     2     02/04/2013 11:18:22 ص     33554852     00000001968A18E0     3992616824     03mm4u3qznzvs     0     02/04/2013 11:18:22 ص     33554730     158207     1     158207     1     JDBC Thin Client     2546894660          0          12206     122409     8     49354     0     94     02/04/2013 10:53:20 ص     19559     NO     NONE     NONE     NO          DISABLED     ENABLED     ENABLED     0          NOT IN WAIT               NOT IN WAIT               42844     344     SQL*Net more data to dblink     driver id     1413697536     0000000054435000     #bytes     8144     0000000000001FD0          0     00     2000153315     7     Network     -1     19553     WAITED SHORT TIME     8          19553325216     SYS$USERS     DISABLED     FALSE     FALSE     FIRST EXEC     100     0000000198E2FA10     2     004qLk^iPyp0bqw5wFDCiW0002fR000B^f

    Hi ,
    we managed to reproduce the case in test environment, below are the steps:
    1)have 2 databases on different machines, will call the first one local, the other one remote.
    2)in the local database create:
    a - DBLink to remote database.
    b - read data from remote database(we simply used select count(*) from dummy_table )
    c - insert data into a table on the local database
    d - terminate the connection between the 2 databases (disconnect either machine from the network)
    e - commit on local database.
    what we noticed was the following:
    1)when the local database is disconnected from the network(the machine is not connected to any network at the moment): almost immediately throws an error, and issuing the following:
    select * from dba_2pc_pending;we found some data .
    2) when the remote database was disconnected(the local database is still connected to the network):
    after 7-8 seconds an error is thrown, and issuing the following:
    select * from dba_2pc_pending;did not return any data.
    since this is pretty similar to our case ,we concluded that it's a network issue.
    is this the correct behavior ?
    as a temporary solution till the network issue is fixed ,we did the following:
    1) changed the call of the remote procedure to calling a local procedure that calls the remote procedure.
    2) added pragma autonomous_transaction to the local procedure.
    3) at the end of the local procedure rollback the autonomous transaction.
    it seems that since the global transaction does not use the DBLink database does not issue a 2PC commit.
    this works in my cases since the DBLink is only issed to read data.

  • Viewing lock

    I want to use CATBLOCK.SQL in PL/SQL to display locking information.
    now, I'm in C:\oraclexe\app\oracle\product\10.2.0\server\BIN
    but CATBLOCK.SQL and UTLLOCKT.SQL are in
    C:\oraclexe\app\oracle\product\10.2.0\server\RDBMS\ADMIN
    I use "HO cd" to change dirctory, it doesn't work.
    and when I ran the following command, I got these message. How should i do? Thanks a lot.
    SQL> @C:\oraclexe\app\oracle\product\10.2.0\server\RDBMS\ADMIN\UTLLOCKT.SQL
    drop table lock_holders
    ERROR at line 1:
    ORA-00942: table or view does not exist
    Table created.
    drop table dba_locks_temp
    ERROR at line 1:
    ORA-00942: table or view does not exist
    create table dba_locks_temp as select * from dba_locks
    ERROR at line 1:
    ORA-01775: looping chain of synonyms
    from dba_locks_temp w, dba_locks_temp h
    ERROR at line 9:
    ORA-00942: table or view does not exist
    Commit complete.
    drop table dba_locks_temp
    ERROR at line 1:
    ORA-00942: table or view does not exist
    0 rows created.
    Commit complete.
    no rows selected
    Table dropped.
    Message was edited by:
    user602633

    You can use @@.
    From SQL*Plus documentation:
    Examples
    Suppose that you have the following script named PRINTRPT:
    SELECT DEPARTMENT_ID, CITY FROM EMP_DETAILS_VIEW WHERE SALARY>12000;@EMPRPT.SQL@@ WKRPT.SQL
    When you START PRINTRPT and it reaches the @ command, it looks for the script named EMPRPT in the current working directory and runs it. When PRINTRPT reaches the @@ command, it looks for the script named WKRPT in the same path as PRINTRPT and runs it.
    Suppose that the same script PRINTRPT was located on a web server and you ran it with START HTTP://machine_name.domain:port/PRINTRPT. When it reaches the @ command, it looks for the script named EMPRPT in the current working directory and runs it. When PRINTRPT reaches the @@ command, it looks for the script named WKRPT in the same url as PRINTRPT, HTTP://machine_name.domain:port/WKRPT.SQL and runs it.
    Also, I am pretty sure those table drop errors are normal.
    Can you select from DBA_WAITERS?

  • GRANTing privileges on some DBA_ views not working

    DB Version: 10g Release 2
    I installed the Oracle Software and created the database manually using CREATE DATABASE command. Later I ran ORACLE_HOME/rdbms/admin/catalog.sql . But, now when i try to GRANT SELECT ON some DBA_ views, i receive error. GRANT SELECTs on V$ views are working fine. Why is it that GRANT SELECT on some DBA_ views (like dba_objects) are working fine but not for views like DBA_LOCKS, DBA_WAITERS
    SQL> grant select any dictionary to  scott    ;
    Grant succeeded.
    SQL> grant select on dba_objects to  scott    ;
    Grant succeeded.
    SQL> grant select on dba_lock to  scott    ;
    grant select on dba_lock to  scott
    ERROR at line 1:
    ORA-00942: table or view does not exist
    SQL> grant select on dba_locks to  scott    ;
    grant select on dba_locks to  scott
    ERROR at line 1:
    ORA-00942: table or view does not exist
    SQL> grant select on dba_waiters to  scott    ;
    grant select on dba_waiters to  scott
    ERROR at line 1:
    ORA-00942: table or view does not exist
    SQL> grant select on dba_blockers to  scott    ;
    grant select on dba_blockers to  scott
    ERROR at line 1:
    ORA-00942: table or view does not exist
    SQL> grant select on v_$session to  scott    ;
    Grant succeeded.
    SQL> grant select on v_$process to  scott    ;
    Grant succeeded.
    SQL> grant select on v_$locked_object to  scott    ;
    Grant succeeded.
    SQL> grant select on v_$parameter to  scott    ;
    Grant succeeded.
    SQL> grant select on v_$lock to  scott    ;
    Grant succeeded.

    Those are views created by catblock.sql (which is not run by default)
    not catalog.sql

  • Oracle database locks

    Today I ran the following queries in my 2 node RAC database. Enterprise database server 11.7 linux version.
    SQL> select * from dba_blockers;
    no rows selected
    SQL> select * from dba_waiters;
    no rows selected
    SQL> SELECT substr(DECODE(request,0,'Holder: ','Waiter: ')||g.sid,1) sess,s.machine,s.serial#,s.sql_id sqlid,
    2 id1, id2, lmode, request, g.type, g.inst_id, seconds_in_wait
    3 FROM GV$LOCK g, gv$session s
    4 WHERE (id1, id2, g.type) IN
    5 (SELECT id1, id2, type FROM GV$LOCK WHERE request>0)
    6 and g.sid = s.sid
    7 and g.inst_id = s.inst_id
    order by sess desc;
    SESS MACHINE SERIAL# SQLID ID1 ID2 LMODE REQUEST TY INST_ID SECONDS_IN_WAIT
    Waiter: 6462 appserver 49027 2vzvm60fvf506 276026 0 0 6 TM 2 2078
    Holder: 6492 database server 8546 276026 0 3 0 TM 1 28815
    SQL> SELECT a.sql_text
    FROM gv$sqltext a,
    gv$session b
    WHERE a.address = b.sql_address
    AND a.hash_value = b.sql_hash_value
    AND b.sid = &1
    ORDER BY a.piece; 2 3 4 5 6 7
    Enter value for 1: 6492
    old 6: AND b.sid = &1
    new 6: AND b.sid = 6492
    no rows selected
    INST_ID SID OBJECT_OWNER OBJECT_NAME LOCKED_MODE OS_USER_NAME
    1 6492 ABC XYZ Row-X (SX) oracle
    2 6462 ABC XYZ None appuser
    I wanted to know why dba_blockers or dba_waiters not showing blocked or waiting sessions, why no sqlid associated to holder session ?
    Thanks for your time and help

    Thanks for your quick response. you provided good information
    I understood that currently no session is holding the lock for which other session is waiting, i.e dba_blockers showing zero rows.
    But how the below query is showing holder and waiting session and no sql query associated to holding session.
    SQL> SELECT substr(DECODE(request,0,'Holder: ','Waiter: ')||g.sid,1) sess,s.machine,s.serial#,s.sql_id sqlid,
    2 id1, id2, lmode, request, g.type, g.inst_id, seconds_in_wait
    3 FROM GV$LOCK g, gv$session s
    4 WHERE (id1, id2, g.type) IN
    5 (SELECT id1, id2, type FROM GV$LOCK WHERE request>0)
    6 and g.sid = s.sid
    7 and g.inst_id = s.inst_id
    order by sess desc;
    SESS MACHINE SERIAL# SQLID ID1 ID2 LMODE REQUEST TY INST_ID SECONDS_IN_WAIT
    Waiter: 6462 appserver 49027 2vzvm60fvf506 276026 0 0 6 TM 2 2078
    Holder: 6492 database server 8546 276026 0 3 0 TM 1 28815

  • Object locked in v$locked_object but can't find session/process blocking

    Hi,
    I am on database 10.2.0.5, windows x64.
    A developer calls me and tells me there are locks on 3 tables, and the locks are not released.
    So I run this to see which objects are locked by which session
    select vlo.object_id, vlo.session_id, vlo.oracle_username, vlo.process
      , DECODE(vlo.LOCKED_MODE, 0,'NONE', 1,'NULL', 2,'ROW SHARE', 3,'ROW EXCLUSIVE', 4,'SHARE', 5,'SHARE ROW EXCLUSIVE', 6,'EXCLUSIVE', NULL) LOCK_MODE
      , do.owner, do.object_name, do.object_type
      , vs.saddr, vs.serial#, vs.paddr, vs.username, vs.ownerid, vs.status, vs.server, vs.schemaname, vs.osuser, vs.machine, vs.program, vs.type, vs.logon_time, vs.last_call_et
      , vs.blocking_session_status, vs.event#, vs.event, vs.wait_class#, vs.wait_class, vs.wait_time, vs.seconds_in_wait, vs.state
      from v$locked_object vlo
        inner join dba_objects do on (vlo.object_id = do.object_id)
        left outer join v$session vs on (vlo.session_id = vs.sid)-----------
    I get (after finding out my table locks come from SID 514)
    OBJECT_ID              SESSION_ID             ORACLE_USERNAME                PROCESS      LOCK_MODE           OWNER                          OBJECT_NAME                                                                                                                      OBJECT_TYPE         SADDR            SERIAL#                PADDR            USERNAME                       OWNERID                STATUS   SERVER    SCHEMANAME                     OSUSER                         MACHINE                                                          PROGRAM                                                          TYPE       LOGON_TIME                LAST_CALL_ET           BLOCKING_SESSION_STATUS EVENT#                 EVENT                                                            WAIT_CLASS#            WAIT_CLASS                                                       WAIT_TIME              SECONDS_IN_WAIT        STATE              
    373122                 514                    IRMFIN                         22AB7298     ROW EXCLUSIVE       IRMFIN                         IC_PRODUCT_STATUS                                                                                                                TABLE               000007FF3E1A9070 1301                   000007FF3E639120 IRMFIN                         2147483644             INACTIVE DEDICATED IRMFIN                         IRMTEST                        IRM                                                              DSA0:[GEMBASE730.][RUN]GEM.EXE                                   USER       2012/09/05 13:55:51       702                    NO HOLDER               263                    SQL*Net message from client                                      6                      Idle                                                             0                      702                    WAITING            
    373025                 514                    IRMFIN                         22AB7298     ROW EXCLUSIVE       IRMFIN                         IC_BIN_DETAIL_STATUS                                                                                                             TABLE               000007FF3E1A9070 1301                   000007FF3E639120 IRMFIN                         2147483644             INACTIVE DEDICATED IRMFIN                         IRMTEST                        IRM                                                              DSA0:[GEMBASE730.][RUN]GEM.EXE                                   USER       2012/09/05 13:55:51       702                    NO HOLDER               263                    SQL*Net message from client                                      6                      Idle                                                             0                      702                    WAITING            
    373055                 514                    IRMFIN                         22AB7298     ROW EXCLUSIVE       IRMFIN                         IC_LOT_STATUS                                                                                                                    TABLE               000007FF3E1A9070 1301                   000007FF3E639120 IRMFIN                         2147483644             INACTIVE DEDICATED IRMFIN                         IRMTEST                        IRM                                                              DSA0:[GEMBASE730.][RUN]GEM.EXE                                   USER       2012/09/05 13:55:51       702                    NO HOLDER               263                    SQL*Net message from client                                      6                      Idle                                                             0                      702                    WAITING             -----------
    I run it again and I get something different, this time the lock is still there, but no session. select * from v$session where sid= 514 returns nothing.
    I get
    OBJECT_ID              SESSION_ID             ORACLE_USERNAME                PROCESS      LOCK_MODE           OWNER                          OBJECT_NAME                                                                                                                      OBJECT_TYPE         SADDR            SERIAL#                PADDR            USERNAME                       OWNERID                STATUS   SERVER    SCHEMANAME                     OSUSER                         MACHINE                                                          PROGRAM                                                          TYPE       LOGON_TIME                LAST_CALL_ET           BLOCKING_SESSION_STATUS EVENT#                 EVENT                                                            WAIT_CLASS#            WAIT_CLASS                                                       WAIT_TIME              SECONDS_IN_WAIT        STATE              
    373122                 514                                                                ROW EXCLUSIVE       IRMFIN                         IC_PRODUCT_STATUS                                                                                                                TABLE                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
    373025                 514                                                                ROW EXCLUSIVE       IRMFIN                         IC_BIN_DETAIL_STATUS                                                                                                             TABLE                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
    373055                 514                                                                ROW EXCLUSIVE       IRMFIN                         IC_LOT_STATUS                                                                                                                    TABLE                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       When I run the query later, I sometimes get another session, but the lock stays. It seems here, that I am catching the same SID on new sessions, but it is probably a different serial # than the original session locking the table rows.
    I get nothing from
    select * from dba_waiters;
    select * from dba_blockers;
    Now why are those 3 tables row locked on some rows and I can't find the session responsible? The developer tells me his application crashed and the rows are locked since.
    So far ( keep in mind I am not a locking expert) the only way I found to release the locks is a DB bounce, its a test DB so no biggy.
    Is this a bug? Am I missing something?
    This is the second time this has happened. How can I solve this issue?
    Best wishes to all.

    Thank you for your reply.
    I do not think I can kill the session (514) it does not exist, even though v$locked_object reports tables are locked by session 514
    see below
    select * from v$locked_object
    XIDUSN                 XIDSLOT                XIDSQN                 OBJECT_ID              SESSION_ID             ORACLE_USERNAME                OS_USER_NAME                   PROCESS      LOCKED_MODE           
    9                      26                     351467                 373122                 514                                                                                               3                     
    10                     41                     339655                 373025                 514                                                                                               3                     
    11                     6                      92004                  373055                 514                                                                                               3                     
    select * from v$session order by sid
    ( no session 514)
    SADDR            SID                    SERIAL#                AUDSID                 PADDR            USER#                  USERNAME                       COMMAND                OWNERID                TADDR            LOCKWAIT         STATUS   SERVER    SCHEMA#                SCHEMANAME                     OSUSER                         PROCESS      MACHINE                                                          PORT                   TERMINAL         PROGRAM                                                          TYPE       SQL_ADDRESS      SQL_HASH_VALUE         SQL_ID        SQL_CHILD_NUMBER       PREV_SQL_ADDR    PREV_HASH_VALUE        PREV_SQL_ID   PREV_CHILD_NUMBER      PLSQL_ENTRY_OBJECT_ID  PLSQL_ENTRY_SUBPROGRAM_ID PLSQL_OBJECT_ID        PLSQL_SUBPROGRAM_ID    MODULE                                           MODULE_HASH            ACTION                           ACTION_HASH            CLIENT_INFO                                                      FIXED_TABLE_SEQUENCE   ROW_WAIT_OBJ#          ROW_WAIT_FILE#         ROW_WAIT_BLOCK#        ROW_WAIT_ROW#          LOGON_TIME                LAST_CALL_ET           PDML_ENABLED FAILOVER_TYPE FAILOVER_METHOD FAILED_OVER RESOURCE_CONSUMER_GROUP          PDML_STATUS PDDL_STATUS PQ_STATUS CURRENT_QUEUE_DURATION CLIENT_IDENTIFIER                                                BLOCKING_SESSION_STATUS BLOCKING_INSTANCE      BLOCKING_SESSION       SEQ#                   EVENT#                 EVENT                                                            P1TEXT                                                           P1                     P1RAW            P2TEXT                                                           P2                     P2RAW            P3TEXT                                                           P3                     P3RAW            WAIT_CLASS_ID          WAIT_CLASS#            WAIT_CLASS                                                       WAIT_TIME              SECONDS_IN_WAIT        STATE               SERVICE_NAME                                                     SQL_TRACE SQL_TRACE_WAITS SQL_TRACE_BINDS ECID                                                            
    582                  41322092               000007FF3E6279B0 88                     IRMFIN                         0                      2147483644                                               INACTIVE NONE      88                     IRMFIN                         IRM-NTSERVER\ttoupet           2768:5812    IRM-NTSERVER\IRM-WINDEV                                          2091                   IRM-WINDEV       WDMAP.EXE                                                        USER       00               0                                                           000007FF296D46B0 1249880231             gkm8w8157za57 0                                                                                                                     WDMAP.EXE                                        3924246850                                              0                                                                                       4272871                480874                 5                      109733                 0                      2012/09/06 08:54:26       369                    NO           NONE          NONE            NO                                           DISABLED    ENABLED     ENABLED   0                                                                                       NO HOLDER                                                             55                     263                    SQL*Net message from client                                      driver id                                                        1297371904             000000004D545300 #bytes                                                           1                      0000000000000001                                                                  0                      00               2723168908             6                      Idle                                                             0                      369                    WAITING             irtrcs01.ivacorm.com                                             DISABLED  FALSE           FALSE                                                                           
    000007FF3E1A0FA0 508                    55443                  41321967               000007FF3E62E488 93                     RODMILL                        0                      2147483644                                               INACTIVE DEDICATED 93                     RODMILL                        flong                          4144         IT011                                                            49450                  unknown          SQL Developer                                                    USER       00               0                                                           000007FF126A6BC0 293046999              7jjvy5s8rg2qr 0                                                                                                                     SQL Developer                                    1012150930                                              0                                                                                       4280261                373579                 5                      348686                 0                      2012/09/06 08:39:23       218                    NO           NONE          NONE            NO                                           DISABLED    ENABLED     ENABLED   0                                                                                       NO HOLDER                                                             5486                   263                    SQL*Net message from client                                      driver id                                                        675562835              0000000028444553 #bytes                                                           1                      0000000000000001                                                                  0                      00               2723168908             6                      Idle                                                             0                      218                    WAITING             irtrcs01.ivacorm.com                                             DISABLED  FALSE           FALSE                                                                           
    000007FF3E1A2518 509                    3086                   41287084               000007FF3E628A20 64                     SYSMAN                         47                     2147483644             000007FF3D7C21D8                  ACTIVE   SHARED    64                     SYSMAN                                                        1234         IRMFAX                                                           1341                                    OMS                                                              USER       000007FF357CE418 4281219134             2b064ybzkwf1y 0                      000007FF357A8BF0 2532399038             5dwsqwabg2pxy 0                      178612                 8                                                                       OEM.SystemPool                                   2960518376             NotificationMgr                  3664650334             IRMFAX.ivacorm.com:4889_Management_Service                       4281687                177737                 14                     40683                  0                      2012/09/03 11:44:37       7                      NO           NONE          NONE            NO                                           DISABLED    ENABLED     ENABLED   0                                                                                       UNKNOWN                                                               48888                  45                     wait for unread message on broadcast channel                     channel context                                                  8792836163648          000007FF3DE04840 channel handle                                                   8792836060256          000007FF3DDEB460                                                                  0                      00               2723168908             6                      Idle                                                             0                      7                      WAITING             irtrcs01.ivacorm.com                                             DISABLED  FALSE           FALSE                                                                           
    000007FF3E1A3A90 510                    35277                  41286699               000007FF3E6279B0 64                     SYSMAN                         0                      2147483644                                               INACTIVE NONE      64                     SYSMAN                                                        1234         IRMFAX                                                           3154                                    OMS                                                              USER       00               0                                                           000007FF3E844AD8 3275117642             43c5ykm1mcp2a 1                                                                                                                     OEM.CacheModeWaitPool                            796036576                                               0                      IRMFAX.ivacorm.com:4889_Management_Service                       4280509                -1                     0                      0                      0                      2012/09/03 10:58:32       169                    NO           NONE          NONE            NO                                           DISABLED    ENABLED     ENABLED   0                                                                                       NO HOLDER                                                             29909                  263                    SQL*Net message from client                                      driver id                                                        1297371904             000000004D545300 #bytes                                                           1                      0000000000000001                                                                  0                      00               2723168908             6                      Idle                                                             0                      169                    WAITING             irtrcs01.ivacorm.com                                             DISABLED  FALSE           FALSE                                                                           
    000007FF3E1A5008 511                    51686                  41287085               000007FF3E6279B0 64                     SYSMAN                         0                      2147483644                                               INACTIVE NONE      64                     SYSMAN                                                        1234         IRMFAX                                                           1342                                    OMS                                                              USER       00               0                                                           000007FF36C3CED8 2539923080             6v7n0y2bq89n8 0                                                                                                                     OEM.SystemPool                                   2960518376             JobDispatcher                    875884737              IRMFAX.ivacorm.com:4889_Management_Service                       4281706                -1                     0                      0                      0                      2012/09/03 11:44:37       5                      NO           NONE          NONE            NO                                           DISABLED    ENABLED     ENABLED   0                                                                                       NO HOLDER                                                             38929                  263                    SQL*Net message from client                                      driver id                                                        1297371904             000000004D545300 #bytes                                                           1                      0000000000000001                                                                  0                      00               2723168908             6                      Idle                                                             0                      5                      WAITING             irtrcs01.ivacorm.com                                             DISABLED  FALSE           FALSE                                                                           
    000007FF3E1A6580 512                    28994                  41293063               000007FF3E6279B0 64                     SYSMAN                         0                      2147483644                                               INACTIVE NONE      64                     SYSMAN                                                        1234         IRMFAX                                                           3636                                    OMS                                                              USER       00               0                                                           000007FF32990C90 1763828656             44nz3b1nk3sxh 1                                                                                                                     OEM.CacheModeWaitPool                            796036576                                               0                      IRMFAX.ivacorm.com:4889_Management_Service                       4280509                -1                     0                      0                      0                      2012/09/04 00:00:02       169                    NO           NONE          NONE            NO                                           DISABLED    ENABLED     ENABLED   0                                                                                       NO HOLDER                                                             20902                  263                    SQL*Net message from client                                      driver id                                                        1297371904             000000004D545300 #bytes                                                           1                      0000000000000001                                                                  0                      00               2723168908             6                      Idle                                                             0                      169                    WAITING             irtrcs01.ivacorm.com                                             DISABLED  FALSE           FALSE                                                                           
    000007FF3E1ABB60 516                    48427                  41292026               000007FF3E62DC50 93                     RODMILL                        0                      2147483644                                               INACTIVE DEDICATED 93                     RODMILL                        ebesner                        10808        Fingers                                                          59004                  unknown          SQL Developer                                                    USER       00               0                                                           000007FF127B0A58 351849430              bkcpdnnagjkyq 0                                                                                                                     SQL Developer                                    1012150930                                              0                                                                                       4049825                533716                 21                     17036                  0                      2012/09/03 21:53:47       61389                  NO           NONE          NONE            NO                                           DISABLED    ENABLED     ENABLED   0                                                                                       NO HOLDER                                                             2578                   263                    SQL*Net message from client                                      driver id                                                        675562835              0000000028444553 #bytes                                                           1                      0000000000000001                                                                  0                      00               2723168908             6                      Idle                                                             0                      61389                  WAITING             irtrcs01.ivacorm.com                                             DISABLED  FALSE           FALSE                                                                           
    000007FF3E1AD0D8 517                    2                      0                      000007FF3E635FD0 0                                                     0                      2147483644                                               ACTIVE   DEDICATED 0                      SYS                            SYSTEM                         4292         CHARLIE                                                          0                      CHARLIE          ORACLE.EXE (q001)                                                BACKGROUND 00               0                                    0                      00               0                                    0                                                                                                                                                                      0                                                       0                                                                                       112                    -1                     0                      0                      0                      2012/08/22 17:46:54       1264692                NO           NONE          NONE            NO                                           DISABLED    ENABLED     ENABLED   0                                                                                       UNKNOWN                                                               2685                   281                    Streams AQ: qmn slave idle wait                                                                                                   0                      00                                                                                0                      00                                                                                0                      00               2723168908             6                      Idle                                                             0                      16                     WAITING             SYS$BACKGROUND                                                   DISABLED  FALSE           FALSE                                                                           
    000007FF3E1AE650 518                    2                      4294967295             000007FF3E635798 0                      SYS                            3                      2147483644                                               INACTIVE DEDICATED 0                      SYS                            IRM-NTSERVER\cluster           3704:1572    IRM-NTSERVER\CHARLIE                                             49181                  CHARLIE          rhs.exe                                                          USER       000007FF3EA55E08 654885888              bcfjz80mhjj00 0                      000007FF3EA55E08 654885888              bcfjz80mhjj00 0                                                                                                                     rhs.exe                                          1733424889                                              0                                                                                       4281686                -1                     0                      0                      0                      2012/08/22 17:46:54       16                     NO           NONE          NONE            NO                                           DISABLED    ENABLED     ENABLED   0                                                                                       NO HOLDER                                                             58582                  263                    SQL*Net message from client                                      driver id                                                        1413697536             0000000054435000 #bytes                                                           1                      0000000000000001                                                                  0                      00               2723168908             6                      Idle                                                             0                      16                     WAITING             SYS$USERS                                                        DISABLED  FALSE           FALSE                                                                           

  • Select Query Hangs / No DB Locks / Query Plan is good

    I have below query in application which hangs ( Only sometimes ) and there are some session which also try to insert data into this tables also starts getting hanged.
    SELECT DISTINCT F2 || ' - ' || F3 || ' - ' || F4
    FROM Table1
    WHERE F4 = 6160
    AND F1|| F2|| F3 NOT IN (
    SELECT F2|| F3 || F4
    FROM Table2
    WHERE F1 = 181)
    F2 - varchar(4)
    F3- varchar(100)
    F4- varchar(20)
    F1,F1 are NUMBER
    Table1 has one unique index comprising all fields in ORDER F1,F2, X,F3, F4,Y - X,Y are some different field.
    Table2 has one unique index comprising all fields in ORDER F1,F3, F4,F2 are some different field.
    Below are facts from DBA ----
    1- Session Query Plan was excellent -
    2 - No tables were locked in DB
    3 - Statistics on this table Table1 was calculated on Feb, 2008 and shows 8 millions rows but actual current row count is 13 million. DBA says sometime analyzing statistics again may cause poor query performance.
    4- There were 8 session in DB, 1 was for above select statement and other 7 were trying to insert data into above table.
    Can you please advise what could else be verified to root cause issue as it has been hanging many times - hence causing other session to hang ?
    Many Thanks

    Can you clarify exactly what the DBA meant by "No tables were locked in DB"? What was the exact query that was used to determine this? Was it hitting V$LOCK (GV$LOCK in a RAC system)? Or the DBA_BLOCKERS and DBA_WAITERS tables? Or something else? The specific query here is important because there is a world of difference between a row-level lock and a table-level lock. Of course, locks would never prevent a SELECT statement from running, but it could cause problems for the INSERT statements.
    I strongly concur with Old DBA's suggestion about refactoring the query to not do the concatenation in the NOT IN clause.
    Are the F4 = 6160 and F1 = 181 conditions really using hard-coded numeric literals? Or are these bind variables? Is the data in F1 or F4 skewed-- that is, are there certain values that are more likely than other values?
    How many rows would you expect to be in Table1 with an F4 value of 6160? How many rows in Table2 with a F1 value of 181?
    Justin

  • Error message: "playlists selected for updating no longer exist"

    I tried to update my ipod nano and I guess I had deleted a playlist, but since then, I have not been able to update. Every time I try, I get the following message:
    "Cannot be updated because all of the playlists selected for updating no longer exist."
    I haven't been able to highlight which playlists are selected to begin with.
    I read through the manual and thought that maybe rebooting the whole system might work. So I deleted Itunes from my computer and re-installed.
    Then I tried re-setting my ipod. So now I have nothing on my ipod.
    I also deleted everything from my library, thinking it might help to start from scratch. Nothing has worked.
    How do I "select" and "unselect" playlists so I can get up and running again?

    Here you go.
    http://discussions.apple.com/thread.jspa?messageID=607312&#607312

  • Error while calling a select esb service

    javax.resource.ResourceException: RollbackException: Transaction has been marked for rollback:
    I encounter the above error while executing a synchronous bpel process, that invokes an esb db select service to fetch a value from the db.
    the details available for the error are:
    An unhandled exception has been thrown in the ESB system. The exception reported is: "java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0 at java.util.Vector.get(Vector.java:710) at oracle.tip.esb.server.common.wsif.WSIFInvoker.readResponseHeader(Unknown Source) at oracle.tip.esb.server.common.wsif.WSIFInvoker.executeOperation(Unknown Source) at oracle.tip.esb.server.common.wsif.WSIFInvoker.nextService(Unknown Source) at oracle.tip.esb.server.service.impl.outadapter.OutboundAdapterService.nextService(Unknown Source) at oracle.tip.esb.server.service.impl.outadapter.OutboundAdapterService.processBusinessEvent(Unknown Source) at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatchNonRoutingService(Unknown Source) at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatch(Unknown Source) at oracle.tip.esb.server.dispatch.BusinessEvent.raise(Unknown Source) at oracle.tip.esb.wsif.WSIFOperation_ESB.executeRequestResponseOperation(Unknown Source) at com.collaxa.cube.ws.WSIFInvocationHandler.invoke(WSIFInvocationHandler.java:431) at com.collaxa.cube.ws.WSInvocationManager.invoke2(WSInvocationManager.java:353) at com.collaxa.cube.ws.WSInvocationManager.invoke(WSInvocationManager.java:192) at com.collaxa.cube.engine.ext.wmp.BPELInvokeWMP.__invoke(BPELInvokeWMP.java:733) at com.collaxa.cube.engine.ext.wmp.BPELInvokeWMP.__executeStatements(BPELInvokeWMP.java:368) at com.collaxa.cube.engine.ext.wmp.BPELActivityWMP.perform(BPELActivityWMP.java:197) at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:3266) at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1696) at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal(PerformMessageHandler.java:75) at com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage(DispatchHelper.java:184) at com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory(DispatchHelper.java:269) at com.collaxa.cube.engine.CubeE
    Please suggest
    thanx
    AJ

    Done That,
    Thanx a ton Dave, it worked.
    So I am finally moving on :-)
    Just one question Dave, I happened to work on the Beta release of this version too, the problem was not there. How come we have been able to get it in dev preview.

  • Logical operators in Oracle select query

    Hello all,
    Can i use logical operators in oracle select queries?
    for 1 and 0 =0 ; 1 or 0 =0
    if i have two fileds in a table COL1 have a value of 1010 and COL2 have a value of 0001.
    Is there any way to use select col1 or col2 from table? where or is a logical operator?
    Regards,

    Hi,
    NB wrote:
    Hello all,
    Can i use logical operators in oracle select queries?Sure; Oracle has the logical operators AND, NOT and OR. All the comparison operators, including >, >=, = !=, EXISTS, IN, IS NULL, LIKE and REGEXP_LIKE are really logical operators, since they return logical values. You can use them in SELECT statements, and other places, too.
    for 1 and 0 =0 ; 1 or 0 =0
    if i have two fileds in a table COL1 have a value of 1010 and COL2 have a value of 0001.It's unclear what you want. Maybe you'd be interested in the BITAND function:
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/functions014.htm#sthref1080
    BITAND is the only logical function that I know of. Many other functions, especially numberical fucntions such as MOD, have applications in logic.
    Is there any way to use select col1 or col2 from table? where or is a logical operator?Whenever you have a question, please post a little sample data (CREATE TABLE and INSERT statements), and also post the results you want from that data.
    Explain how you get those results from that data.
    Always say which version of Oracle you're using.

  • Can not select from data dictionary view from a procedure

    Hi,
    I wonder, which privilege is missing here:
    my schema has this roles and privs:
    GRANT CONNECT, RESOURCE TO cb ;
    GRANT CREATE SESSION TO cb ;
    GRANT SELECT_CATALOG_ROLE TO cb ;
    GRANT CREATE SYNONYM TO CB;
    GRANT CREATE VIEW TO CB;
    I create a procedure:
    create or replace procedure dd_test as
    begin
         dbms_output.enable(2000000);
         for r in (select table_name from sys.dba_tab_partitions     where owner = 'CB') loop
                   dbms_output.put_line(r.table_name);
         end loop;
    end;
    sho err
    4/38 PL/SQL: ORA-00942: table or view does not exist
    When I run the core statement form sql prompt, it works !
    so what privilege is missing here ???
    thanks for any hint, Lao De

    Hi,
    thanks for that reply, after doing that I can not select this DD-view from sql-prompt anymore (which I don't wonder ;-). Can you tell me, what idea you had behind that test ?
    I found another instance, where the procedure works and I will compare those privileges, but it's hard to sort out that complex structure of nested roles and sys_privs.
    How ever, I will update here, when I found the missing privilege.
    regards LaoDe

  • 'IF' statement in a select statment?

    I have the following cursor in a package specification;
    cursor c_sales_code is
    select sales_condition||' MC '||sales_option
    from sales;This will return something like: 'T300 MC 9'
    MC means 'multiple choice' for when there are multiple options. Although, sales_option is sometimes null and in this case I just want 'T300' to be returned, not 'T300 MC'.
    How would I go about doing this?
    Thanks,
    fakelvis

    Use
    CASE and DECODE
    to add the functoinality of Conditional Statements in Your SQL Statements..
    These two CASE / DECODE will help you to get your desired output

  • IF Statement in Select

    I need to choose between value1 and value2 within a select statement.
    TableA
    Flag (char)
    Value1
    Value2
    ItemDesc
    pseudo code
    select ItemDesc, (if Flag = 'y' then Value1 else Value2) as Price from TableA;
    How can this be done?

    select   itemdesc,
             sum (case
                     when flag = 'y'
                        then (case
                                 when value1 < 10
                                    then value1 * 1.2
                                 else value1
                              end)
                     else value2
                  end
                 ) as price
        from tablea
    group by itemdesc;

Maybe you are looking for

  • "Adobe After Effects CS5 Render Issues"!

    Hey guys I currently just downloaded the free trial of "Adobe After Effects CS5" and I am wanting to render some video which I added some colour correction to. When I put this in the render queue and press render is says "You mus have at lease on ren

  • Help in Document Management System (DMS)

    Dear Experts, I am new to DMS and I am looking for some documentation on DMS which can give me an insight view about DMS as well as tells its functionality. if the information is usefull, then "Max points are guaranteed." Thanks Chaitanya,

  • Samsung 205BW Syncmaster DVI No Picture

    I have a 20" samsung lcd pluged into my macbook 2.4core2 that is 2months old. It has the apple mini-dvi to dvi adapter to the dvi on the lcd. When plugged in the macbook screen flickers but nothing happens on the samsung. I have tried all the setting

  • Advance pricing Query

    No.     Price Range      ListPrice     No$al Price     Nett Price     Special Deal     Special Deal 2      Qty/Value Range     -     0 - 10pcs     11 - 99pcs     100 - 149pcs 150pcs & above No.1     ABC Part number     10.00      $10 - 10%     $10 -

  • Bi data upload error:status 51 - error: Error 8 when starting the extr prog

    while data load form the source system into thw bw i am getting error in error monitor as under, Extraction (messages): Errors occurred   Error occurred in the data selection Transfer (IDocs and TRFC): Errors occurred Request IDoc : Application docum