4-30 Metadata Repository Builders Guide for Oracle Business Intelligence Enterprise Edition
To import XML data using ODBC: 1.
To access XML data sources through ODBC, you first need to license and install an XML ODBC driver.
2.
Create ODBC DSNs that point to the XML data sources you want to access, making sure you select the XML ODBC database type.
3. In the Administration Tool, select File, then select Import Metadata.
4.
Follow the instructions in the dialogs to import the ODBC DSNs into the repository. See
Importing Metadata from Relational Data Sources for more
information.
Example of an XML ODBC Data Source
Example 4–3 shows an example of an XML ODBC data source in the Microsoft ADO
persisted file format. Both the data and the schema could be contained inside the same document.
Example 4–3 XML ODBC Example
xml xmlns:s=uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882 xmlns:dt=uuid:C2F41010-65B3-11d1-A29F-00AA00C14882
xmlns:rs=urn:schemas-microsoft-com:rowset xmlns:z=RowsetSchema
s:Schema id=RowsetSchema s:ElementType name=row content=eltOnly rs:CommandTimeout=30
rs:updatable=true s:AttributeType name=ShipperID rs:number=1 rs:writeunknown=true
rs:basecatalog=Paint rs:basetable=Shippers rs:basecolumn=ShipperID
s:datatype dt:type=i2 dt:maxLength=2 rs:precision=5 rs:fixedlength=true rs:benull=false
s:AttributeType s:AttributeType name=CompanyName rs:number=2 rs:writeunknown=true
rs:basecatalog=Paint rs:basetable=Shippers rs:basecolumn=CompanyName
s:datatype dt:type=string rs:dbtype=str dt:maxLength=40 rs:benull=false
s:AttributeType s:AttributeType name=Phone rs:number=3 rs:nullable=true
rs:writeunknown=true rs:basecatalog=Paint rs:basetable=Shippers rs:basecolumn=Phone
s:datatype dt:type=string rs:dbtype=str dt:maxLength=24 rs:fixedlength=true
s:AttributeType s:extends type=rs:rowbase
s:ElementType s:Schema
rs:data z:row ShipperID=1 CompanyName=Speedy Express Phone=503
555-9831 z:row ShipperID=2 CompanyName=United Package Phone=503
555-3199 z:row ShipperID=3 CompanyName=Federal Shipping Phone=503
Caution: Due to XML ODBC limitations, you must select the
Synonyms option in the Select Metadata Types screen, or no tables are
imported.
Importing Metadata and Working with Data Sources 4-31
555-9931 rs:data
xml
Examples of XML Documents
The following XML documents provide examples of several different situations and explain how the Oracle BI Server XML access method handles those situations.
■
The XML documents 83.xml and 8_sch.xml shown in Example 4–4
and Example 4–5
demonstrate the use of the same element declarations in different scope. For example, p3 could appear within p2 as well as within p4.
Because the element p3 in the preceding examples appears in two different scopes, each element is given a distinct column name by appending an index
number to the second occurrence of the element during the import process. In this case, the second occurrence becomes p3_1. If p3 occurs in additional contexts,
they become p3_2, p3_3.
■
The XML documents 83.xml and 84.xml shown in Example 4–4
and Example 4–6
demonstrate that multiple XML files can share the same schema 8_sch.xml.
■
Internet Explorer version 5 and higher supports HTML documents containing embedded XML fragments called XML islands. The XML document island2.htm
shown in Example 4–7
demonstrates a simple situation where multiple XML data islands, and therefore multiple tables, could be generated from one
document. One table is generated for each instance of an XML island. Tables are distinguished by appending an appropriate index to the document name. For
island2.htm, the two XML tables generated would be island2_0 and island2_1.
Example 4–4 83.xml
===83.xml=== ?xml version=1.0?
test xmlns=x-schema:8_sch.xml| row
p10p1 p2 width=5 height=2
p3hip3 p4
p3hip3 p6xx0p6
p7yy0p7 p4
p5zz0p5 p2
row row
p11p1 p2 width=6 height=3
p3how are youp3 p4
p3hip3 p6xx1p6
p7yy1p7 p4
p5zz1p5 p2
row
4-32 Metadata Repository Builders Guide for Oracle Business Intelligence Enterprise Edition
test
Example 4–5 8_sch.xml
===8_sch.xml=== Schema xmlns=urn:schemas-microsoft-com:xml-data
xmlns:dt=urn:schemas-microsoft-com:datatypes AttributeType name=height dt:type=int
ElementType name=test content=eltOnly order=many AttributeType name=height dt:type=int
element type=row ElementType
ElementType name=row content=eltOnly order=many element type=p1
element type=p2 ElementType
ElementType name=p2 content=eltOnly order=many AttributeType name=width dt:type=int
AttributeType name=height dt:type=int attribute type=width
attribute type=height element type=p3
element type=p4 element type=p5
ElementType ElementType name=p4 content=eltOnly order=many
element type=p3 element type=p6
element type=p7 ElementType
ElementType name=test0 content=eltOnly order=many element type=row
ElementType ElementType name=p1 content=textOnly dt:type=string
ElementType name=p3 content=textOnly dt:type=string ElementType name=p5 content=textOnly dt:type=string
ElementType name=p6 content=textOnly dt:type=string ElementType name=p7 content=textOnly dt:type=string
Schema
Example 4–6 84.xml
===84.xml=== ?xml version=1.0?
test0 xmlns=x-schema:8_sch.xml row
p10p1 p2 width=5 height=2
p3hip3 p4
p3hip3 p6xx0p6
p7yy0p7 p4
p5zz0p5 p2
row row
p11p1 p2 width=6 height=3
Importing Metadata and Working with Data Sources 4-33
p3how are youp3 p4
p3hip3 p6xx1p6
p7yy1p7 p4
p5zz1p5 p2
row test0
Example 4–7 Island2.htm
===island2.htm=== HTML
HEAD TITLEHTML Document with Data IslandTITLE
HEAD BODY
pThis is an example of an XML data island in I.E. 5p XML ID=12345
test row
field100field1 field201field2
row row
field110field1 field211field2
row row
field120field1 field221field2
row test
XML pEnd of first example.p
XML ID=12346 test
row field1100field11
field1201field12 row
row field1110field11
field1211field12 row
row field1120field11
field1221field12 row
test XML
pEnd of second example.p BODY
HTML
4-34 Metadata Repository Builders Guide for Oracle Business Intelligence Enterprise Edition
Using a Standby Database with Oracle Business Intelligence
A standby database is used mainly for its high availability and failover functions as a backup for the primary database. In a standby database configuration, there is
regularly scheduled replication from the primary database to the secondary database. The latency of this replication must be short enough that writing to the primary
database while reading from the secondary database does not cause any synchronization or data integrity problems.
Because a standby database is essentially a read-only database, it can be used as a business intelligence query server, relieving the workload of the primary database and
improving query performance.
The following sections explain how to use a standby database with Oracle Business Intelligence:
■
About Using a Standby Database with Oracle Business Intelligence
■
Creating the Database Object for the Standby Database Configuration
■
Creating Connection Pools for the Standby Database Configuration
■
Updating Write-Back Scripts in a Standby Database Configuration
■
Setting Up Usage Tracking in a Standby Database Configuration
■
Setting Up Event Polling in a Standby Database Configuration
■
Setting Up Oracle BI Scheduler in a Standby Database Configuration
About Using a Standby Database with Oracle Business Intelligence
In a standby database configuration, you have two databases: a primary database that handles all write operations and is the source of truth for data integrity, and a
secondary database that is exposed as a read-only source. When you use a standby database configuration with Oracle Business Intelligence, all write operations are
offloaded to the primary database, and read operations are sent to the standby database.
Write operations that need to be routed to the primary source may include the following:
■
Oracle BI Scheduler job and instance data
■
Temporary tables for performance enhancements
■
Writeback scripts for aggregate persistence
■
Usage tracking data, if usage tracking has been enabled
■
Event polling table data, if event polling tables are being used The following list provides an overview of how to configure the Oracle BI Server to
use a standby database:
1.
Create a single database object for the standby database configuration, with temporary table creation disabled.
2.
Configure two connection pools for the database object:
■
A read-only connection pool that points to the standby database
■
A second connection pool that points to the primary database for write operations
Importing Metadata and Working with Data Sources 4-35
3.
Update any connection scripts that write to the database so that they explicitly specify the primary database connection pool.
4.
If usage tracking has been enabled, update the usage tracking configuration to use the primary connection.
5.
If event polling tables are being used, update the event polling database configuration to use the primary connection.
6.
Ensure that Oracle BI Scheduler is not configured to use any standby sources. Even though there are two separate physical data sources for the standby database
configuration, you create only one database object in the Physical layer. Figure 4–4
shows the database object and connection pools for the standby database configuration in the Physical layer.
Figure 4–4 Standby Database Configuration in the Physical Layer
Creating the Database Object for the Standby Database Configuration
Use the Administration Tool to create a database object in the repository for the standby database configuration. When you create the database object, make sure that
the persist connection pool is not assigned, to prevent the Oracle BI Server from creating temporary tables in the standby database.
To create a database object for the standby database configuration: 1.
In the Administration Tool, right-click the Physical layer and select New Database
.
2. Provide a name for the database, and then select the type of database in the