Results 1 to 5 of 5

Thread: DB2 XML Support

  1. #1
    Join Date
    Jan 2003
    Posts
    47

    Unanswered: DB2 XML Support

    Hi All,

    I installed DB2 v9.1.300. I am expected to see XML data type by default, but I don't see by default. Do I need to alter any settings to see XML data type?


    Thanks
    Shri
    ================================================== ==========
    About DB2 Administration Tools Environment
    ================================================== ==========
    DB2 administration tools level:
    Product identifier SQL09013
    Level identifier 01040107
    Level DB2 v9.1.300.257
    Build level s070719
    PTF WR21392
    ================================================== ==========
    Java development kit (JDK):
    Level IBM Corporation 1.5.0
    ================================================== ==========
    p.srinivasarao

  2. #2
    Join Date
    May 2003
    Posts
    113
    I don't know what do you mean 'by default'

    XML is a 'new' data type supported by v9. You can create a table
    CREATE TABLE TT (C1 XML)
    INSERT INTO TT VALUES(XMLPARSE(DOCUMENT '<A>B</A>'));
    SELECT C1 FROM TT;

    that is how to insert/retrieve the xml data

    certainly, if you know about xpath expression, you can also query on the data

  3. #3
    Join Date
    Jan 2003
    Posts
    47
    While creating the database I forgot to check the following feature.

    Enable database for XML(Code Set will be set to UTF-8) because of this I am not seeing the XML data type. I created one more database by checking the flag during database create. Now I am able to see the XML data type.

    Now my question is "Is it possible to change the Code set for an existing database to UTF-8?"


    Thanks
    Shri
    p.srinivasarao

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    I know that you cannot change the codeset in V8, so I very much doubt it can be changed in V9.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  5. #5
    Join Date
    May 2003
    Posts
    113
    Quote Originally Posted by Marcus_A
    I know that you cannot change the codeset in V8, so I very much doubt it can be changed in V9.
    Agree with Marcus_A. If changing the codeset is allowed, this action requires data conversion on all string(char,varchar, lobs, graphic) from one code set to another. there will be a lot of data loss during the conversion.

    For your case, since you don't have much data there, just create a new database should be easiest way out

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •