Skip Headers

Oracle9i Streams
Release 2 (9.2)

Part Number A96571-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to next page

A
XML Schema for LCRs

The XML schema described in this appendix defines the format of a logical change record (LCR).

This appendix contains this topic:

The namespace for this schema is the following:

http://xmlns.oracle.com/streams/schemas/lcr 

The schema is the following:

http://xmlns.oracle.com/streams/schemas/lcr/streamslcr.xsd

This schema definition can be loaded into the database by connecting as SYS in SQL*Plus and executing the following file:

rdbms/admin/catxlcr.sql

The rdbms directory is in your Oracle home.

Definition of the XML Schema for LCRs

The following is the XML schema definition for LCRs:

schema xmlns="http://www.w3.org/2001/XMLSchema" 
        targetNamespace="http://xmlns.oracle.com/streams/schemas/lcr" 
        xmlns:lcr="http://xmlns.oracle.com/streams/schemas/lcr" 
        xmlns:xdb="http://xmlns.oracle.com/xdb" 
          version="1.0"> 

  <simpleType name = "short_name"> 
    <restriction base = "string"> 
      <maxLength value="30"/> 
    </restriction> 
  </simpleType> 

  <simpleType name = "long_name"> 
    <restriction base = "string"> 
      <maxLength value="4000"/> 
    </restriction> 
  </simpleType> 

  <simpleType name = "db_name"> 
    <restriction base = "string"> 
      <maxLength value="128"/> 
    </restriction> 
  </simpleType> 

  <!-- Default session parameter is used if format is not specified --> 
  <complexType name="datetime_format"> 
    <sequence> 
      <element name = "value" type = "string"/> 
      <element name = "format" type = "string" minOccurs="0"/> 
    </sequence> 
  </complexType> 

  <complexType name="anydata"> 
    <choice> 
      <element name="varchar2" type = "string" xdb:SQLType="VARCHAR2"/> 

      <!-- Represent char as varchar2. xdb:CHAR blank pads upto 2000 bytes! --> 
      <element name="char" type = "string" xdb:SQLType="VARCHAR2"/> 
      <element name="nchar" type = "string" xdb:SQLType="NVARCHAR2"/> 

      <element name="nvarchar2" type = "string" xdb:SQLType="NVARCHAR2"/> 
      <element name="number" type = "double" xdb:SQLType="NUMBER"/> 
      <element name="raw" type = "hexBinary" xdb:SQLType="RAW"/> 
      <element name="date" type = "lcr:datetime_format"/> 
      <element name="timestamp" type = "lcr:datetime_format"/> 
      <element name="timestamp_tz" type = "lcr:datetime_format"/> 
      <element name="timestamp_ltz" type = "lcr:datetime_format"/> 

      <!-- Interval YM should be according to format allowed by SQL --> 
      <element name="interval_ym" type = "string"/> 

      <!-- Interval DS should be according to format allowed by SQL --> 
      <element name="interval_ds" type = "string"/> 
    </choice> 
  </complexType> 

  <complexType name="column_value"> 
    <sequence> 
      <element name = "column_name" type = "lcr:long_name"/> 
      <element name = "data" type = "lcr:anydata"/> 
      <element name = "lob_information" type = "string" minOccurs="0"/> 
      <element name = "lob_offset" type = "nonNegativeInteger" minOccurs="0"/> 
      <element name = "lob_operation_size" type = "nonNegativeInteger" 
                                                               minOccurs="0"/> 
    </sequence> 
  </complexType> 

  <element name = "ROW_LCR"> 
    <complexType> 
      <sequence> 
        <element name = "source_database_name" type = "lcr:db_name"/> 
        <element name = "command_type" type = "string"/> 
        <element name = "object_owner" type = "lcr:short_name"/> 
        <element name = "object_name" type = "lcr:short_name"/> 
        <element name = "tag" type = "hexBinary" xdb:SQLType="RAW" 
                                                           minOccurs="0"/> 
        <element name = "transaction_id" type = "string" minOccurs="0"/> 
        <element name = "scn" type = "double" xdb:SQLType="NUMBER" 
                                                           minOccurs="0"/> 
        <element name = "old_values" minOccurs = "0"> 
          <complexType> 
            <sequence> 
              <element name = "old_value" type="lcr:column_value" 
                                                    maxOccurs = "unbounded"/> 
            </sequence> 
          </complexType> 
        </element> 
        <element name = "new_values" minOccurs = "0"> 
          <complexType> 
            <sequence> 
              <element name = "new_value" type="lcr:column_value" 
                                                    maxOccurs = "unbounded"/> 
            </sequence> 
          </complexType> 
        </element> 
      </sequence> 
    </complexType> 
  </element> 

  <element name = "DDL_LCR"> 
    <complexType> 
      <sequence> 
        <element name = "source_database_name" type = "lcr:db_name"/> 
        <element name = "command_type" type = "string"/> 
        <element name = "current_schema" type = "lcr:short_name"/> 
        <element name = "ddl_text" type = "string"/> 
        <element name = "object_type" type = "string" 
                                                 minOccurs = "0"/> 
        <element name = "object_owner" type = "lcr:short_name" 
                                                 minOccurs = "0"/> 
        <element name = "object_name" type = "lcr:short_name" 
                                                 minOccurs = "0"/> 
        <element name = "logon_user" type = "lcr:short_name" 
                                                 minOccurs = "0"/> 
        <element name = "base_table_owner" type = "lcr:short_name" 
                                                 minOccurs = "0"/> 
        <element name = "base_table_name" type = "lcr:short_name" 
                                                 minOccurs = "0"/> 
        <element name = "tag" type = "hexBinary" xdb:SQLType="RAW" 
                                                 minOccurs = "0"/> 
        <element name = "transaction_id" type = "string" 
                                                 minOccurs = "0"/> 
        <element name = "scn" type = "double" xdb:SQLType="NUMBER" 
                                                 minOccurs = "0"/> 
      </sequence> 
    </complexType> 
  </element> 
</schema> 
  


Go to previous page Go to next page
Oracle
Copyright © 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback