1 Reply Latest reply: Dec 20, 2006 8:05 AM by Marco Gralike RSS

    How to cripple your XML DB environment with one statement

    Marco Gralike
      The following COULD CRIPPLE YOUR ENVIRONMENT. It's just an example so you will be aware of the possibility...

      (Tested it on a VMware environment with Oracle Enterprise Edition 10.2.0.3.0 fresh installed, See also here: http://technology.amis.nl/blog/?p=1444)

      The following is executed under SYSTEM...
      SQL> conn system
      Connected.
      
      
      SQL> CREATE OR REPLACE TYPE XMLTYPE AS OBJECT
      2 (X INT
      3 )
      4 /
      
      Type created.
      
      SQL> CREATE TABLE XML_TEST
      2 (ID NUMBER(10,0) NOT NULL
      3 ,FAKE_XML XMLTYPE
      4 )
      5 /
      
      Table created.
      
      SQL> desc XML_TEST
      
      Name Null?
      Type
      ------------------------------------------------------------------------
      
      -------- -------------------------------------------------
      ID NOT
      NULL NUMBER(10)
      FAKE_XML
      
      XMLTYPE
      One would expect somehow that XMLTYPE would be a "preserved" word.

      Mark, if you see this post; what do you think?. I will test and create an SR for this, BUT are there other "types" which should be protected?

      Message was edited by:
      mgralike
        • 1. Re: How to cripple your XML DB environment with one statement
          Marco Gralike
          To show that it shouldn't be happening or it is at least inconsistent behavior, two examples one with "XMLTYPE" and one with "DATE"...
          SQL> CREATE OR REPLACE TYPE MYDATE AS OBJECT
            2  (X INT
            3  )
            4  /
          
          Type created.
          
          SQL> drop type mydate;
          
          Type dropped.
          
          SQL> CREATE OR REPLACE TYPE DATE AS OBJECT
            2  (X INT
            3  )
            4  /
          CREATE OR REPLACE TYPE DATE AS OBJECT
                                 *
          ERROR at line 1:
          ORA-02302: invalid or missing type name
          
          
          SQL> CREATE OR REPLACE TYPE XMLTYPE AS OBJECT
            2  (X INT
            3  )
            4  /
          
          Type created.
          
          SQL> show user
          USER is "SYSTEM"
          Message was edited by:
          mgralike