10G bug: Simple query terminate oracle session in 10g

The following query fails because it terminates the connection to the oracle database. This only occurs in 10g and Oracle XE. Below that query is the structure of the table and sql statements to populate the table.
I got this from a friend who tried to use 10g, but had to upgrade to Oracle 9 :-) I tested it with Oracle XE. Same problem with 10g and XE. We both use fully patched Windows XP professional.
greetings
SELECT ID_LEVSVIKTPOT
FROM T_RISA_LEVSVIKTPOT
WHERE KRITISK_FORBRUKER = -1;
---- 8< data definition 8< ----
CREATE TABLE T_RISA_LEVSVIKTPOT
ID_LEVSVIKTPOT INTEGER DEFAULT 0 NOT NULL,
NAVN VARCHAR2(50 BYTE),
LT INTEGER DEFAULT 0,
GT INTEGER DEFAULT 0,
KRITISK_FORBRUKER INTEGER DEFAULT -1 NOT NULL
TABLESPACE USERS
PCTUSED 0
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
BUFFER_POOL DEFAULT
LOGGING
NOCOMPRESS
NOCACHE
NOPARALLEL
NOMONITORING;
ALTER TABLE T_RISA_LEVSVIKTPOT ADD (
CHECK (Kritisk_Forbruker = 0 or Kritisk_Forbruker = -1),
PRIMARY KEY
(ID_LEVSVIKTPOT));
INSERT INTO T_RISA_LEVSVIKTPOT ( ID_LEVSVIKTPOT, NAVN, LT, GT,
KRITISK_FORBRUKER ) VALUES (
1, '< 10 MW', 10, 0, 0);
INSERT INTO T_RISA_LEVSVIKTPOT ( ID_LEVSVIKTPOT, NAVN, LT, GT,
KRITISK_FORBRUKER ) VALUES (
2, '10 - 1000 MV', 1000, 10, 0);
INSERT INTO T_RISA_LEVSVIKTPOT ( ID_LEVSVIKTPOT, NAVN, LT, GT,
KRITISK_FORBRUKER ) VALUES (
3, '> 1000 MV og/eller kritisk forbruker', -1, 1000, -1);
commit;

Could not reproduce on my 10gR2 system. What error are you getting and is a trace file produced?
test@ORCL> CREATE TABLE T_RISA_LEVSVIKTPOT
  2  (
  3  ID_LEVSVIKTPOT INTEGER DEFAULT 0 NOT NULL,
  4  NAVN VARCHAR2(50 BYTE),
  5  LT INTEGER DEFAULT 0,
  6  GT INTEGER DEFAULT 0,
  7  KRITISK_FORBRUKER INTEGER DEFAULT -1 NOT NULL
  8  )
  9  TABLESPACE USERS
10  PCTUSED 0
11  PCTFREE 10
12  INITRANS 1
13  MAXTRANS 255
14  STORAGE (
15  INITIAL 64K
16  MINEXTENTS 1
17  MAXEXTENTS 2147483645
18  PCTINCREASE 0
19  BUFFER_POOL DEFAULT
20  )
21  LOGGING
22  NOCOMPRESS
23  NOCACHE
24  NOPARALLEL
25  NOMONITORING;
Table created.
Elapsed: 00:00:00.35
test@ORCL>
test@ORCL> ALTER TABLE T_RISA_LEVSVIKTPOT ADD (
  2  CHECK (Kritisk_Forbruker = 0 or Kritisk_Forbruker = -1),
  3  PRIMARY KEY
  4  (ID_LEVSVIKTPOT));
Table altered.
Elapsed: 00:00:00.21
test@ORCL> INSERT INTO T_RISA_LEVSVIKTPOT ( ID_LEVSVIKTPOT, NAVN, LT, GT,
  2  KRITISK_FORBRUKER ) VALUES (
  3  1, '< 10 MW', 10, 0, 0);
1 row created.
Elapsed: 00:00:00.01
test@ORCL> INSERT INTO T_RISA_LEVSVIKTPOT ( ID_LEVSVIKTPOT, NAVN, LT, GT,
  2  KRITISK_FORBRUKER ) VALUES (
  3  2, '10 - 1000 MV', 1000, 10, 0);
1 row created.
Elapsed: 00:00:00.01
test@ORCL> INSERT INTO T_RISA_LEVSVIKTPOT ( ID_LEVSVIKTPOT, NAVN, LT, GT,
  2  KRITISK_FORBRUKER ) VALUES (
  3  3, '> 1000 MV og/eller kritisk forbruker', -1, 1000, -1);
1 row created.
Elapsed: 00:00:00.00
test@ORCL> commit;
Commit complete.
Elapsed: 00:00:00.00
test@ORCL> SELECT ID_LEVSVIKTPOT
  2  FROM T_RISA_LEVSVIKTPOT
  3  WHERE KRITISK_FORBRUKER = -1;
ID_LEVSVIKTPOT
             3
Elapsed: 00:00:00.00
test@ORCL> select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Prod
PL/SQL Release 10.2.0.2.0 - Production
CORE    10.2.0.2.0      Production
TNS for 32-bit Windows: Version 10.2.0.2.0 - Production
NLSRTL Version 10.2.0.2.0 - Production
Elapsed: 00:00:00.03
test@ORCL>

