Issue with SQL%BULK_EXCEPTIONS.COUNT in Oracle 9iR2

Hi All,
We are using the Oracle 9i Database
Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production
PL/SQL Release 9.2.0.7.0 - Production
CORE 9.2.0.7.0 Production
TNS for HPUX: Version 9.2.0.7.0 - Production
NLSRTL Version 9.2.0.7.0 - Production
I am facing an issue when using SQL%BULK_EXCEPTIONS.COUNT.
Getting the below error when executing the below dummy block.
DECLARE
ERROR at line 1:
ORA-06531: Reference to uninitialized collection
ORA-06512: at line 12
ORA-06510: PL/SQL: unhandled user-defined exception
DECLARE
e exception;
cnt number;
BEGIN
NULL;
raise e;
exception
when others then
if SQL%BULK_EXCEPTIONS.COUNT>0 then
null;
end if;
dbms_output.put_line(1);
END;
Request to let me know what is the issue.
FYI: I never faced this issue in 10gr2 and 11gr2.
Thanks,
Madhu K.

Where are you using a BULK COLLECT with a SAVE EXCEPTIONS that would initialize the SQL%BULK_EXCEPTIONS collection?
FYI: I never faced this issue in 10gr2 and 11gr2.Are you sure about that? If I run the code you posted in my 11.2 database, I get the same error
SQL> ed
Wrote file afiedt.buf
  1  DECLARE
  2    e exception;
  3    cnt number;
  4  BEGIN
  5    NULL;
  6    raise e;
  7  exception
  8    when others then
  9      if SQL%BULK_EXCEPTIONS.COUNT>0 then
10        null;
11      end if;
12    dbms_output.put_line(1);
13* END;
SQL> /
DECLARE
ERROR at line 1:
ORA-06531: Reference to uninitialized collection
ORA-06512: at line 9
ORA-06510: PL/SQL: unhandled user-defined exceptionJustin

