Oracle bug 7046751

After experiencing a Spatial query problem with my companies software due to Oracle bug 7046751, I was instructed by Oracle to run the SQL below to recreate ALL_SDO_GEOM_METADATA as a workaround. This worked fine and I could then use our software with Spatial to query, post, etc. However now I need to revert back to how the view would be in a typical 10.2.0.4 install, in order to test what our users will see. Could anyone advise me on a similar SQL statement I could use to recreate ALL_SDO_GEOM_METADA as it was before I recreated it?
Thanks
-mcslain
create or replace view MDSYS.ALL_SDO_GEOM_METADATA as
SELECT SDO_OWNER OWNER,
SDO_TABLE_NAME TABLE_NAME,
SDO_COLUMN_NAME COLUMN_NAME,
SDO_DIMINFO DIMINFO,
SDO_SRID SRID
FROM mdsys.SDO_GEOM_METADATA_TABLE
WHERE
+(exists+
+(select table_name from all_tables+
where table_name=sdo_table_name
and owner = sdo_owner
union all
select table_name from all_object_tables
where table_name=sdo_table_name
and owner = sdo_owner
union all
select SYNONYM_NAME from all_synonyms
where SYNONYM_NAME=sdo_table_name
and owner = sdo_owner
union all
select view_name table_name from all_views
where view_name=sdo_table_name
and owner = sdo_owner));

Here is the SQL I get from my database when I inspect the ALL_SDO_GEOM_METADATA view....
CREATE OR REPLACE VIEW ALL_SDO_GEOM_METADATA ( OWNER,
TABLE_NAME, COLUMN_NAME, DIMINFO, SRID
) AS SELECT SDO_OWNER OWNER,
SDO_TABLE_NAME TABLE_NAME,
SDO_COLUMN_NAME COLUMN_NAME,
SDO_DIMINFO DIMINFO,
SDO_SRID SRID
FROM mdsys.SDO_GEOM_METADATA_TABLE,
all_tables a
where a.table_name = sdo_table_name
and a.owner = sdo_owner
union all
SELECT SDO_OWNER OWNER,
SDO_TABLE_NAME TABLE_NAME,
SDO_COLUMN_NAME COLUMN_NAME,
SDO_DIMINFO DIMINFO,
SDO_SRID SRID
FROM mdsys.SDO_GEOM_METADATA_TABLE,
all_object_tables a
where a.table_name = sdo_table_name
and a.owner = sdo_owner
union all
SELECT /*+ use_hash (a) */
SDO_OWNER OWNER,
SDO_TABLE_NAME TABLE_NAME,
SDO_COLUMN_NAME COLUMN_NAME,
SDO_DIMINFO DIMINFO,
SDO_SRID SRID
FROM mdsys.SDO_GEOM_METADATA_TABLE b,
all_synonyms a
where a.synonym_name = sdo_table_name
and a.owner = sdo_owner
union all
SELECT SDO_OWNER OWNER,
SDO_TABLE_NAME TABLE_NAME,
SDO_COLUMN_NAME COLUMN_NAME,
SDO_DIMINFO DIMINFO,
SDO_SRID SRID
FROM mdsys.SDO_GEOM_METADATA_TABLE,
all_views a
where a.view_name = sdo_table_name
and a.owner = sdo_owner
/