Similar Messages

  • Simple Query in Oracle Linked Table in MS Access causes full table scan.

    I am running a very simple query in MS ACCESS to a linked Oracle table as follows:
    Select *
    From EXPRESS_SERVICE_EVENTS --(the linked table name refers to EXPRESS.SERVICE_EVENTS)
    Where performed > MyDate()
    or
    Select *
    From EXPRESS_SERVICE_EVENTS --(the linked table name refers to EXPRESS.SERVICE_EVENTS)
    Where performed > [Forms]![MyForm]![Date1]
    We have over 50 machines and this query runs fine on over half of these, using an Oracle Index on the "performed" field. Running exactly the same thing on the other machines causes a full table scan, therefore ignoring the Index (all machines access the same Access DB).
    Strangely, if we write the query as follows:
    Select *
    From EXPRESS_SERVICE_EVENTS
    Where performed > #09/04/2009 08:00#
    it works fast everywhere!
    Any help on this 'phenominon' would be appreciated.
    Things we've done:
    Checked regional settings, ODBC driver settings, MS Access settings (as in Tools->Options), we have the latest XP and Office service packs, and re-linked all Access Tables on both the slow and fast machines independantly).

    Primarily, thanks gdarling for your reply. This solved our problem.
    Just a small note to those who may be using this thread.
    Although this might not be the reason, my PC had Oracle 9iR2 installed with Administratiev Tools, where user machines had the same thing installed but using Runtime Installation. For some reason, my PC did not have 'bind date' etc. as an option in the workarounds, but user machines did have this workaround option. Strangely, although I did not have the option, my (ODBC) query was running as expected, but user queries were not.
    When we set the workaround checkbox accordingly, the queries then run as expected (fast).
    Once again,
    Thanks

  • How to run simple query on oracle 11.2.0 ?

    hi
    i installed oracle 11.2.0 64bit on my Windows-7 64bit
    how i can connect and run any query on oracle ?
    what are the default tools that came with the installation and how to use it ?
    i sow in the forum that people write
    sql> select * from myTable ........
    how to get to this ?
    thanks in advance

    user1036207 wrote:
    hi
    i installed oracle 11.2.0 64bit on my Windows-7 64bit
    how i can connect and run any query on oracle ?
    what are the default tools that came with the installation and how to use it ?
    i sow in the forum that people write
    sql> select * from myTable ........
    how to get to this ?
    Open a command prompt and type
    sqlplus sys/syspwd@instance as sysdbaand you'll have yourself a sqlprompt.
    HTH
    //Johan

  • XE and 10g bug: small query terminates connection to database

    The following query fails because it terminates the connection to the oracle database. This only occurs in 10g and Oracle XE. Below that query is the structure of the table and sql statements to populate the table.
    I got this from a friend who tried to use 10g, but had to upgrade to Oracle 9 :-) I tested it with Oracle XE. Same problem with 10g and XE. We both use fully patched Windows XP professional. I tested the query in SQLplus.
    greetings,
    SELECT ID_LEVSVIKTPOT
    FROM T_RISA_LEVSVIKTPOT
    WHERE KRITISK_FORBRUKER = -1;
    ---- 8< data definition 8< ----
    CREATE TABLE T_RISA_LEVSVIKTPOT
    ID_LEVSVIKTPOT INTEGER DEFAULT 0 NOT NULL,
    NAVN VARCHAR2(50 BYTE),
    LT INTEGER DEFAULT 0,
    GT INTEGER DEFAULT 0,
    KRITISK_FORBRUKER INTEGER DEFAULT -1 NOT NULL
    TABLESPACE USERS
    PCTUSED 0
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    LOGGING
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    NOMONITORING;
    ALTER TABLE T_RISA_LEVSVIKTPOT ADD (
    CHECK (Kritisk_Forbruker = 0 or Kritisk_Forbruker = -1),
    PRIMARY KEY
    (ID_LEVSVIKTPOT));
    INSERT INTO T_RISA_LEVSVIKTPOT ( ID_LEVSVIKTPOT, NAVN, LT, GT,
    KRITISK_FORBRUKER ) VALUES (
    1, '< 10 MW', 10, 0, 0);
    INSERT INTO T_RISA_LEVSVIKTPOT ( ID_LEVSVIKTPOT, NAVN, LT, GT,
    KRITISK_FORBRUKER ) VALUES (
    2, '10 - 1000 MV', 1000, 10, 0);
    INSERT INTO T_RISA_LEVSVIKTPOT ( ID_LEVSVIKTPOT, NAVN, LT, GT,
    KRITISK_FORBRUKER ) VALUES (
    3, '> 1000 MV og/eller kritisk forbruker', -1, 1000, -1);
    commit;

    It worked fine for me:
    SQL> conn faust/********
    Connected.
    SQL> SELECT ID_LEVSVIKTPOT
      2  FROM T_RISA_LEVSVIKTPOT
      3  WHERE KRITISK_FORBRUKER = -1;
    FROM T_RISA_LEVSVIKTPOT
    ERROR at line 2:
    ORA-00942: table or view does not exist
    SQL> CREATE TABLE T_RISA_LEVSVIKTPOT
      2  (
      3  ID_LEVSVIKTPOT INTEGER DEFAULT 0 NOT NULL,
      4  NAVN VARCHAR2(50 BYTE),
      5  LT INTEGER DEFAULT 0,
      6  GT INTEGER DEFAULT 0,
      7  KRITISK_FORBRUKER INTEGER DEFAULT -1 NOT NULL
      8  )
      9  TABLESPACE USERS
    10  PCTUSED 0
    11  PCTFREE 10
    12  INITRANS 1
    13  MAXTRANS 255
    14  STORAGE (
    15  INITIAL 64K
    16  MINEXTENTS 1
    17  MAXEXTENTS 2147483645
    18  PCTINCREASE 0
    19  BUFFER_POOL DEFAULT
    20  )
    21  LOGGING
    22  NOCOMPRESS
    23  NOCACHE
    24  NOPARALLEL
    25  NOMONITORING;
    Table created.
    SQL> ALTER TABLE T_RISA_LEVSVIKTPOT ADD (
      2  CHECK (Kritisk_Forbruker = 0 or Kritisk_Forbruker = -1),
      3  PRIMARY KEY
      4  (ID_LEVSVIKTPOT));
    Table altered.
    SQL> INSERT INTO T_RISA_LEVSVIKTPOT ( ID_LEVSVIKTPOT, NAVN, LT, GT,
      2  KRITISK_FORBRUKER ) VALUES (
      3  1, '< 10 MW', 10, 0, 0);
    1 row created.
    SQL> INSERT INTO T_RISA_LEVSVIKTPOT ( ID_LEVSVIKTPOT, NAVN, LT, GT,
      2  KRITISK_FORBRUKER ) VALUES (
      3  2, '10 - 1000 MV', 1000, 10, 0);
    1 row created.
    SQL> INSERT INTO T_RISA_LEVSVIKTPOT ( ID_LEVSVIKTPOT, NAVN, LT, GT,
      2  KRITISK_FORBRUKER ) VALUES (
      3  3, '> 1000 MV og/eller kritisk forbruker', -1, 1000, -1);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select banner from v$version;
    BANNER
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    SQL>Cheers!

  • Errors in simple query in oracle 9i personal edition

    hi,
    i have oracle 9i personal edition release 9.0.1.1.1 - production.
    with it came sql*plus release 9.0.1.0.1 - production
    i have installed it on windows 98SE
    what i did is the following
    step 1:
    create type address_ty as object
    (street varchar2(50),
    city varchar2(50),
    state char(2),
    zip number);
    when i executed i got message "type created"
    step 2 :
    create table customer
    (cust_id number ,
    person address_ty);
    when i executed this i got message "table created"
    step 3 :
    insert into customer values
    (3,address_ty('xyz','abc','AP',4563));
    i get messsage "1 row created"
    step 4 :
    select cust_id,person.street from customer;
    i get error message .......
    select cust_id,person.street from customer;
    ERROR at line 1:
    ORA-00904: invalid column name
    i tried this example from the book "Oracle Complete Reference" from oracle press.
    what is the problem how to avoid it.
    i am a beginner help
    gopal

    hi! i'm not very sure, but your second field selected is person.street, do you have this field?
    why not try just select * from tablename, you should see the result.
    hope that helps.
    rgds.

  • PC session hangs when launch a query from Oracle 9i client to 10g database

    I have a pc with Oracle 9.2.0.1.0 client installed. The database server level is 10.1.0.5.
    When I launch a query from a client session the pc sesssion locks up and doesn't return any results. When I launch the same query from the database server , or from other pcs with Oracle client 10 installed , I get results almost immediately from the query.
    The pc in question is running Windows XP Service pack 2. Other queries run fine from the pc.
    Are there are any known issues with Oracle 9 clients querying an Oracle 10 database ?

    Thank you for your reply. No, I must admit I didn't think of looking at the wait events. I will look at this as soon as I get a chance.
    Thanks again for your suggestion.

  • Frm-40505:ORACLE error: unable to perform query in oracle forms 10g

    Hi,
    I get error frm-40505:ORACLE error: unable to perform query on oracle form in 10g environment, but the same form works properly in 6i.
    Please let me know what do i need to do to correct this problem.
    Regards,
    Priya

    Hi everyone,
    I have block created on view V_LE_USID_1L (which gives the error frm-40505) . We don't need any updation on this block, so the property 'updateallowed' is set to 'NO'.
    To fix this error I modified 'Keymode' property, set it to 'updatable' from 'automatic'. This change solved the problem with frm-40505 but it leads one more problem.
    The datablock v_le_usid_1l allows user to enter the text (i.e. updated the field), when the data is saved, no message is shown. When the data is refreshed on the screen, the change done previously on the block will not be seen (this is because the block updateallowed is set to NO), how do we stop the fields of the block being editable?
    We don't want to go ahead with this solution as, we might find several similar screens nad its diff to modify each one of them individually. When they work properly in 6i, what it doesn't in 10g? does it require any registry setting?
    Regards,
    Priya

  • How I create a simple instaltion to Oracle 10g Client

    Firstly I dont know where I post about this... So Post here. I need create a Simple instalation to Oracle Client...
    example: Next, next and conclude. when I define the parameters previously... this is possible?

    Hi;
    You need to use response file
    http://docs.oracle.com/html/B13804_02/advance.htm
    http://docs.oracle.com/cd/B19306_01/install.102/b14312/advance.htm
    Also please use search mechanism which we discussed similar issue many times. Also notice 10g not supported anymore.
    PS:Please dont forget to change thread status to answered if it possible when u belive your thread has been answered, it pretend to lose time of other forums user while they are searching open question which is not answered,thanks for understanding
    Regard
    Helios

  • Simple Query working on 10G and not working on 11gR2 after upgrade

    Hi Folks,
    This is the first time i am posting the query in this Blog.
    I have a small issue which preventing the UAT Sigoff.
    Simple query working fine on 10.2.0.1 and after upgrade to 11.2.0.1 its error out
    10.2.0.4:
    =====
    SQL> SELECT COUNT(*) FROM APPS.HZ_PARTIES HP WHERE ATTRIBUTE_CATEGORY= 'PROPERTY' AND ATTRIBUTE1=1;
    COUNT(*)
    1
    SQL> SELECT COUNT(*) FROM APPS.HZ_PARTIES HP WHERE ATTRIBUTE_CATEGORY= 'PROPERTY' AND ATTRIBUTE1=00001;
    COUNT(*)
    1
    SQL> select ATTRIBUTE1 FROM APPS.HZ_PARTIES HP WHERE ATTRIBUTE_CATEGORY= 'PROPERTY' AND ATTRIBUTE1=1;
    ATTRIBUTE1
    00001
    11.2.0.1:
    =====
    SQL> SELECT COUNT(*) FROM APPS.HZ_PARTIES HP WHERE ATTRIBUTE_CATEGORY= 'PROPERTY' AND ATTRIBUTE1=1
    ERROR at line 1:
    ORA-01722: invalid number
    SQL> SELECT COUNT(*) FROM APPS.HZ_PARTIES HP WHERE ATTRIBUTE_CATEGORY= 'PROPERTY' AND ATTRIBUTE1=00001
    ERROR at line 1:
    ORA-01722: invalid number
    SQL> select ATTRIBUTE1 FROM APPS.HZ_PARTIES HP WHERE ATTRIBUTE_CATEGORY= 'PROPERTY' AND ATTRIBUTE1='1';
    no rows selected
    SQL> SELECT COUNT(*) FROM APPS.HZ_PARTIES HP WHERE ATTRIBUTE_CATEGORY= 'PROPERTY' AND ATTRIBUTE1='00001';
    COUNT(*)
    1
    SQL> select ATTRIBUTE1 FROM APPS.HZ_PARTIES HP WHERE ATTRIBUTE_CATEGORY= 'PROPERTY' AND ATTRIBUTE1='00001';
    ATTRIBUTE1
    00001
    ++++++++++++++++++++++++++++++++++++++++++++++
    SQL > desc APPS.HZ_PARTIES
    Name Type
    ======== ======
    ATTRIBUTE1 VARCHAR2(150)
    ++++++++++++++++++++++++++++++++++++++++++++++
    Changes:
    Recently i upgraded the DB from 10.2.0.4 to 11.2.0.1
    Query:
    1.If the type of that row is VARCHAR,why it is working in 10.2.0.4 and why not working in 11.2.0.1
    2.after upgrade i analyzed the table with "analyze table " query for all AP,AR,GL,HR,BEN,APPS Schemas--Is it got impact if we run analyze table.
    Please provide me the answer for above two questions or refer the document is also well enough to understand.Based on the Answer client will sigoff to-day.
    Thanks,
    P Kumar

    WhiteHat wrote:
    the issue has already been identified: in oracle versions prior to 11, there was an implicit conversion of numbers to characters. your database has a character field which you are attempting to compare to a number.
    i.e. the string '000001' is not in any way equivalent to the number 1. but Oracle 10 converts '000001' to a number because you are asking it to compare to the number you have provided.
    version 11 doesn't do this anymore (and rightly so).
    the issue is with the bad code design. you can either: use characters in the predicate (where field = 'parameter') or you can do a conversion of the field prior to comparing (where to_num(field) = parameter).
    I would suggest that you should fix your code and don't assume that '000001' = 1I don't think that the above is completely correct, and a simple demonstration will show why. First, a simple table on Oracle Database 10.2.0.4:
    CREATE TABLE T1(C1 VARCHAR2(20));
    INSERT INTO T1 VALUES ('1');
    INSERT INTO T1 VALUES ('0001');
    COMMIT;A select from the above table, relying on implicit data type conversion:
    SELECT
    FROM
      T1
    WHERE
      C1=1;
    C1
    1
    0001Technically, the second row should not have been returned as an exact match. Why was it returned, let's take a look at the actual execution plan:
    SELECT
    FROM
      TABLE(DBMS_XPLAN.DISPLAY_CURSOR(NULL,NULL,NULL));
    SQL_ID  g6gvbpsgj1dvf, child number 0
    SELECT   * FROM   T1 WHERE   C1=1
    Plan hash value: 3617692013
    | Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |      |       |       |     2 (100)|          |
    |*  1 |  TABLE ACCESS FULL| T1   |     2 |    24 |     2   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - filter(TO_NUMBER("C1")=1)
    Note
       - dynamic sampling used for this statementNotice that the VARCHAR2 column was converted to a NUMBER, so if there was any data in that column that could not be converted to a number (or NULL), we should receive an error (unless the bad rows are already removed due to another predicate in the WHERE clause). For example:
    INSERT INTO T1 VALUES ('.0001.');
    SELECT
    FROM
      T1
    WHERE
      C1=1;
    SQL> SELECT
      2    *
      3  FROM
      4    T1
      5  WHERE
      6    C1=1;
    ERROR:
    ORA-01722: invalid numberNow the same test on Oracle Database 11.1.0.7:
    CREATE TABLE T1(C1 VARCHAR2(20));
    INSERT INTO T1 VALUES ('1');
    INSERT INTO T1 VALUES ('0001');
    COMMIT;
    SELECT
    FROM
      T1
    WHERE
      C1=1;
    C1
    1
    0001
    SELECT
    FROM
      TABLE(DBMS_XPLAN.DISPLAY_CURSOR(NULL,NULL,NULL));
    SQL_ID  g6gvbpsgj1dvf, child number 0
    SELECT   * FROM   T1 WHERE   C1=1
    Plan hash value: 3617692013
    | Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |      |       |       |     2 (100)|          |
    |*  1 |  TABLE ACCESS FULL| T1   |     2 |    24 |     2   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - filter(TO_NUMBER("C1")=1)
    Note
       - dynamic sampling used for this statement
    INSERT INTO T1 VALUES ('.0001.');
    SELECT
    FROM
      T1
    WHERE
      C1=1;
    SQL> SELECT
      2    *
      3  FROM
      4    T1
      5  WHERE
      6    C1=1;
    ERROR:
    ORA-01722: invalid numberAs you can see, exactly the same actual execution plan, and the same end result.
    The OP needs to determine if non-numeric data now exists in the column. Was the database characterset possibly changed during/after the upgrade?
    Charles Hooper
    Co-author of "Expert Oracle Practices: Oracle Database Administration from the Oak Table"
    http://hoopercharles.wordpress.com/
    IT Manager/Oracle DBA
    K&M Machine-Fabricating, Inc.

  • Desktop Intelligence XI 3.1 in 3-tier mode and a lot of Oracle sessions

    Hi All,
    I wanted to set BusinessObjects Enterprise XI 3.1 for our customers (they use BOE XI R2 now).
    But I met with some problem for Desktop Intelligence in 3-tier mode (ZABO formerly).
    Configuration:
    BO Server: BusinessObjects Enterprise XI 3.1
    BO Client: Desktop Intelligence version 12.1.0.882
    BOE Connection Server: version 12.1.0.882 (2.0.0.29)
    Product database (Data Warehouse): Oracle Server 10g
    Database client: Oracle Client 10.2.0.1
    Connection type: http (J2EE Portal) u2013 Tomcat
    Customer DI Documents contain 10 queries on average.
    Problem:
    ConnectionServer create a session in Oracle FOR EACH QUERY from Desktop Intelligence document and BY EACH REFRESH.
    e.g.:
    30 users loaded any reports simultaneously and refresh theirs:
    30 users * 10 queries (per 1 doc on average) = 301 Oracle sessions !!! (300 for queries and 1 for connection)
    second refresh: 301 + 300 = 601 Oracle sessions
    third refresh: 601 + 300 = 901 Oracle sessions
    etc. while Oracle server is not down.
    For DI doc in 2-tier mode (client-server) u2013 only 1 sessionu2026
    Thanks.

    Look at the XI3.0 migration guide on that site.
    From page 333 onward some good info on the subject of calc. engine changes.

  • Simple query optimization

    Hi,
    I'm using Oracle 10g r2.
    I have this simple query that seems to take too much time to execute :
    DECLARE
         nb_mesures INTEGER;
         min_day DATE;
         max_day DATE;
    BEGIN
         SELECT
              COUNT(meas_id),
              MIN(meas_day),
              MAX(meas_day)
         INTO
              nb_mesures,
              min_day,
              max_day
         FROM
              geodetic_measurements gm
              INNER JOIN
              operation_measurements om
              ON gm.meas_id = om.ogm_meas_id
         WHERE ogm_op_id = 0;
         htp.p(nb_mesures||' measurements from '||min_day||' to '||max_day);
    END;- Tables (about 11.000 records for the "Operations" table, and 800.000 for the 2 others) :
    "Operation_measurements" is the table who makes the link between the 2 others (get the 2 keys).
    SQL> DESCRIBE OPERATIONS
    Nom                  NULL     Type
    OP_ID                NOT NULL NUMBER(7)
    OP_PARENT_OP_ID               NUMBER(7)
    OP_RESPONSIBLE       NOT NULL VARCHAR2(10)
    OP_DESCRIPT                   VARCHAR2(80)
    OP_VEDA_NAME         NOT NULL VARCHAR2(10)
    OP_BEGIN             NOT NULL DATE
    OP_END                        DATE
    OP_INSERT_DATE                DATE
    OP_LAST_UPDATE                DATE
    OP_INSERT_BY                  VARCHAR2(50)
    OP_UPDATE_BY                  VARCHAR2(50)
    SQL> DESCRIBE OPERATION_MEASUREMENTS
    Nom                  NULL     Type
    OGM_MEAS_ID          NOT NULL NUMBER(7)
    OGM_OP_ID            NOT NULL NUMBER(6)
    OGM_INSERT_DATE               DATE
    OGM_LAST_UPDATE               DATE
    OGM_INSERT_BY                 VARCHAR2(50)
    OGM_UPDATE_BY                 VARCHAR2(50)
    SQL> DESCRIBE GEODETIC_MEASUREMENTS
    Nom                  NULL     Type
    MEAS_ID              NOT NULL NUMBER(7)
    MEAS_TYPE            NOT NULL VARCHAR2(2)
    MEAS_TEAM            NOT NULL VARCHAR2(10)
    MEAS_DAY             NOT NULL DATE
    MEAS_OBJ_ID          NOT NULL NUMBER(6)
    MEAS_STATUS                   VARCHAR2(1)
    MEAS_COMMENT                  VARCHAR2(150)
    MEAS_DIRECTION                VARCHAR2(1)
    MEAS_DIST_MODE                VARCHAR2(2)
    MEAS_SPAT_ID         NOT NULL NUMBER(7)
    MEAS_INST_ID                  NUMBER(7)
    MEAS_DECALAGE                 NUMBER(8,5)
    MEAS_INST_HEIGHT              NUMBER(8,5)
    MEAS_READING         NOT NULL NUMBER(11,5)
    MEAS_CORRECT_READING          NUMBER(11,5)
    MEAS_HUMID_TEMP               NUMBER(4,1)
    MEAS_DRY_TEMP                 NUMBER(4,1)
    MEAS_PRESSURE                 NUMBER(4)
    MEAS_HUMIDITY                 NUMBER(2)
    MEAS_CONSTANT                 NUMBER(8,5)
    MEAS_ROLE                     VARCHAR2(1)
    MEAS_INSERT_DATE              DATE
    MEAS_LAST_UPDATE              DATE
    MEAS_INSERT_BY                VARCHAR2(50)
    MEAS_UPDATE_BY                VARCHAR2(50)
    MEAS_TILT_MODE                VARCHAR2(4000) - Explain plan (I'm not familiar with explain plans...) :
    | Id  | Operation                     | Name                   | Rows  | Bytes | Cost (%CPU)| Time     |
    PLAN_TABLE_OUTPUT
    |   0 | SELECT STATEMENT              |                        |     1 |    19 |   256  (10)| 00:00:02 |
    |   1 |  SORT AGGREGATE               |                        |     1 |    19 |            |          |
    |   2 |   NESTED LOOPS                |                        |    75 |  1425 |   256  (10)| 00:00:02 |
    |*  3 |    TABLE ACCESS FULL          | OPERATION_MEASUREMENTS |    75 |   600 |    90  (27)| 00:00:01 |
    |   4 |    TABLE ACCESS BY INDEX ROWID| GEODETIC_MEASUREMENTS  |     1 |    11 |     3   (0)| 00:00:01 |
    |*  5 |     INDEX UNIQUE SCAN         | MEAS_PK_2              |     1 |       |     2  (50)| 00:00:01 |
    --------------------------------------------------------------------------------------------------------How can I optimize this query ?
    Thanks.
    Yann.

    Looks like you are missing an FK-index on the middle table, for the FK going to OPERATIONS.
    Currently this:
    WHERE ogm_op_id = 0;Is computed via a full table scan followed by a filter operation. Assuming OP_ID is rather selective, an index on OGM_OP_ID could do the trick here.

  • Query the Manage Sessions Table in OBIEE

    Hi All,
    First I should ask, is it possible to get the information you see on Administration -> Manage Sessions, using a query to the database ?
    If not, I would appreciate Ideas to get the best time to reboot OPMCTL on a system that is working almost 24Hrs, is never a constant when users are not working on the system. The idea is to not reboot OPMCTL when there are active sessions.
    Creative Ideas welcome
    Thanks.

    Hope you are on Oracle DB if yes, write a simple query on db tables (V$session and V$session_logops) based on the moudle filter 'nqserver' which gives all Active SESSIONS
    SELECT SID, Serial#, UserName, Status, SchemaName, Logon_Time
    FROM V$Session
    WHERE
    Status=‘ACTIVE’ AND MODULE LIKE '%nqserver%' AND
    UserName='BI_USER';
    For more information refer : Oracle Business Intelligence
    Thanks,
    Saichand

  • Help! no response when doing SIMPLE query!

    I meet a strange problem when I do a SIMPLE query on a table in Oracle 8.1.7, just like:
    SELECT id FROM person WHERE id='12345';
    Most of id values are ok to the query, except some values.
    Whether I use these values in sqlplus or JDBC, mostly, no response is returned!! And I find the session in Oracle always keeps the status 'Active'. But in few scenario I can get the result quickly.
    I don't know the reason. Help me please!
    Thanks a lot!
    Meyor

    I'm not sure if the 'id' column contains something else.
    When I shutdown and restart the database, the problem seems to be "solved". If the problem reoccurs again, I will try to use xTRIM functions.
    Thanks!
    Meyor

  • 11.2.2.4.0 - Problem with temporary space in simple query

    ttVersion
    TimesTen Release 11.2.2.4.0 (64 bit Linux/x86_64) (timesten:53396) 2012-09-24T08:28:05Z
    Instance admin: root
    Instance home directory: /opt/TimesTen/timesten
    World accessible
    Daemon home directory: /var/TimesTen/timesten
    I get "TT0802: Database temporary space exhausted" error in simple query with small data amount; Timesten try to allocate *40000312* bytes
    describe adm.peer
    Table ADM.PEER:
    Name Null Type
    PEER_ID NOT NULL TT_SMALLINT
    CLUSTER_ID NOT NULL TT_TINYINT
    DIALECT NOT NULL TT_INTEGER
    HOST NOT NULL TT_VARCHAR(256 BYTE)
    REALM NOT NULL TT_VARCHAR(256 BYTE)
    ADDRESS TT_VARCHAR(256 BYTE)
    PORT NOT NULL TT_INTEGER
    PROTOCOL NOT NULL TT_INTEGER
    AUTO_CONNECT NOT NULL TT_TINYINT
    ENABLED NOT NULL TT_TINYINT
    PRIORITY NOT NULL TT_TINYINT
    MANDATORY NOT NULL TT_TINYINT
    TSTAMP BINARY(8)
    1 rows selected
    describe adm.session
    Table ADM.SESSION:
    Name Null Type
    SESSION_ID NOT NULL TT_VARCHAR(64 BYTE) inline
    OBJ_ID NOT NULL TT_BIGINT
    PR_OBJ_ID NOT NULL TT_BIGINT
    SUBSCRIBER_ID NOT NULL TT_VARCHAR(32 BYTE) inline
    IP NOT NULL TT_VARCHAR(15 BYTE) inline
    IPV6_PREFIX TT_VARCHAR(39 BYTE) inline
    IPV6_PREFIX_LEN NOT NULL TT_TINYINT
    CREATE_TIME NOT NULL TT_TIMESTAMP
    UPDATE_TIME NOT NULL TT_TIMESTAMP
    RULES_SET_ID NOT NULL TT_BIGINT
    PEER_ID NOT NULL TT_SMALLINT
    MY_PEER_ID NOT NULL TT_SMALLINT
    PROFILE_HASHC NOT NULL TT_BIGINT
    FLAGS NOT NULL TT_INTEGER
    QOS_POLICY_NAME NOT NULL TT_VARCHAR(32 BYTE) inline
    BSID NOT NULL TT_BIGINT
    CONGESTION_FLAG NOT NULL TT_TINYINT
    SERVICE_CATEGORY_ID TT_VARCHAR(32 BYTE) inline
    EVENT_CAUSE NOT NULL TT_TINYINT
    EVENT_TIME TT_TIMESTAMP
    TSTAMP BINARY(8)
    1 rows selected
    select * from adm.peer;
    PEER_ID CLUSTER_ID DIALECT HOST REALM ADDRESS PORT PROTOCOL AUTO_CONNECT ENABLED PRIORITY MANDATORY TSTAMP
    21 2 0 ddf1.server.com diameter.realm ddf1.server.com 3868 6 1 1 0 1 (null)
    22 2 0 ddf2.server.com diameter.realm ddf2.server.com 3868 6 1 1 1 1 (null)
    101 233 0 peer_101 testik.com peer_101.testik.com 3886 0 0 1 101 0 (null)
    102 233 0 peer_102 testik.com peer_102.testik.com 3886 0 0 1 102 0 (null)
    1 1 0 vr-t500.testik.com diameter.realm vr-t500.testik.com 3868 6 1 1 0 1 (null)
    5 rows selected
    select * from adm.session;
    SESSION_ID OBJ_ID PR_OBJ_ID SUBSCRIBER_ID IP IPV6_PREFIX IPV6_PREFIX_LEN CREATE_TIME UPDATE_TIME RULES_SET_ID PEER_ID MY_PEER_ID PROFILE_HASHC FLAGS QOS_POLICY_NAME BSID CONGESTION_FLAG SERVICE_CATEGORY_ID EVENT_CAUSE EVENT_TIME TSTAMP
    TEST_SESSION 13300000000020027 0 TEST_SUBSCRIBER 94.25.209.27 0 2012-10-18 12:56:07.155381000 2012-10-18 12:56:07.155381000 1 101 1 0 0 0 0 DEFAULT 0 (null) (null)
    TEST_SESSION2 13300000000020028 13300000000020027 TEST_SUBSCRIBER 94.25.209.27 0 2012-10-18 12:56:07.155687000 2012-10-18 12:56:07.155687000 1 102 1 0 4 0 0 DEFAULT 0 (null) (null)
    2 rows selected
    SELECT p.address, count(*) as session_count from session s, peer p where p.peer_id = s.peer_id group by p.address failed,
    TT0802: Database temporary space exhausted
    dssize
    PERM_ALLOCATED_SIZE:     307200.0
    PERM_IN_USE_SIZE:     61763.0
    PERM_IN_USE_HIGH_WATER:     69393.0
    TEMP_ALLOCATED_SIZE:     37888.0
    TEMP_IN_USE_SIZE:     13494.0
    TEMP_IN_USE_HIGH_WATER:     21307.0
    This is additional error info when this code exuted inside C code:
    [TimesTen][TimesTen 11.2.2.4.0 ODBC Driver][TimesTen]TT0802: Database temporary space exhausted -- file "blk.c", lineno 3477, procedure "sbBlkAlloc"
    ODBC Error/Warning = S1000, Additional Error/Warning = 802
    [TimesTen][TimesTen 11.2.2.4.0 ODBC Driver][TimesTen]TT6221: Temporary data partition free space insufficient to allocate *40000312* bytes of memory -- file "blk.c", lineno 3477, procedure "sbBlkAlloc"
    ODBC Error/Warning = S1000, Additional Error/Warning = 6221
    Edited by: Vladimir Romanov on 18.10.2012 13:13
    Edited by: Vladimir Romanov on 18.10.2012 13:51

    This may well be
    Bug 14634954 - SELECT WITH GROUP BY REQUESTS LARGE TEMP MEMORY GETS TT0802 / TT6221
    The bug is fixed in 11.2.2.4.1 which is hopefully due before the end of October. Can you run your test on 11.2.1 as well? The problem should not reproduce there as it is specific to 11.2.2

  • Regarding Oracle Sessions

    Oracle Database      : 10g EE Release 10.2.0.1.0
    Webserver           : Weblogic
    Application Language      : Java
    Problem : When i connect to Java application it creates following sessions
    in Oracle server
    SADDR           SID    SERIAL# USERNA MACHINE           PROGRAM
    687CAE3C          9      36980 MYUSER WEBSERVER ADDRESS java.exe
    687D4EAC         26      26646 MYUSER WEBSERVER ADDRESS java.exe
    687ED19C         67      15721 MYUSER WEBSERVER ADDRESS java.exe
    68058310        179      14442 MYUSER WEBSERVER ADDRESS java.exeafterwards when i logout from my java application then it doesn't delete
    the session. these all remain in the v$session.
    And when i am tring to kill the session by following commands.
    SQL> alter system kill session '9, 36980';
    System altered.
    SQL> alter system kill session '26, 26646';
    System altered.
    SQL> alter system kill session '67, 15721';
    System altered.
    SQL> alter system kill session '179, 14442';
    System altered.But when i again query the v$session view it shows me all the session but the
    status is killed..
    But i cann't drop that user by runing following query
    SQL> drop user myuser cascade;
    drop user myuser cascade
    ERROR at line 1:
    ORA-01940: cannot drop a user that is currently connected.
    Is any thing wrong in my process ?
    Any suggestions
    Regards
    Singh

    The vast majority of the time, when you're using a J2EE app server like Weblogic, the application server is going to maintain a connection pool. When the application server starts up, it creates a number of physical database connections. When your Java code opens and closes a connection, it's really just getting a connection from the pool and returning it to the pool. From Oracle's standpoint, nothing happens when you logically open a connection in this way, which is generally good because opening and closing physical connections is relatively expensive.
    So in summary
    - The number of sessions in V$SESSION probably has everything to do with the size of the connection pool you've configured in Weblogic and nothing to do with how many logical connections your application is using at any point in time.
    - Do not kill sessions that are part of a connection pool. Oracle will keep the connection around until the client (in this case Weblogic) tries to re-use it, at which point Oracle will inform the client that the connection has been killed, and Weblogic will report the error to whatever application was requesting the connection.
    - If you shut down Weblogic, the physical connections should go away.
    Justin

Maybe you are looking for

  • ITunes Store not working on Windows 8.1

    I upgraded my laptop to Windows 8.1 from Windows 8. iTunes works fine as in the music plays etc. But when I click on 'iTunes Store', it doesn't load and says that iTunes has stopped working. Can someone please find a solution to this problem ASAP. Th

  • Written Down Value Or Net Book Value

    Dear Friends: The Written Down Value Or Net Book Value given by the client is different in the year 2006 and also different in 2005.Both the years have different amounts. Also Depreciation as on current date is different and Accumlated depreciation i

  • Error - this was a duplicate entry!

    Error - this was a duplicate entry!

  • R&R 4.10 no Password dialog box displayed when recovering a Backup

    Hello all, I am using a T61 8898-6dg with XP and r&r 4.10.314 After reinstalling the system from a XP CD I tried to reinstall an R&R backup from a network share. R&r starts well showed me the backup files and all the files included in the backup. So

  • N95 CANNOT UPDATE TO VERSION 30 ERROR WHEN USING N...

    Firstly i have bought a N95 with version 10 on and my product code is 0535053 which says i can update to 30.0.015 It was on 02 but seems unlocked as i have used it abroad with different sims I am currently in Thailand although it a u.k phone and have