Similar Messages

  • Oracle 10g connectivity with sql server 2000 through oracle transpa gateway

    dear gurus.
    i am to connecto oracle 10g with sql server 2000 through oracle transparent gateway.
    i have installed transparent gateway and proper configured. also link is created.
    but when i execute query "select * from city@inventory" , so an error displayed.
    ORA-12500: TNS:listener failed to start a dedicated server process.
    kindly suggest me what could be the cause.
    regards,

    if the listener fails to spawn a dedicated server process it is commonly indicating an issue with the listener. So posting the listener and also a listener trace including a description of the env where you installed the gateway into which directory would be helpfull. Please keep also in mind if you have for example a 10.2.0.3 database and you install into this directoty a 10.2.0.1 gateway you have to reapply the patchset again do get consistent file version.
    So please describe more detailed your env.

  • Getting the constraint name with sql%bulk_exceptions

    Hello folks,
    Is there any way to get the constraint name that was violated using sql%bulk_exceptions.
    I've a parent table and it's two children tables. When I try to delete from parent using forall, save exceptions, I want to know what constraint violated at what iteration of a bulk operation.
    I've following script.
    set serveroutput on
    drop table chld;
    drop table chld2;
    drop table prnt;
    create table prnt(n number primary key);
    insert into prnt select level from dual connect by level<11;
    create table chld(cn number references prnt(n));
    insert into chld select level from dual connect by level<3;
    create table chld2(cn number references prnt(n));
    insert into chld2 select level*3 from dual connect by level<3;
    select * from prnt;
    select * from chld;
    select * from chld2;
    commit;
    declare
      type t_prnt_obj is table of prnt.n%type index by pls_integer;
      t_prnt_tab t_prnt_obj;
      l_exp_cnt integer;
    begin
      select n bulk collect into t_prnt_tab from prnt order by n;
      dbms_output.put_line('t_prnt_tab.count -- '||t_prnt_tab.count);
      forall i in t_prnt_tab.first .. t_prnt_tab.last save exceptions
        delete prnt where n = t_prnt_tab(i);
    exception
      when others
      then
        l_exp_cnt := sql%bulk_exceptions.count;
        dbms_output.put_line('Total exceptions:'|| l_exp_cnt);
        for k in 1 .. l_exp_cnt
        loop
          dbms_output.put_line('Error '||k|| ' - Collection Index: '||sql%bulk_exceptions(k).error_index||' - Error Code: '|| sql%bulk_exceptions(k).error_code||' - Message: '||SQLERRM(- sql%bulk_exceptions(k).error_code) );
        end loop;
    end;I get the output as below:
    t_prnt_tab.count -- 10
    Total exceptions:4
    Error 1 - Collection Index: 1 - Error Code: 2292 - Message: ORA-02292: integrity constraint (.) violated - child record found
    Error 2 - Collection Index: 2 - Error Code: 2292 - Message: ORA-02292: integrity constraint (.) violated - child record found
    Error 3 - Collection Index: 3 - Error Code: 2292 - Message: ORA-02292: integrity constraint (.) violated - child record found
    Error 4 - Collection Index: 6 - Error Code: 2292 - Message: ORA-02292: integrity constraint (.) violated - child record foundInstead, I want to get in output with the constraint_name added. Like below:
    t_prnt_tab.count -- 10
    Total exceptions:4
    Error 1 - Collection Index: 1 - Error Code: 2292 - Message: ORA-02292: integrity constraint (GK.CP_FK) violated - child record found
    Error 1 - Collection Index: 1 - Error Code: 2292 - Message: ORA-02292: integrity constraint (GK.CP_FK) violated - child record found
    Error 1 - Collection Index: 1 - Error Code: 2292 - Message: ORA-02292: integrity constraint (GK.C2P_FK) violated - child record found
    Error 1 - Collection Index: 1 - Error Code: 2292 - Message: ORA-02292: integrity constraint (GK.C2P_FK) violated - child record foundIs it possible, if so how do I get it?
    Thanks in advance for you help.
    Girish

    This is phenomenal, Manik. It surely eased the work am doing at the moment.
    Thanks to you and many more to, Tom!
    Cheers!
    Girish

  • Issue with SQL Query with Presentation Variable as Data Source in BI Publisher

    Hello All
    I have an issue with creating BIP report based on OBIEE reports which is done using direct SQL. There is this one report in OBIEE dashboard, which is written using direct SQL. To create the pixel perfect version of this report, I am creating BIP data model using SQL Query as data source. The physical query that is used to create OBIEE report has several presentation variables in its where clause.
    select TILE4,max(APPTS), 'Top Count' from
    SELECT c5 as division,nvl(DECODE (C2,0,0,(c1/c2)*100),0) AS APPTS,NTILE (4) OVER ( ORDER BY nvl(DECODE (C2,0,0,(c1/c2)*100),0))  AS TILE4,
    c4 as dept,c6 as month FROM 
    select sum(case  when T6736.TYPE = 'ATM' then T7608.COUNT end ) as c1,
         sum(case  when T6736.TYPE in ('Call Center', 'LSM') then T7608.CONFIRMED_COUNT end ) as c2,
         T802.NAME_LEVEL_6 as c3,
         T802.NAME_LEVEL_1 as c4,
         T6172.CALENDARMONTHNAMEANDYEAR as c5,
         T6172.CALENDARMONTHNUMBERINYEAR as c6,
         T802.DEPT_CODE as c7
    from
         DW_date_DIM T6736 /* z_dim_date */ ,
         DW_MONTH_DIM T6172 /* z_dim_month */ ,
         DW_GEOS_DIM T802 /* z_dim_dept_geo_hierarchy */ ,
         DW_Count_MONTH_AGG T7608 /* z_fact_Count_month_agg */
    where  ( T802.DEpt_CODE = T7608.DEPT_CODE and T802.NAME_LEVEL_1 =  '@{PV_D}{RSD}' 
    and T802.CALENDARMONTHNAMEANDYEAR = 'July 2013'
    and T6172.MONTH_KEY = T7608.MONTH_KEY and T6736.DATE_KEY = T7608.DATE_KEY
    and (T6172.CALENDARMONTHNUMBERINYEAR between substr('@{Month_Start}',0,6)  and substr('@{Month_END}',8,13))
    and (T6736.TYPE in ('Call Center', 'LSM')) )
    group by T802.DEPT_CODE, T802.NAME_LEVEL_6, T802.NAME_LEVEL_1, T6172.CALENDARMONTHNAMEANDYEAR, T6172.CALENDARMONTHNUMBERINYEAR
    order by c4, c3, c6, c7, c5
    ))where tile4=3 group by tile4
    When I try to view data after creating the data set, I get the following error:
    Failed to load XML
    XML Parsing Error: mismatched tag. Expected: . Location: http://172.20.17.142:9704/xmlpserver/servlet/xdo Line Number 2, Column 580:
    Now when I remove those Presention variables (@{PV1}, @{PV2}) in the query with some hard coded values, it is working fine.
    So I know it is the PV that's causing this error.
    How can I work around it?
    There is no way to create equivalent report without using the direct sql..
    Thanks in advance

    I have found a solution to this problem after some more investigation. PowerQuery does not support to use SQL statement as source for Teradata (possibly same for other sources as well). This is "by design" according to Microsoft. Hence the problem
    is not because different PowerQuery versions as mentioned above. When designing the query in PowerQuery in Excel make sure to use the interface/navigation to create the query/select tables and NOT a SQL statement. The SQL statement as source works fine on
    a client machine but not when scheduling it in Power BI in the cloud. I would like to see that the functionality within PowerQuery and Excel should be the same as in Power BI in the cloud. And at least when there is a difference it would be nice with documentation
    or more descriptive errors.
    //Jonas 

  • [ADF-11.1.2] Locking issue with SQL 92

    I see one Locking issue with SQL92 Oracle ADF Application.
    ADF Version: [ADF-11.1.2]
    Database: Oracle 10g Express Edition
    Situation 1:
    With Following setting:
    File: Application Resource > Description > ADF META-INF > adf-config.xml
        <startup>
          <amconfig-overrides>
            <config:Database jbo.SQLBuilder="SQL92" jbo.locking.mode="optimistic"/>
          </amconfig-overrides>
        </startup>I have a page showing record 'x' of view object. I open same record on another page. Now I have same record showing on two different tabs of browser.
    1. I modify first record and save it. It worked... Got commited to database.
    2. I goto second tab and modify same record and tried to same it. It throws me an error - Another user has changed the row with primary key oracle.jbo.Key[38 ] . As expected...
    3. I then, reopen the same record on 3rd tab of browser. Modify it and tried to save it. It just hang... as if it is processing the record endlessly.
    If I see the Log:
    <BaseSQLBuilderImpl> <doEntitySelectForAltKey> [312] BaseSQLBuilderImpl Executing doEntitySelect ... (true)
    <BaseSQLBuilderImpl> <doEntitySelectForAltKey> [313] Generating new LOCK statement
    <BaseSQLBuilderImpl> <buildSelectString> [314] Built select: 'SELECT ID, CI_ID, COLUMN_NAME, DISPLAY_COLUMN_NAME, COLUMN_VALUE, CREATE_DATE, CREATE_BY FROM ESUSER.CI_AUDIT'
    <BaseSQLBuilderImpl> <doEntitySelectForAltKey> [315] Executing LOCK "SELECT ID, CI_ID, COLUMN_NAME, DISPLAY_COLUMN_NAME, COLUMN_VALUE, CREATE_DATE, CREATE_BY FROM ESUSER.CI_AUDIT WHERE ID=? FOR UPDATE"
    <BaseSQLBuilderImpl> <bindWhereAttrValue> [316] Where binding param 1: 38
    That's it.. nothing happens further.. If I execute above query on SQL Worksheet, it doesn't come up with the result. Just hang for something...
    SELECT ID, CI_ID, COLUMN_NAME, DISPLAY_COLUMN_NAME, COLUMN_VALUE, CREATE_DATE, CREATE_BY FROM ESUSER.CI_AUDIT WHERE ID='38' FOR UPDATE I can execute above query for other record of same table but not '38'. Even if I fire commit command to database, it is not working.
    I have to restart the database services to bring everything to normal state.
    Situation 2:
    With Oracle as Database :
        <startup>
          <amconfig-overrides>
            <config:Database jbo.SQLBuilder="Oracle" jbo.locking.mode="optimistic"/>
          </amconfig-overrides>
        </startup>Everything is working file. i.e. at step 3, record is getting modified successfully with following log:
    <OracleSQLBuilderImpl> <doEntitySelectForAltKey> [27] OracleSQLBuilder Executing doEntitySelect on: ESUSER.CI_AUDIT (true)
    <ADFLogger> <begin> Entity read all attributes
    <OracleSQLBuilderImpl> <buildSelectString> [28] Built select: 'SELECT ID, CI_ID, COLUMN_NAME, DISPLAY_COLUMN_NAME, COLUMN_VALUE, CREATE_DATE, CREATE_BY FROM ESUSER.CI_AUDIT CIAudit'
    <OracleSQLBuilderImpl> <doEntitySelectForAltKey> [29] Executing LOCK...SELECT ID, CI_ID, COLUMN_NAME, DISPLAY_COLUMN_NAME, COLUMN_VALUE, CREATE_DATE, CREATE_BY FROM ESUSER.CI_AUDIT CIAudit WHERE ID=? FOR UPDATE NOWAIT
    <ADFLogger> <addContextData> Entity read all attributes
    <OracleSQLBuilderImpl> <bindWhereAttrValue> [30] Where binding param 1: 38
    <ADFLogger> <addContextData> Entity read all attributes
    <ADFLogger> <end> Entity read all attributes
    <ADFLogger> <end> Lock Entity
    <ADFLogger> <begin> Before posting the entity's changes
    <ADFLogger> <begin> Updating audit columns
    <ADFLogger> <end> Updating audit columns
    <ADFLogger> <end> Before posting the entity's changes
    <OracleSQLBuilderImpl> <doEntityDML> [31] OracleSQLBuilder Executing, Lock 2 DML on: ESUSER.CI_AUDIT (Update)
    <OracleSQLBuilderImpl> <buildUpdateStatement> [32] UPDATE buf CIAudit>#u SQLStmtBufLen: 210, actual=60
    <OracleSQLBuilderImpl> <doEntityDML> [33] UPDATE ESUSER.CI_AUDIT CIAudit SET COLUMN_VALUE=? WHERE ID=?
    <ADFLogger> <begin> Entity DML
    <OracleSQLBuilderImpl> <bindUpdateStatement> [34] Update binding param 1: cip7ri1
    <OracleSQLBuilderImpl> <bindWhereAttrValue> [35] Where binding param 2: 38
    <ADFLogger> <addContextData> Entity DML
    <ADFLogger> <end> Entity DML
    Can any one please tell me, what is the issue with SQL92 setting ?
    Edited by: Anandsagar Sah on Mar 11, 2012 8:10 AM

    The framework works correctly in the Situation #1. Please, note that the locking statement in this case is "SELECT ... FOR UPDATE", but not "SELECT ... FOR UPDATE NOWAIT" (as it is in the Situation #2). When you entered the 2nd tab and tried to update the row, then the framework executed the locking statement and the row was locked (and it remained locked because the framework detected that another user had modified the row, so it stopped the processing and no COMMIT operation was executed). When you entered the 3rd tab and tried to update the row, then the framework tried to lock the row againg, but the locking statement was blocked by the existign lock and it started waiting on the lock from the 2nd tab. So this is expected behaviour.
    The interesting question is why you do not get any error in the Situation #2. In my opinion you should get an error because the locking statement from the 3rd tab should fail immediately (because the row should have been locked from the 2nd tab and the locking statement is with NOWAIT option). I suspect that when the DB is Oracle and you use Oracle SQLBuilder, then the ADF issues a DB savepoint at the beginning of the DML operation and rolls back to the savepoint is a case of some failure, so the 2nd tab has not left any lock. You can check this by setting on SQL trace on the DB server.
    Dimitar

  • Issue with SQL Developer connect to SQL server

    I'm using "SQL Developer 2.1.1.64.45" to work on a migration project which needs to convert a SQL server database to a Oracle 11g database. But I got an issue when I setup the SQL server connection. The SQL Developer let me connect by selecting a SQL server database name (For example: Northwind), but once connected, it always connected to "master" database instead. The "SQL Developer" is running on Windows 7 Professional (x64) platform. My Oracle database is 11g, and SQL server database is SQL 2005. And my SQL server instance name is "SQL2005". Anyone have ever experienced this problem? Thanks in advance.
    Edited by: user8276338 on Feb 8, 2011 1:05 PM

    Hi Bob,
    Thanks for the feedback, lets stick with SQL Developer 3.
    Correct me if I'm wrong,
    You attempted to migrate from SQL Server to Oracle including target generation and datamove in one go, by filling in each step of the migration wizard to the end.
    During the datamove you got
    ORA-01000:maximum open cursor exceeded
    So it looks like SQL Developer during the migration is not closing cursors fast enough and hits the maximum number of open cursors in your Oracle database.
    I think the default max open cursors is 300 in Oracle.
    There are a few things we can do here.
    You should be able to see the new migration project in your Migration Projects navigator.
    By navigating down the project tree to "Converted Database Objects" we can attempt the data move again by right clicking and choosing "Data Move".
    But first I would restart SQL Developer so as to free up any lingering open cursors.
    That may allow you to complete the data move, as the only cursors being open are being used in the data move and not some cursors which may have been left open from previous steps in the migration.
    Now from my perspective I would like to identify where are we leaving open the cursors, so I'm going to setup some testcases my end to see if I can replicate.
    From your perspective Id presume you just want to move on with the migration.
    So if the above (shutdown and attempt just the data move) doesnt workyou could
    A) Increase the MAX OPEN CURSORs on your Oracle databases so it complete the data move
    or
    B) Use the offline data move technique.
    A) Increase MAX OPEN CURSORs
    This wiki explains how to do that, looks like 1000 is fairly common, but even a much larger number is not a problem
    http://wiki.oracle.com/page/OPEN_CURSORS
    ALTER SYSTEM SET OPEN_CURSORS = 10000;
    OR
    B) Offline Data Move
    If you are moving large amounts of data (say > 1GB), then the standard data move (we call it online), which just uses JDBC to SELECT * FROM and INSERT INTO may not cut the mustard.
    In this case you can try using our offline technique. SQL Developer will generate a set of scripts for you.
    unload_script.bat will use SQL Servers BCP tool to dump out the table data into DAT files.
    oracle_ctl.bat will load the data in the DAT files into Oracle.
    As we know the names of all the tables, columns ,both SQL Server and Oracle, we can generate fairly good scripts.
    The benefit of this technique is large amounts of data can be migrated and you get to use tools designed to dump data and load in data, so you have better error logging and tweaking.
    To attempt this in the Migration Wizard , Data Move page, select offline.
    If you can describe your database a bit (number of tables, number of procedures, amount of data to migrate) I may be able to define my testcase better so I can replicate the issue.
    Thanks
    Dermot
    SQL Developer Team.

  • Issue with sql performance

    Hi, I am experiencing an issue with a couple of sql statements.   The rest of the db seems to be performing optimally.
    A little history:  Stats typically were never touched on this db and they were old (I mean very very old).  However, the database performance was optimal.  Recently we ran into an issue (turned out to be hardware), but in the troubleshooting, we deleted the old statistics and refreshed the stats across the board. 
    Prior to this incident, these queries would finish in mere minutes.
    Performance for a few queries is sub optimal now.
    When I execute this query it is performing ok returning a values in just over a minute.
    select MAX(fr.fee_rqst_sid)
          from fee_rqst fr
          where fr.prcd_dt <=  to_date('15/10/2013', 'DD/MM/RRRR');
    Elapsed: 00:01:10.17
    Plan hash value: 3146244357
    | Id  | Operation          | Name     | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |          |     1 |    23 |   404K  (2)| 01:20:49 |
    |   1 |  SORT AGGREGATE    |          |     1 |    23 |            |          |
    |*  2 |   TABLE ACCESS FULL| FEE_RQST |   148M|  3262M|   404K  (2)| 01:20:49 |
    When it is executed as part of the slightly larger query it belongs to performance drops to over 40 minutes.
        select MAX(ch.clm_hdr_sid)
        from clm_hdr ch
        where ch.fee_rqst_sid <= (
          select MAX(fr.fee_rqst_sid)
          from fee_rqst fr
          where fr.prcd_dt <=  to_date('15/10/2013', 'DD/MM/RRRR'));
    PLAN_TABLE_OUTPUT
    Plan hash value: 2801176651
    | Id  | Operation                    | Name       | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT             |            |     1 |    12 |   718K  (1)| 02:23:41 |
    |   1 |  SORT AGGREGATE              |            |     1 |    12 |            |          |
    |   2 |   TABLE ACCESS BY INDEX ROWID| CLM_HDR    |  9410K|   107M|   718K  (1)| 02:23:41 |
    |*  3 |    INDEX RANGE SCAN          | IDX$_00002 |  1879K|       |  8533   (1)| 00:01:43 |
    |   4 |     SORT AGGREGATE           |            |     1 |    23 |            |          |
    |*  5 |      TABLE ACCESS FULL       | FEE_RQST   |   148M|  3262M|   404K  (2)| 01:20:49 |
    I've create/dropped an index on the date column figuring it might help but it did not as a full table scan still occurred.
    The primary key indexes have up to date stats and are not corrupted  indexes.
    Again this is production and the rest of the db is running optimally and this db is used heavily.
    I did run a sqltune but no new results yielded.
    GENERAL INFORMATION SECTION
    Tuning Task Name   : sql_tuning_task1
    Tuning Task Owner  : SYS
    Workload Type      : Single SQL Statement
    Scope              : COMPREHENSIVE
    Time Limit(seconds): 60
    Completion Status  : COMPLETED
    Started at         : 04/21/2015 16:23:18
    Completed at       : 04/21/2015 16:24:15
    Schema Name: SYS
    SQL ID     : g52fuy8db7qgb
    SQL Text   : select MAX(ch.clm_hdr_sid)
                     from npf.clm_hdr ch
                     where ch.fee_rqst_sid <= (
                       select MAX(fr.fee_rqst_sid)
                       from npf.fee_rqst fr
                       where fr.prcd_dt <=  to_date('15/10/2013', 'DD/MM/RRRR'))
    There are no recommendations to improve the statement.
    Any advice on what else I can check?

    Before asking this question, next time you would need to ask this forum to clean their crystal balls.
    Your many many lines boil down to:
    My car doesn't run, please fix my car, as there is insufficient INFORMATION to work on, and plenty of RIDDLES
    1 Your database doesn't seem to have a four digit version
    2 Your database doesn't seem to run on an OS
    3 The statistics where 'refreshed across the board'. How that happened, this forum needs to guess.
    4 Which indices are present on this table, this forum needs to guess
    5 Which part of the table satisifies the where clause, this forum needs to guess.
    So the obvious would be to answer all of these questions AND run the statement with event 10053 set, so the optimizer decisions are dumped to a trace file,
    See https://asktom.oracle.com/pls/asktom/f?p=100:11:0%3A%3A%3A%3AP11_QUESTION_ID:63445044804318
    And lastly, I find it more and more annoying, many people don't seem to a have a name, and post 100 percent anonymously.
    Sybrand Bakker
    Senior Oracle DBA

  • Performance Issue with sql query

    Hi,
    My db is 10.2.0.5 with RAC on ASM, Cluster ware version 10.2.0.5.
    With bsoa table as
    SQL> desc bsoa;
    Name                                      Null?    Type
    ID                                        NOT NULL NUMBER
    LOGIN_TIME                                         DATE
    LOGOUT_TIME                                        DATE
    SUCCESSFUL_IND                                     VARCHAR2(1)
    WORK_STATION_NAME                                  VARCHAR2(80)
    OS_USER                                            VARCHAR2(30)
    USER_NAME                                 NOT NULL VARCHAR2(30)
    FORM_ID                                            NUMBER
    AUDIT_TRAIL_NO                                     NUMBER
    CREATED_BY                                         VARCHAR2(30)
    CREATION_DATE                                      DATE
    LAST_UPDATED_BY                                    VARCHAR2(30)
    LAST_UPDATE_DATE                                   DATE
    SITE_NO                                            NUMBER
    SESSION_ID                                         NUMBER(8)
    The query
    UPDATE BSOA SET LOGOUT_TIME =SYSDATE WHERE SYS_CONTEXT('USERENV', 'SESSIONID') = SESSION_ID
    Is taking a lot of time to execute and in AWR reports also it is on top in
    1. SQL Order by elapsed time
    2. SQL order by reads
    3. SQL order by gets
    So i am trying a way to solve the performance issue as the application is slow specially during login and logout time.
    I understand that the function in the where condition cause to do FTS, but i can not think what other parts to look at.
    Also:
    SQL> SELECT COUNT(1) FROM BSOA;
      COUNT(1)
       7800373
    The explain plan for  "UPDATE BSOA SET LOGOUT_TIME =SYSDATE WHERE SYS_CONTEXT('USERENV', 'SESSIONID') = SESSION_ID" is
    {code}
    PLAN_TABLE_OUTPUT
    Plan hash value: 1184960901
    | Id  | Operation          | Name               | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | UPDATE STATEMENT   |                    |     1 |    26 | 18748   (3)| 00:03:45 |
    |   1 |  UPDATE            | BSOA |       |       |            |          |
    |*  2 |   TABLE ACCESS FULL| BSOA |     1 |    26 | 18748   (3)| 00:03:45 |
    Predicate Information (identified by operation id):
       2 - filter("SESSION_ID"=TO_NUMBER(SYS_CONTEXT('USERENV','SESSIONID')))
    {code}

    Hi,
    There are also triggers before update and AUDITS on this table.
    CREATE OR REPLACE TRIGGER B2.TRIGGER1
    BEFORE UPDATE
    ON B2.BSOA  REFERENCING OLD AS OLD NEW AS NEW
    FOR EACH ROW
    :NEW.LAST_UPDATED_BY   := USER    ;
    :NEW.LAST_UPDATE_DATE  := SYSDATE ;
    END;
    CREATE OR REPLACE TRIGGER B2.TRIGGER2
    BEFORE INSERT
    ON B2.BSOA  REFERENCING OLD AS OLD NEW AS NEW
    FOR EACH ROW
    :NEW.CREATED_BY        := USER ;
    :NEW.CREATION_DATE     := SYSDATE ;
    :NEW.LAST_UPDATED_BY   := USER    ;
    :NEW.LAST_UPDATE_DATE  := SYSDATE ;
    END;
    And also there is an audit on this table
    AUDIT UPDATE ON B2.BSOA BY ACCESS WHENEVER SUCCESSFUL;
    AUDIT UPDATE ON B2.BSOA BY ACCESS WHENEVER NOT SUCCESSFUL;
    And the sessionid column in BSOA has height balanced histogram.
    When i create an index i get the following error. As i am on 10g I can't use DDL_LOCK_TIMEOUT . I may have to wait for next down time.
    SQL> CREATE INDEX B2.BSOA_SESSID_I ON B2.BSOA(SESSION_ID) TABLESPACE B2 COMPUTE STATISTICS;
    CREATE INDEX B2.BSOA_SESSID_I ON B2.BSOA(SESSION_ID) TABLESPACE B2 COMPUTE STATISTICS
    ERROR at line 1:
    ORA-00054: resource busy and acquire with NOWAIT specified
    Thanks

  • Issue with displaying Greek characters in Oracle 11.1

    Hi,
    We are having issues with display of Non-English language (for ex Greek) text on Pega-PRPC. The text is stored in a reference table in Oracle DB. However there is not need of translation in PRPC as it has the capability of displaying non-english language also.
    I believe that it is a issue with DB settings, although not sure of what is the setting.
    Below is the result after running the query: select * from nls_database_parameters
    NLS_LANGUAGE     AMERICAN
    NLS_TERRITORY     AMERICA
    NLS_CURRENCY     $
    NLS_ISO_CURRENCY     AMERICA
    NLS_NUMERIC_CHARACTERS     .,
    NLS_CHARACTERSET     AL32UTF8
    NLS_CALENDAR     GREGORIAN
    NLS_DATE_FORMAT     DD-MON-RR
    NLS_DATE_LANGUAGE     AMERICAN
    NLS_SORT     BINARY
    NLS_TIME_FORMAT     HH.MI.SSXFF AM
    NLS_TIMESTAMP_FORMAT     DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT     HH.MI.SSXFF AM TZR
    NLS_TIMESTAMP_TZ_FORMAT     DD-MON-RR HH.MI.SSXFF AM TZR
    NLS_DUAL_CURRENCY     $
    NLS_COMP     BINARY
    NLS_LENGTH_SEMANTICS     BYTE
    NLS_NCHAR_CONV_EXCP     FALSE
    NLS_NCHAR_CHARACTERSET     AL16UTF16
    NLS_RDBMS_VERSION     11.1.0.6.0
    Please help.

    869852 wrote:
    Hi,
    We are having issues with display of Non-English language (for ex Greek) text on Pega-PRPC. The text is stored in a reference table in Oracle DB. However there is not need of translation in PRPC as it has the capability of displaying non-english language also.
    I believe that it is a issue with DB settings, although not sure of what is the setting.
    The first question that needs to be answered is whether the problem is a data storage problem or data presentation problem.
    The query below will answer this question.
    SELECT ASCIISTR(greek_column) from greek_table where key_id = <specific_value>;

  • *** ERROR = CONNECT failed with SQL error '12154' after Oracle Upgrade

    Hello Experts,
    Recently I upgraded my oracle database from 11.2.0.3 to 11.2.0.4.The upgrade completed successfully but I am unable to start the instance.
    R3trans -d failing with the error--
    OCIServerAttach(OCI_DEFAULT) failed with -1=OCI_ERROR
    OCIServerAttach(OCI_DEFAULT) failed with SQL error 12154:    
    ORA-12154: TNS:could not resolve the connect identifier specified
    OCIServerAttach(con=0, svc=069C1630): Error 12154 attaching new srv=069C17D0
    OCIHandleFree(con=0): Server handle srv=069C17D0 freed.          
    server_detach(con=0, svc=069C1630; srv=NULL, stale=2)            
    OCIHandleFree(con=0): Service svc=069C1630 freed (i=1).          
    *** ERROR => CONNECT failed with SQL error '12154'              
    -->oci_get_errmsg (con=0, rc=12154)                              
      OCIErrorGet() -> SQL error code: 12154; buflen=66            
    OCIErrorGet(): error text ->                                    
    ORA-12154: TNS:could not resolve the connect identifier specified
    ocica() -> SQL error code 12154,12154                          
      DbSlConnect(con=0) -> orc=12154, rc=99=DBSL_ERR_DB            
    ***LOG BY2=>sql error 12154  performing CON                      
    ***LOG BY0=>ORA-12154: TNS:could not resolve the connect identifier specified
    I have checked listener is up and running properly.Entry is maintained in tnsnames.ora.
    Also kernel is upgraded with latest path.Curent kernel version--742
    Please suggest on the mentioned error.I am attaching the logs here.Thanks in advance.
    Best Regards,
    Debaditya

    Hi Debadiya
    Kindly check this SAP Notes
    1204916 - Error: "ORA-12154" when connecting to Oracle from a Windows 64-bit platform
    2153975 - Database connectivity fails with ORA-12154
    556232 - Environment settings for R/3/Oracle on Windows
    443867 - ORA-12154 Collective SAP note
    BR
    SS

  • DB-Library BCP issue with SQL Server 2014

    Hello,
    My application uses DB-Library (ntwdblib.dll) to communicate with SQL Server 2014. We are having issues calling bcp related functions like bcp_init which always returns FAIL status. Our application was working fine with SQL Server 2012 and all other previous
    SQL releases. But we are getting below error in SQL 2014,
    msg 4801, state 1, severity 16 : Insert bulk is not supported over this access protocol.
    Can anyone please help ?
    Thanks,
    Himanshu

    Hi Himanshu_kus,
    Is this still an issue, or can we close the thread?
    [Personal Site] [Blog] [Facebook]

  • DB Read/Get Issues with SQL

    Hi,
    I am having issues with DB Get. Even after assigning the local variable in CRS script as "Date" type, I am unable to select it as a local variable in the "Add/Modify Button under the Filed Selection TAB.
    The Filed type for this in SQL DB is DateTime.
    Attached is the screenshot.
    Can somebody suggest what is the issue?

    Hi,
    I ran into this situation before. The only way I could work around it, was to create a view in SQL, which takes the date and convert it to a String (ex: 20091029). So, instead of doing the request against the table, I'm doing it against the view.
    After that, I'm able to retrieve the date as a String and convert it back to a date using the following Java code into a "SET" step:
    Assume that you have a variable named "nDateFromSQL" of type String
    SimpleDateFormat lFormatter = new SimpleDateFormat("yyyyMMdd");
    nTrandate = lFormatter.parse(nDateFromSQL);
    I hope that help !

  • Screen refresh issue with SQL Developer 1.5.5 on Vista 64 bit

    I am using the latest version of SQL Developer.
    I have screen refresh issues in sql developer. On scrolling up and down the display gets jumbled, some time screen do not display at all. Its making working with SQL Developer very difficult. I don't have such an issue with any of my other editors.
    Is this something specific to Vista? Is there any know solution to this issue.
    Thanks
    Edited by: user5899685 on Sep 1, 2009 11:14 AM

    Specific? Not really, but judging from the posts here Vista is more prone. It usually indicates incompatibility between Java and video drivers.
    If updating your JDK or video driver doesn't work or isn't an option, just disabling DirectDraw in \sqldeveloper\bin\sqldeveloper.conf usually works too:
    AddVMOption -Dsun.java2d.noddraw=trueHope that helps,
    K.

  • Issue with SQL Developer connecting to databases

    Hi all,
    I would be really grateful if anyone could advise me on the below issue.
    I have 64bit laptop running Windows 7 and I get the following error message when I try to connect via SQL Developer to an external database for work purposes:
    Status: Test Failed: C:\app\Terra-PC\product\product\11.2.0\dbhome_1\BIN\ocijdbc.dll: Can't load AMD64-bit .dll on a IA 32 -bit platform.
    Thanks for your help.
    Luke

    Hi,
    Actually, I resolved this issue with the help of a colleague. SQL Dev was not able to see my TNSnames file, because the Oracle_Home path was not defined. Something like that, anyway.
    Thanks,
    Luke

  • Any known issues with SQL DB Link Synonyms joining on encrypted columns

    Are there any known issues with accessing encrypted columns via a database link that is masked by a synonym?
    We are experiencing unexpected results when the encrypted column is anti-joined through a not exists, to a local encrypted column of the same datatype The encrypted columns are person ids. If the expected person id is hard coded, the results return correctly. The local database is 10.2.0.4.0 and the link is to a 10.2.0.3.0 RAC.
    Both enrollments and person_ids, below, are synonyms to the linked tables.
    ... From table_1 d
    where ...
    AND NOT EXISTS (SELECT 1
    FROM enrollments x,
    person_ids p
    WHERE x.person_demo = p.person_demo
    AND x.rept_inst = d.rept_inst
    AND x.demo_time_frame = d.term_deg_grant
    AND p.person_id_encrypted = '999999999')
    vs.
    ... From table_1 d
    where ...
    AND NOT EXISTS (SELECT 1
    FROM enrollments x,
    person_ids p
    WHERE x.person_demo = p.person_demo
    AND x.rept_inst = d.rept_inst
    AND x.demo_time_frame = d.term_deg_grant
    AND p.person_id_encrypted = d.person_id_encrypted)

    milazzo74 wrote:
    I am having the same problem...
    http://www.milazzo.com.br/teste/projetos.php
    It works fine in Firefox but loads forever in explorer 8...
    The cause of the problem is not the same.
    In your case it takes forever to load the thumbnails from flickr.com; the SpryDataSets without the loading of the thumbnails works as expected.
    Remember that ALL of the thumbnails for each 60 odd projects are downloaded from flickr, that is about 1800 thumbnails.
    Gramps

Maybe you are looking for