Similar Messages

  • ORA-22805 - (inserting an XMl type FAILS) I suspect this is a oracle Bug

    We're using
    Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.7.0 - Production
    Basically when I try to execute the following
    dbms_xmlschema.registerschema
    ('MySchema.xsd',
    sys.UriFactory.getUri('/Location/MySchema.xsd'),
    genTables=>TRUE);
    this generates a table for us with the name "xmlt_ds_0"
    when we try to insert into this table, we get an error
    INSERT INTO tddb.xmlt_ds_0
    SELECT sys.xmltype.createschemabasedxml(mq.content, 'http://My.Schema.xsd')
    FROM message_queue mq
    WHERE mq.sys_id = 148100
    ORA-22805: cannot insert NULL object into object tables or nested tables
    Now this works for most xml files, it just one or two that fail, however these files that have failed are well formed, and valid (ie: conform to the scehema)
    however, if I try to do this
    create table tempTest of xmltype
    XMLSCHEMA "Myschema.xsd"
    ELEMENT "schedule"
    then insert into this
    INSERT INTO tempTest
    SELECT sys.xmltype.createschemabasedxml(mq.content, 'http://My.Schema.xsd')
    FROM message_queue mq
    WHERE mq.sys_id = 148100
    Basically, this works for the same file, I just dont understand why it wouldn't work in the "resitering the schema" way. I strongly suspect this is a Oracle Bug
    Has any one encountered this before, any help would be appriciated.

    FIRST of all...
    If you create the table via registerschema, then you table will be created case-sensitive (in general take notice that with XMLDB everything can be / will be case-sensitive). So this means you will have to do things the following way (mark the double quotes):
    NSERT INTO tddb."xmlt_ds_0"
    SELECT sys.xmltype.createschemabasedxml(mq.content, 'http://My.Schema.xsd')
    FROM message_queue mq
    WHERE mq.sys_id = 148100Your statement (see below) will generate a table the default way, that is a table in uppercase
    create table tempTest of xmltype
    XMLSCHEMA "Myschema.xsd"
    ELEMENT "schedule"so ...this will create a table with the name "TEMPTEST".
    regarding the ORA-22805...
    - can you post the schema
    - can you post the values that cause the error...

  • Problem while Creating MVLOG with synonym in Oracle 9i:Is it an Oracle Bug?

    Hi All,
    I am facing a problem while Creating MVLOG with synonym in Oracle 9i but for 10G it is working fine. Is it an Oracle Bug? or i am missing something.
    SQL> select * 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>
    SQL> create table t ( name varchar2(20), id varchar2(1) primary key);
    Table created.
    SQL> create materialized view log on t;
    Materialized view log created.
    SQL> create public synonym syn_t for t;
    Synonym created.
    SQL> CREATE MATERIALIZED VIEW MV_t
      2  REFRESH ON DEMAND
      3  WITH PRIMARY KEY
      4  AS
      5  SELECT name,id
      6  FROM syn_t;
    Materialized view created.
    SQL> CREATE MATERIALIZED VIEW LOG ON  MV_t
      2  WITH PRIMARY KEY
      3   (name)
      4    INCLUDING NEW VALUES;
    Materialized view log created.
    SQL> select * from v$version;
    BANNER
    Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production
    PL/SQL Release 9.2.0.6.0 - Production
    CORE    9.2.0.6.0       Production
    TNS for Solaris: Version 9.2.0.6.0 - Production
    NLSRTL Version 9.2.0.6.0 - Production
    SQL>
    SQL> create table t ( name varchar2(20), id varchar2(1) primary key);
    Table created.
    SQL> create materialized view log on t;
    Materialized view log created.
    SQL> create public synonym syn_t for t;
    Synonym created.
    SQL> CREATE MATERIALIZED VIEW MV_t
    REFRESH ON DEMAND
    WITH PRIMARY KEY
    AS
      2    3    4    5  SELECT name,id
    FROM syn_t;   6
    Materialized view created.
    SQL> CREATE MATERIALIZED VIEW LOG ON  MV_t
    WITH PRIMARY KEY
    (name)
      INCLUDING NEW VALUES;  2    3    4
    CREATE MATERIALIZED VIEW LOG ON  MV_t
    ERROR at line 1:
    ORA-12014: table 'MV_T' does not contain a primary key constraintRegards
    Message was edited by:
    Avinash Tripathi
    null

    Hi Nicloei,
    Thanks for the reply. Actually i don't want any work around (Creating MVLOG on table rather than synonym is fine with me) . I just wanted to know it is actually an oracle bug or something else.
    Regards
    Avinash

  • Oracle BUG... Snapshots in 8.1.7

    I accidently issued a RENAME on a number of snapshots in my DB. It created a TABLE for each of these objects and I can not drop these objects without getting told "ORA-12083 must use DROP MATERIALIZED VIEW to drop "OWNER.TABLE"".
    If I try to use drop MAT VIEW I recieve messaage telling me that object is not a snapshot.
    Think this is a potential Oracle Bug. How can I drop these tables?
    Thanks,
    Miller

    This is the Oracle Database Lite forum. Can you please repost your question on the general database forum: General Database Discussions

  • SOA Suite 11g Clustering error/oracle bug ?

    Hi, i got several experiment to implement soa suite 11g clustering, in my company.. at this moment we still use development mode in our application server. now i'm trying to get into production and also i want cluster the server.. here is the chronology what i do.
    i got 3 server :
    my plan is
    server #1 become an proxy server, let say the name is soa_proxy
    server #2 become an cluster node, let say the name is soa_server1
    server #3 become an cluster node, let say the name is soa_server2
    so i start install & configure it (applications is running under Windows Server 2003)
    1.*soa_proxy*
    - Installing WebLogic server
    - Installing SOA
    - Create Repository with RCU (oracle 10g database)
    2.*soa_server1*
    - Installing WebLogic server
    - Installing SOA
    3.*soa_server2*
    - Installing WebLogic server
    - Installing SOA
    after installation finished, then i create domain in soa_proxy server let say it name 'MyDomain', then i assign the soa_server1 and soa_server2 in cluster node named 'MyCluster', also i assign the soa_proxy server as a HTTP Proxy Server.. i'm following the instructions just like this link Link: [http://download.oracle.com/docs/cd/E12839_01/doc.1111/e13925/config_screens.htm#CJAEABGD]
    all the installation seems good, but when i try to deploy my composite application into the proxy server 'soa_proxy' with JDev, i got error like this
    Image: !http://img9.imageshack.us/img9/2122/error2z.jpg!
    and when i go to Http://hostname:7001/em
    i just see my composite deployed only in 'soa_server2'.
    UPDATE : well, now the error was gone when deploying. but we still got little odd result,
    when i deploy with jdev, it still fine, until i go to the enterprise manager. yess still.. my composite only deplyed in 'soa_server1'. i got some reference that we can copy the domain directory in soa_proxy and then paste into the server that not yet been deployed before. its seems oke..
    i've been thinking, how if i got 10 node of cluster? 50 node of cluster ? should i copy the directory just like that ?? is there another charmed way to do it???
    can somebody help me with this simple case?
    regards
    Wildan
    Edited by: wildsoft on Feb 12, 2010 11:33 AM
    =======
    here is my last trial to deploy the cluster environment, then i just got the same issues, our team here think thats the issues causing by oracle bug in code behind. for reminder what i do last experiment
    1. we deploy/configure the domain (admin console,cluster node) then starting up all the services smoothly without no issues & as we saw in the console monitor we can see the cluster is syncronizing.
    2. then we create simple composite.
    3. we try to deploy the composite to the cluster domain, and what we got is the composite only deployed in one cluster node.
    let me describe to clear it,
    * first trial, when we deploy the composite, here is what we got in em console
    *[-] SoaInfra (SoaServer1)*
    [+] CompositeLabTest
    *[-] SoaInfra (SoaServer2)*
    in JDev we also saw this message (the project CompositeLabTest Deploy Process is skipped), some kind like that
    * second time trial, we try to shut the SoaServer2 down, then restart it, what we got in em console
    *[-] SoaInfra (SoaServer1)*
    [+] CompositeLabTest
    *[-] SoaInfra (SoaServer2)*
    [+] CompositeLabTest
    . so until today my soa suite 11g clustering experience is never going good practice.. any of you may had experience with clustering too, how that can be done? please respon...
    thanks
    regards
    Wildan Abdat
    Edited by: wildsoft on Apr 27, 2010 4:08 PM
    Edited by: wildsoft on Apr 27, 2010 4:13 PM

    Hi there.
    Me too I have a similar problem with cluster deployment.
    I have two different domains in two different phisical machine on the same LAN.
    These domains are equals and the sole difference is regarding the IP configuration:
    domain 1
    machine 172.0.0.1
    soaadmin 172.0.0.1
    soa1 172.0.0.2
    soa1 172.0.0.3
    domain 2
    machine 172.0.1.1
    soaadmin 172.0.1.1
    soa1 172.0.1.2
    soa1 172.0.1.3
    When I try to deploy a new composite from the EM this fails (it remains in waiting for a response like the followed)
    <Jun 18, 2010 10:42:00 AM CEST> <Warning> <org.apache.myfaces.trinidadinternal.context.RequestContextImpl> <BEA-000000> <Could not find partial trigger idArchiveFileBrowserDialog from RichInputText[UIXEditableFacesBeanImpl, id=idArchiveLoc]>
    Processing sar=/tmp/dir2448127768139530528tmp/sca_SOAComposite1_rev1.0.jar
    Adding sar file - /tmp/dir2448127768139530528tmp/sca_SOAComposite1_rev1.0.jar
    Creating HTTP connection to host:172.0.0.2, port:10002
    What I checked:
    In multicast configuration soa1 (domain1) sent the request to all soa servers in the LAN (even in that one that aren't configurated in his domain)
    In unicast configuration soa1 (domain1) sent the request only to the soa2 (domain1) server but it remain in waiting for a response for all the time.
    What it is strange is that if I stop the domain2 the request can be performed and my composite is deployed in both the servers.
    Any idea about this strange behaviour?
    N.B.
    I'm not using Coherence.

  • XML to CSV routine using XSLT.  Oracle bugs?

    I'm trying to write some XSLT so that I can apply it to any given XML using  XMLTransform to generate a flattened CSV structure.  My input can be any XML document, with any number of nested levels so the structure isn't known to the XSLT.  I'm fairly new to XSLT but am having problem with Oracle's version of it.  I've tested on both 10gR2 and 11gR2.
    CSV Rules :
    Adjacent fields must be separated by a comma
    Embedded commas in fields are escaped e.g. 15, Maple Street => "15, Maple Street"
    Embedded quotes in fields are escaped.  e.g. O'Brien => "O'Brien" or John "Jonner" McNabb => "John ""Jonner"" McNabb"
    Embedded CR / LF or CRLF in fields are escaped with quotes.
    Records are separated with CRLF pairs
    Flattening Rules :
    The text of leaf elements (elements without children) are output even if they are empty
    Any element with text is output
    A new line occurs whenever the nesting level changes. i.e. If an element has children.
    When I run the following XML and my XSLT through Oracle I get results inconsistent with results I get when I run the XML and XSLT through online XSLT utils (including W3C's test pages).
    with qryXML as (
      select xmltype(q'[
      <email>
        <to>Steve O'Brien</to>
        <cc/>
        <from>Jane "The Smiler" Griff</from>
        <heading>Reminder</heading>
        <body>Hey, don't forget me this weekend!  I've enclosed some pics from last weekend
      Love Jane
      </body>
        <attachments>
          <attachment>
            <filename>Dance.jpg</filename>
            <encoding>MIME</encoding>
          </attachment>
          <attachment>
            <filename>Signature.txt</filename>
            <encoding/>
          </attachment>
        </attachments>
      </email>
      ]') as XMLDATA from dual)
    select
       XMLTransform(q.XMLDATA,
          xmltype(q'[
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
        <xsl:output method="text"/>
        <xsl:strip-space elements="*"/>
        <xsl:template match="*[text() or not(*)]">
            <xsl:if test="position() &gt; 1">
                <xsl:text>,</xsl:text>
            </xsl:if>
        <xsl:call-template name="display_csv_field">
          <xsl:with-param name="field" select="."/>
        </xsl:call-template>
            <xsl:if test="not(following-sibling::*[text() or not(*)])">
                <xsl:text>
    </xsl:text>         
            </xsl:if>
        </xsl:template>
      <xsl:template name="display_csv_field">
        <xsl:param name="field"/>
        <xsl:variable name="CRLF">
          <xsl:text>&#13;&#10;</xsl:text>
        </xsl:variable>
        <xsl:variable name="CR">
          <xsl:text>&#13;</xsl:text>
        </xsl:variable>
        <xsl:variable name="LF">
          <xsl:text>&#10;</xsl:text>
        </xsl:variable>
        <xsl:variable name="apos">'</xsl:variable>   
        <xsl:choose>
          <xsl:when test="contains( $field, '&quot;' )">
            <!-- Field contains a quote. So escape  -->
            <xsl:text>"</xsl:text>
            <xsl:call-template name="escape_quotes">
              <xsl:with-param name="string" select="$field" />
            </xsl:call-template>
            <xsl:text>"</xsl:text>
          </xsl:when>
          <xsl:when test="contains( $field, ',' ) or
                          contains( $field, $apos ) or
                          contains( $field, $CRLF ) or
                          contains( $field, $CR ) or
                          contains( $field, $LF )" >
            <!-- Field contains a comma, apostrophe and/or a linefeed, so quote -->
            <xsl:text>"</xsl:text>
            <xsl:value-of select="$field" />
            <xsl:text>"</xsl:text>
          </xsl:when>
          <xsl:otherwise>
            <!-- No need to enclose this field in quotes. -->
            <xsl:value-of select="$field" />
          </xsl:otherwise>
        </xsl:choose>
      </xsl:template>
      <xsl:template name="escape_quotes">
        <xsl:param name="string" />
        <xsl:value-of select="substring-before( $string, '&quot;' )" />
        <xsl:text>""</xsl:text>
        <xsl:variable name="substring_after_first_quote"
                      select="substring-after( $string, '&quot;' )" />
        <xsl:choose>
          <xsl:when test="not( contains( $substring_after_first_quote, '&quot;' ) )">
            <xsl:value-of select="$substring_after_first_quote" />
          </xsl:when>
          <xsl:otherwise>
            <!-- The substring after the first quote contains a quote.
                 So, we call ourself recursively to escape the quotes
                 in the substring after the first quote. -->
            <xsl:call-template name="escape_quotes">
              <xsl:with-param name="string" select="$substring_after_first_quote" />
            </xsl:call-template>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:template> 
    </xsl:stylesheet>
    )) from qryXML q  
    Output from Oracle (which appears incorrect)
    &quot;Steve O&apos;Brien&quot;&quot;Jane &quot;&quot;The Smiler&quot;&quot; Griff&quot;Reminder&quot;Hey, don&apos;t forget me this weekend!  I&apos;ve enclosed some pics from last weekend
      Love Jane
      &quot;
    Dance.jpgMIME
    Signature.txt
    Output from most other XSLT test environments (which appears correct):
    "Steve O'Brien",,"Jane ""The Smiler"" Griff",Reminder,"Hey, don't forget me this weekend!  I've enclosed some pics from last weekend
    Love Jane
    Dance.jpg,MIME
    Signature.txt,
    Oracle's XSLT handling appears incorrect in several ways:
    1. There is no comma delimiter separating fields and on investigation, position() is always returning 1, which is incorrect.  From XSLT reference "The position function returns a number equal to the context position from the expression evaluation context." ...."the position, or index number, of the node, relative to all the selected nodes in the node list."  Therefore any node in a node list should be indexable with position.   I am selecting a node list *[text() or not(*)] => Any nodes with text or with no children, yet position of each node in this list is always 1.
    2. My XSLT says the output is text, yet Oracle is still using HTML character escaping which is not text!  &quot; instead of " and &apos; instead of '.  I could search and replace, but I shouldn't have to.
    Can anyone explain why Oracle's XSLT differs from other XSLT processors and offer suggestions to solve these issues.  Are these bugs?

    Here's an example tested on 11.2.0.2 :
    SQL> set scan off
    SQL> set long 5000
    SQL> set lines 200
    SQL> var doc clob
    SQL> begin
      2   :doc := '<email>
      3      <to>Steve O''Brien</to>
      4      <cc/>
      5      <from>Jane "The Smiler" Griff</from>
      6      <heading>Reminder</heading>
      7      <body>Hey, don''t forget me this weekend!  I''ve enclosed some pics from last weekend
      8    Love Jane
      9    </body>
    10      <attachments>
    11        <attachment>
    12          <filename>Dance.jpg</filename>
    13          <encoding>MIME</encoding>
    14        </attachment>
    15        <attachment>
    16          <filename>Signature.txt</filename>
    17          <encoding/>
    18        </attachment>
    19      </attachments>
    20    </email>';
    21  end;
    22  /
    PL/SQL procedure successfully completed.
    SQL> select xmlcast(
      2           xmlquery(
      3           'declare function local:formatField ($e as element()) as xs:string
      4            {
      5              let $t := ora:replace($e, "&quot;", "&quot;&quot;")
      6              return if (    contains($t, "&quot;")
      7                          or contains($t, ",")
      8                          or contains($t, "&apos;")
      9                          or contains($t, "&#13;")
    10                          or contains($t, "&#10;") )
    11                     then concat("&quot;", $t, "&quot;")
    12                     else $e
    13            }; (::)
    14            string-join(
    15              for $i in //*[*[text() or not(node())]]
    16              return
    17                string-join(
    18                  for $j in $i/*[text() or not(node())]
    19                  return local:formatField($j)
    20                , ","
    21                )
    22            , "&#13;&#10;"
    23            )'
    24             passing xmltype(:doc)
    25             returning content
    26           )
    27           as clob
    28         ) as result
    29  from dual ;
    RESULT
    "Steve O'Brien",,"Jane ""The Smiler"" Griff",Reminder,"Hey, don't forget me this
    weekend!  I've enclosed some pics from last weekend
      Love Jane
    Dance.jpg,MIME
    Signature.txt,
    We could also use a single ora:matches function in place of the OR'ed contains but it doesn't appear to work on 11.2.0.3, got an internal error :
    ORA-00600: code d'erreur interne, arguments : [qmxqrs_xvm_popLastFuncArgAsStr:1], [], [], [], [], [], [], [], [], [], [], []

  • Oracle BUG (CASE + remote tables + inline view)

    Oracle 9.2.0.8
    BUG: Oracle inserts NULL when we use CASE statement in the SELECT query and we join a remote table with inline view.
    Script:
    CREATE TABLE t1 (a number(19,4)OK.
    SELECT (case when b = 1 then c else d end)
    FROM t2@Remote LEFT JOIN
    (SELECT a FROM t3@Remote) q ON (t2.a = q.a)123
    456
    789
    3 rows selected.
    INSERT INTO TABLE t1 (a)
    SELECT (case when b = 1 then c else d end)
    FROM t2@Remote LEFT JOIN
    (SELECT a FROM t3@Remote) q ON (t2.a = q.a)3 rows inserted.
    SELECT * FROM t1<null>
    <null>
    <null>
    3 rows selected
    Oracle inserts the correct values if I:
    * replace the CASE with DECODE
    * join with table not with an inline view
    * join local tables
    Someone with registration in the Metalink can post the bug.
    Best regards, Beroetz

    Oracle 9.2.0.8
    BUG: Oracle inserts NULL when we use CASE statement in the SELECT query and we join a remote table with inline view.
    Script:
    CREATE TABLE t1 (a number(19,4)OK.
    SELECT (case when b = 1 then c else d end)
    FROM t2@Remote LEFT JOIN
    (SELECT a FROM t3@Remote) q ON (t2.a = q.a)123
    456
    789
    3 rows selected.
    INSERT INTO TABLE t1 (a)
    SELECT (case when b = 1 then c else d end)
    FROM t2@Remote LEFT JOIN
    (SELECT a FROM t3@Remote) q ON (t2.a = q.a)3 rows inserted.
    SELECT * FROM t1<null>
    <null>
    <null>
    3 rows selected
    Oracle inserts the correct values if I:
    * replace the CASE with DECODE
    * join with table not with an inline view
    * join local tables
    Someone with registration in the Metalink can post the bug.
    Best regards, Beroetz

  • Unable to Execute QUery ORA -00911 Probably Oracle Bug Please confirm

    HI Gurus,
    Unable to run the query:
    Was able to run select query fine, was able to run insert query fine...but when combining and running, its throwng the follwoing error:
    Is this a bug in ORacle?
    Error starting at line 1 in command:
    INSERT INTO MigrationCorrespData1(did) SELECT did from revisions where (dInDate >={ts '2011-09-01 00:00:01'} and dInDate <={ts '2012-01-01 23:59:59'})
    Error at Command Line:1 Column:80
    Error report:
    SQL Error: ORA-00911: invalid character

    It's not a bug, your syntax just isn't Oracle syntax.
    I googled a bit (which you could have done yourself as easily) and it appears that your syntax is JDBC syntax. The Oracle equivalent is timestamp:
    select timestamp'2009-12-08 00:00:00.000' my_ts from dual;
    MY_TS                         
    08-DEC-09 12.00.00.000000000 AMEdited by: InoL on Jun 6, 2012 8:57 AM

  • Oracle bugs?

    I use Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod in windows2003, and I made a script:
    DROP table test_constraint;
    create table test_constraint
    col1          NUMBER(1)
              CONSTRAINT cn_tc_col1 NOT NULL
              CONSTRAINT cc_tc_col1 CHECK (col1 IN (1,2,8)),
    col2          DATE
    CONSTRAINT cn_tc_col2 NOT NULL,
    col3          char(1)
    CONSTRAINT cc_tc_col3 CHECK (col3 IN ('S','D'))
    ALTER TABLE test_constraint
    ADD CONSTRAINT tc_tc_col1_col3 CHECK
    ((col1 = 8 AND col3 IS NOT NULL AND col3 = 'D') OR
    (col1 = 1 AND col3 IS NOT NULL AND col3 = 'S') OR
    (col1 NOT IN (1,8) AND col3 IS NULL ));
    insert into test_constraint values (1,sysdate,'S');
    insert into test_constraint values (8,sysdate,'D');
    insert into test_constraint values (2,sysdate,NULL);
    select * from test_constraint;
    commit;
    create or replace
    TRIGGER tr_test_constraint_br
    BEFORE UPDATE ON test_constraint
    FOR EACH ROW
    BEGIN
    IF :new.col1 = 8 THEN
    :new.col3 := 'D';
    END IF;
    END;
    set serveroutput on;
    DECLARE
    LVCol2     test_constraint.col2%TYPE;
    LVCol3     test_constraint.col3%TYPE;
    BEGIN
    UPDATE test_constraint
    SET col1 = 8,
    col2 = sysdate
    WHERE col1 = 1
    RETURNING col2, col3
    INTO LVCol2,LVCol3;
    dbms_output.put_line('col2 = ' || LVCol2);
    dbms_output.put_line('col3 = ' || LVCol3);
    END;
    it will generate check constraint violated error here. but if you:
    alter table test_constraint disable constraint tc_tc_col1_col3;     
    and execute that pl/sql block again, it works fine.
    Any one knows that it is a bug for Oracle Database 10g Enterprise Edition Release 10.2.0.1.0?

    on 10.2.0.3, it works, as per the documentation
    http://download.oracle.com/docs/cd/B14117_01/server.101/b10743/triggers.htm#i13362
    so, yes, its a bug. apply a patch. upgrade. whatever it takes.

  • Oracle bug? - Oracle opinion welcomed (copy of post in OC4J forum)

    Hi,
    We are trying to run two web modules (A and B) on OC4J 10g standalone (on Windows 2000/XP), but we are facing a big problem.
    After much investigation we really think it is a OC4J bug, but we are opened to any opinion or solution...
    The problem is that a servlet or jsp on the web module B sometimes seems processed by OC4J by a thread created for the other web module A. As a consequence, if in the servlet (in fact in the method of a class instanciated in the servlet...) of B, we perform :
    ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
    then we get the classloader of the web module A, and then we are not able to instantiate a class of B and get a "ClassNotFoundException".
    This problem does not always happens. It is random even if it seems to have much more chance to happen if we execute requests on both modules in a little delay.
    We tried running the two web module in a single EAR or in two separate EAR but it made no difference.
    A debug of OC4J (with Eclipse 2.1) consolidates our mind it is a OC4J problem. Here is the kind of pile of execution we get for a thread HTTPRequestHandler of OC4J :
    [top of pile]
    ServletRequestDispatcher.forwardInternal(ServletRequest, HttpServletResponse) line 317
    HttpRequestHandler.processRequest(ApplicationServerThread, EvermindHttpServlet, ...) line 790
    => in this method we have the attributes :
    - thread.contextClassLoader = the one of web module A
    - request.application.name = module_B_name and request.application.contextPatch = module_B_contextpath
    ApplicationServerThread(Thread).run() line: 536
    We already met classloader problems and resolved them putting some common librairies of A and B in the applib directory. But this can not be envisaged for our new problem. Moreover we want to keep a "parent first" classloading.
    Has someone already met similar problems ?
    Thanks for any help.

    Thanks for the answers.
    I use a OC4J 10g 9.0.4 version but an evaluation version so I have no support id for a TAR.
    Sorry if my problem is difficult to understand (maybe it's my english which is difficult to understand!), but it is really difficult to explain...
    In fact the OC4J output does not show the classloading problem.
    I use Struts in the two WAR modules, and, for those who know Struts, it appears that I sometimes get a nullPointerException because in a Struts action my ActionForm is null (which should never happened). To find why the ActionForm is null I debug my application with Eclipse and I found the ActionForm was instanciated with the following code (classname is the name of a class extending the ActionForm class):
    // Look up the class loader to be used
    ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
    if (classLoader == null) {
    classLoader = RequestUtils.class.getClassLoader();
    // Attempt to load the specified class
    return (classLoader.loadClass(className));
    It appears that classLoader.loadClass(className) throws a ClassNotFoundException, and Struts, instead of throwing the exception, returns a value null for the ActionForm.
    With the debug I watch which classloader was used and I was surprised to see it was the classloader of my other WAR module. Though the struts servlet is well called on the good web application, and all the struts class are in the web-inf/lib directory of each application.
    I'm not sure this will make my problem easier to understand. Thanks for all who will make the effort of understand.
    emmanuel

  • Oracle SQL - Bug

    Hi All,
    I am writing this so that someone someday can take this to Oracle Corp as this is a simple bug which ought to be rectified by Oracle.
    Eg: select * from emp a where a.empno in ( select empno from empl b)
    Here i am using an Isolation Level 1 by using a Sub-Query to only return rows that matches with empno in table Empl but Empl table used in Sub Query does not have a Column by name empno . This should have returned an Oracle error instead it is taking the Column alias of table emp in Main Query.
    Many of us here will think or presume that this is correct as when using Isolation levels but this is not happening that way . There is an Oracle Bug which ought to be rectified in their next release.

    Definitively not a bug, at least bad query writing.
    Use prefix should solve your problem, something like this :
    select * from emp a where a.empno in ( select[b] b.empno from empl b)Furthermore, I wouldn't understand why you want, in the subquery, get the empno from the emp table instead of empl.
    Here was some threads about that, please read one of them here below :
    Re: Bug in Oracle 9.2.0.1.0.
    Moreover, this is not because you said "many of us here" want a correction that Oracle will correct it, because that's not a bug !
    Nicolas.

  • Oracle and "Maximum open cursors exceeded"

    Hi,
    I am using Weblogic 7.0sp2 with Oracle 9.2.0. Since we are using manual JTA
    transactions and the 9.2 drivers are buggy in that respect, we are using the
    9.0.1 thin drivers delivered with weblogic.
    The problem I have is that after a while, we get the now classic "Maximum open
    cursors exceeded" error on connections from our connection pool (used through
    a
    TX datasource). I have of course checked all our JDBC code and it is fine. We
    do not leave any statement/connection open. In fact, I am certain that the
    problem is not caused by our applicative code.
    The reason I am so positive is that the numbers of open (cached) cursors is
    growing, even though there is no activity on our application (I mean no
    activity at all). The number of cursors is regurlarly increasing by one
    every 5 minutes until it reaches the maximum allowed for a session.
    I have listed the statements corresponding to the opened cursors (they
    do not belong to our code, as you might have guessed):
    SELECT sysdate, user from dual
    select longdbcs from javasnm$ where short = :1
    select longname from javasnm$ where short = :1
    As you can see, there are only three different statements. You can get
    the statements from the system view v$open_cursor for a given session
    but it will only give one row per different statement. If you want to know
    the # of opened cursors in your cursor, use v$sesstat with statistic# = 3
    (opened cursor current).
    I suspect something is wrong in the connection testing done by weblogic
    for the pool (I have activated test on reserved connections and test table
    name is "dual") that leaves a resultset/statement behind. What is weird
    though is that the refresh period is still 0 (not 5 minutes as you would
    expect from the cursor growth rate...).
    I would not say that it is an Oracle bug (as stated in some BEA FAQ I read)
    since our application JDBC code does not exhibit the same problem. The
    problem appeared with recent version of WebLogic for which the session
    cursor cache is enabled, I suppose for performance reasons - this
    is set by isssuing "ALTER SESSION SET SESSION_CACHED_CURSORS = ...".
    Talking about this, does anybody know to which value WebLogic sets this
    parameter when intializing the connection (this is neither
    documented/configurable)?
    Up to now, I have come up with possibly two workarounds, neither of which
    is satisfying:
    - resetting the pool from time to time
    - issuing "ALTER SESSION SET SESSION_CACHED_CURSORS = 0" when I get a
    connection from the pool. I have not tested this one personally (read
    in a newsgroup that someone else did successfully) but it is supposed
    to reset the cursor cache that is causing the trouble.
    Any help will be greatly appreciated,
    Regards,
    Thierry.

    Thierry Rouget wrote:
    Hi,
    I am using Weblogic 7.0sp2 with Oracle 9.2.0. Since we are using manual JTA
    transactions and the 9.2 drivers are buggy in that respect, we are using the
    9.0.1 thin drivers delivered with weblogic.
    The problem I have is that after a while, we get the now classic "Maximum open
    cursors exceeded" error on connections from our connection pool (used through
    a
    TX datasource). I have of course checked all our JDBC code and it is fine. We
    do not leave any statement/connection open. In fact, I am certain that the
    problem is not caused by our applicative code.
    The reason I am so positive is that the numbers of open (cached) cursors is
    growing, even though there is no activity on our application (I mean no
    activity at all). The number of cursors is regurlarly increasing by one
    every 5 minutes until it reaches the maximum allowed for a session.
    I have listed the statements corresponding to the opened cursors (they
    do not belong to our code, as you might have guessed):
    SELECT sysdate, user from dual
    select longdbcs from javasnm$ where short = :1
    select longname from javasnm$ where short = :1
    As you can see, there are only three different statements. You can get
    the statements from the system view v$open_cursor for a given session
    but it will only give one row per different statement. If you want to know
    the # of opened cursors in your cursor, use v$sesstat with statistic# = 3
    (opened cursor current).
    I suspect something is wrong in the connection testing done by weblogic
    for the pool (I have activated test on reserved connections and test table
    name is "dual") that leaves a resultset/statement behind. What is weird
    though is that the refresh period is still 0 (not 5 minutes as you would
    expect from the cursor growth rate...).
    I would not say that it is an Oracle bug (as stated in some BEA FAQ I read)
    since our application JDBC code does not exhibit the same problem. The
    problem appeared with recent version of WebLogic for which the session
    cursor cache is enabled, I suppose for performance reasons - this
    is set by isssuing "ALTER SESSION SET SESSION_CACHED_CURSORS = ...".
    Talking about this, does anybody know to which value WebLogic sets this
    parameter when intializing the connection (this is neither
    documented/configurable)?
    Up to now, I have come up with possibly two workarounds, neither of which
    is satisfying:
    - resetting the pool from time to time
    - issuing "ALTER SESSION SET SESSION_CACHED_CURSORS = 0" when I get a
    connection from the pool. I have not tested this one personally (read
    in a newsgroup that someone else did successfully) but it is supposed
    to reset the cursor cache that is causing the trouble.
    Any help will be greatly appreciated,
    Regards,
    Thierry.Hi. We don't make those queries either. I suspect they are internal to the
    oracle driver. One thing you can try is to set the size of the pool's
    statement cache to zero. Oracle will retain cursors for every statement we
    cache. The alternative is also to tell the DBMS to allow a given session
    more cursors.
    Joe

  • Oracle Enterprise Manager Console TNS-04404 / TNS-04414

    Oracle Enterprise Manager Console
    Version 10.1.0.2.0 Production
    Running on Windows XP Professional
    =================================================
    Failed to parse tnsnames.ora file
    oracle.net.config.ServiceAliasException: TNS-04404: no error
    caused by: oracle.net.config.ConfigException:TNS-04414: File error
    caused by: TNS-04612: Null RHS for "QCCP1.WORLD":
    0
    =================================================
    (NOTE): I understand that this issues is related to TNSNAMES.ORA file. I have another computer, and the OEM Console is working just fine on that computer. So, I copied the TNSNAMES.ORA file from the other computer, but still I am receiving the same issue.
    Please let me know if you can help me with this issue. Thanks in advance ...

    878649 wrote:
    This problem occur when i run version 10.2 of Console Enterprise Manager
    This a very funny error but took me a lot tries and errors to solve it !
    I'ts related to the syntax of an entry defining an SID in the tnsnames.ora. This an oracle bug for sure
    Here is an entry in my tnsnames.ora
    Then why does posted example below NOT contain any "SID" entry?
    mydb.world =
    *(DESCRIPTION =*
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = myoraclehost)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = mydb)
    At first look this entry is valid. At least SHOULD BE VALID an understood by oracle tnsnames interpreter
    After a couple of tries, i finally found that there should be at least one space between the begining of the line where figure out the description keyword (DESCRIPTION
    I've corrected the problem by inserting a space before this keyword.
    This happen

  • SAP SRM Prod with Oracle DB and AIX 5.3 Performance Issue.

    Hi Basis Gurus,
    Today my SAP PRD system all of a sudden was running slow and users had difficulties executing TCodes as it took minutes before the screen appeared.My system is SAP SRM 4.00, Oracle Release 11.2.0.1.0 and AIX 5.3.
    From Basis point of view , we noticed that all the work process were hanged due to RFCs' occupying it.Couldnt investigate further on the system as we needed to restart asap because users needed to log on. A quick check on SICK shows no errors.What we managed to find out is that we needed to check this parameter below and set it accordingly:-
    rdisp/rfc_min_wait_dia_wp:-
    Definition
    Number of work processes kept free for other users.
    Use
    This parameter is used to reserve a number of dialog work processes for dialog mode. It prevents parallel RFCs from occupying all the processes.
    The parameter rdisp/wp_no_dia specifies the absolute number of dialog work processes.                               
    Unit: number of dialog work processes
    Default value: 1
    Example
    If 10 dialog work processes are configured for the instance (rdisp/wp_no_dia = 10) and the parameter rdisp/rfc_min_wait_dia_wp  = 3 is set, parallel RFCs can occupy a maximun of 7 dialog work processes. Three dialog work processes always remain free for dialog mode.
    There are 20 DIA processes in our system, perhaps reserving a minimum of about 5 work processes for DIA users will be useful via the parameter.
    So my first question would be is there any other suggestions besides adjusting the mentioned parameter above in order to ensure that no work processors going into hang state due to RFCs' occupying it as this issue always happens at the end of the month only when there are massive users accessing it.
    When we went for a restart of the system we encountered another issue. Steps to the issue are as below:-
    1) Did a proper shutdown of Oracle and SAP.
    2) When we start using startsap script, it doesn't start DB so we started DB manually but listener was having problem
        so we stopped all.
    3) We also did a cleanipc, it too throws below error:-
    sidadm> cleanipc <systemno> remove
                   exec(): 0509-036 Cannot load program cleanipc because of the following errors:
                   0509-130 Symbol resolution failed for cleanipc because:
                   0509-136   Symbol memmove (number 106) is not exported from
                   dependent module /usr/sap/sid/SYS/exe/run/libsapu16.so.
                   0509-192 Examine .loader section symbols with the
                   'dump -Tv' command.
    4) Also the Listener file has no contents,it's null file.
    5) This is another error :-
        exec(): 0509-036 Cannot load program /oracle/sid/112_64/bin/tnslsnr because of the following errors:
        0509-150   Dependent module /oracle/sid/112_64/lib/libttsh11.so could not be loaded.
        0509-101   The module has too many section headers
        or the file is damaged
    The libttsh11.so file was empty dated 25th timestamp as below in PRD:-
    -rw-rr    1 sid   dba               0 Nov 25 07:12 libttsh11.so
    Further checking has let me to understand this is an Oracle Bug from this link:-
    http://gavinsoorma.com/2009/12/11-1-0-6-clusterware-upgrade-to-11-1-0-7/
    This Oracle bug only happens in an Upgrade time and how could this happen to my Production system during a restart process.
    Also this system was restarted during the last weekend's maintainance window and it came up with no issues.
    6) We copied over the libttsh11.so from our QA environment to PRD and did a Startup:-
    -rwxr-x---    1 sid   dba        65967496 Nov 25 07:40 libttsh11.so (This is the copied over file from QA)
    7) After Startup everything has been in order till now.
    My second question is what went wrong with the libttsh11.so file. How could it be 0 size in PRD when no signs of changes had happen to the PRD system. Is this a proven Oracle Bug or something else since I have never encountered anything like this before. Hope all the Gurus here could shed some light into my 2 questions as I am looking for positive answers.
    Thank you.
    Regards,
    John

    Hi,
    Firstly I would suggest you to upgrade your database from Oracle Release 11.2.0.1.0 to Oracle Release 11.2.0.2 . This is the recommended Oracle 11g database version  for SAP solutions. Many of your problem will get resolved with it.
    Question 1:
    So my first question would be is there any other suggestions besides adjusting the mentioned parameter above in order to ensure that no work processors going into hang state due to RFCs' occupying it as this issue always happens at the end of the month only when there are massive users accessing it.
    For immediate resolution the approach you have followed is correct viz limiting number of dialog processes for RFC. Secondly you need to analyze why RFC processing takes so much time. You need check which programs are getting executed by those RFC.
    Generate EarlyWatch report for more detailed view
    Question 2:
    My second question is what went wrong with the libttsh11.so file. How could it be 0 size in PRD when no signs of changes had happen to the PRD system. Is this a proven Oracle Bug or something else since I have never encountered anything like this before.
    The libttsh11.so library cannot be found in the related directory.
    Cause
    The file system is mounted using CIO option, but per Note 257338.1 Direct I/O (DIO) and Concurrent I/O (CIO) on AIX 5L, an ORACLE_HOME on a filesystem mounted with "cio" option is not supported.
    Such a configuration will cause, installation, relinking and other unexpected problems.
    Solution
    Disable the CIO option on the filesystem.
    References
    NOTE:257338.1 - Direct I/O (DIO) and Concurrent I/O (CIO) on AIX 5L
    Hope this helps.
    Regards,
    Deepak Kori

  • Navigation in Parent Child Hiearachy is a bug in OBIEE 11.1.1.6 ?

    Hi All,
    Please look into one of my earlier posts
    OBIEE 11g - Navigation in Parent Child Hiearchy not working
    One of my friends Ram told me that this is an Oracle Bug in 11.1.1.6. It's I just wanted to know if anybody has faced the same issue and reported this as a bug in Oracle. Unfortunately, i don't have the privileges to log a bug or see the bug information, can anybody please provide any information on this ?
    Thanks,
    Ronny

    Hi,
    Bug 14406555 : 11.1.1.6.2BP1 UPGRADE : ACTION LINK INTERACTION FAILS WITH GETLEVELINFO ERROR
    FYI: MOS
    What actually did happen?
    After the upgrade, when they expand the parent-child hierarchy and click on the measure column to navigate through the Action Link, nothing happens and they see error in the IE browser at the bottom - Message: 'getLevelInfo(...)' is null or not an objectLine: 1Char: 11175Code: 0URI: http://nyfsqla105.ny.fw.gs.com:9704/analytics/res/b_mozilla/answers/selectionsmodel.js It does not show any error in FF but it does not do anything. Inspite of checking "Do not display in a popup if only one action link is available at runtime" for Action links, it does show pop up after the upgrade.
    Thanks
    Deva

Maybe you are looking for

  • How to switch Skype number from 3-month plan to an...

    A friend initially subscribed to 3-months Skype number plan.  Now she would like to change to 1-year subscription.  However, there does not seem to be any option to do this.  The initial 3 months just passed and an automatic charge appeared on her pa

  • How do I unlock a UK Iphone to use in Australia?

    The UK network is Vodafone and also the Australian network is Vodafone, but how do I get an Australian SIM card to work in an iPhone that was bought In the UK?

  • Adobe Advanced Search Function not woking

    The Advanced Search Function has stopped working. I use mac os x 10.6.8. I deleted and reinstalled adobe reader 10.1.2 and still the same problem: nothing appears when I click on the Advanced Search function. I'd welcome suggestions on how to fix thi

  • File exchange and V550

    I have managed to pick up an old motorola V550. I was very surprised that bluetooth worked with the mac for contacts and calendars, I don't believe it used to perhaps the latest update sorted this. Anyway the iSync works fine, however bluetooth file

  • Protecting a webpage with a Password

    I need to protect a page on our website with a password. I realise this can only be done server-side and our website is written in Dreamweaver using HTML code. I thought I had solved the problem when I found a really good, free php script (I don't kn