5 Installing XBRL Extension to Oracle XML DB

This chapter explains how to install XBRL Extension to Oracle XML DB.

It covers these topics:

Note:

Refer to "Placeholders in Oracle Database XBRL Extension Developer's Guide" for explanations of the placeholders used here.

Hardware and Software Requirements

This section describes the minimal hardware and software requirements for installation and use of XBRL Extension to Oracle XML DB.

Hardware Requirements

There are no extra hardware requirements for XBRL Extension to Oracle XML DB, beyond those for Oracle Database.

Software Requirements

Installing and Uninstalling XBRL Extension to Oracle XML DB

This section describes how to install and uninstall XBRL Extension to Oracle XML DB, create, drop, and purge an XBRL repository, and install the sample XBRL repository and GAAP demo.

Preparing to Install XBRL Extension to Oracle XML DB

This section outlines preparatory instructions for installing XBRL Extension to Oracle XML DB and related software.

  1. Download the zip archive for the current release of XBRL Extension to Oracle XML DB from http://support.oracle.com. To find the file name of this zip archive, please visit the Oracle Technology Network XBRL site, http://www.oracle.com/technetwork/database/features/xmldb/index-087631.html.

  2. Extract the contents of the zip archive to a temporary directory, patch_top.

  3. Follow the instructions in patch_top/XBRLReleaseN/README.txt to create directory ORACLE_HOME/rdbms/xbrl_xdb.

See Also:

"Directory xbrl_xdb" for information about the contents of directory xbrl_xdb.

Installing XBRL Extension to Oracle XML DB

Installing XBRL Extension to Oracle XML DB creates database user (schema) XBRLSYS, and it creates Oracle XML DB Repository folder /xbrl as a child of the repository root.

  1. Create an Oracle Database with character set AL32UTF8.

  2. Set the COMPATIBLE parameter to at least 11.2.0.1.0.

  3. Set SHARED_POOL_SIZE to 1G.

  4. Set the tablespace size to at least 3.5 times the size of the data on your file system, for indexed storage. For example, if the data size is 20G then set the tablespace size to at least 70G, for indexed storage.

  5. Go to directory xbrl_xdb/XBRLScripts.

    shell>Foot 1  cd XBRLScripts
    
  6. Create a tablespace and a temporary tablespace for database user XBRLSYS.

    SQL+>Foot 2  CREATE TABLESPACE xb_sys_ts . . .;
    SQL+> CREATE TABLESPACE xb_sys_tmp_ts  . . .;
    
  7. Run script xbrlinstall.sql to install XBRL Extension to Oracle XML DB.

    SQL+> @xbrlinstall.sql sys_pass xb_sys_pass -
        >                  xb_sys_ts xb_sys_tmp_ts xb_protocols
    
  8. Check the results of following SQL statements, to verify that XBRL Extension to Oracle XML DB has been successfully installed. The expected results are shown here.

    SQL+> CONNECT XBRLSYS/xb_sys_pass
    SQL+> SELECT OBJECT_NAME FROM USER_OBJECTS -
        >   WHERE STATUS = 'VALID' AND OBJECT_TYPE = 'PACKAGE';
    
    OBJECT_NAME
    ---------------------
    DBMS_ORAXBRL_INTERNAL
    DBMS_ORAXBRLV
    DBMS_ORAXBRLD
    DBMS_ORAXBRL_UBM
    DBMS_ORAXBRLI
    DBMS_ORAXBRLT
    DBMS_ORAXBRL
    
    7 rows selected.
    
    SQL+> SELECT ANY_PATH FROM RESOURCE_VIEW WHERE equals_path(RES, '/xbrl') = 1;
    
    ANY_PATH
    --------
    /xbrl
    
    SQL+> SELECT INDEX_NAME FROM USER_INDEXES -
        >   WHERE INDEX_TYPE = 'FUNCTION-BASED DOMAIN' AND STATUS = 'VALID';
    
    INDEX_NAME
    ----------------
    XBRL$SCHEMAIDX
    XBRL$INSTANCEIDX
    ORA$XBRLCACHEIDX
    
    SQL+> SELECT TABLE_NAME FROM USER_OBJECT_TABLES WHERE STATUS = 'VALID';
    
    TABLE_NAME
    ----------------
    ORA$XBRLINSTANCE
    ORA$XBRLLINKBASE
    ORA$XBRLSCHEMA
    
  9. If there are any error messages in log file xbrlinstall.log, or if the result returned by any of the SQL queries in step 8 is not as expected, then check parameter COMPATIBLE and run uninstall — see "UnInstalling XBRL Extension to Oracle XML DB". Resolve the error, then try installing again (repeat steps 7 and 8).

Determining the Installed Version of XBRL Extension to Oracle XML DB

Use the following query to determine the current version of XBRL Extension to Oracle XML DB.

SELECT VALUE FROM XBRLSYS.ora$xbrlrepprop WHERE NAME='XBRLVERSION';

UnInstalling XBRL Extension to Oracle XML DB

Perform the following steps to uninstall XBRL Extension to Oracle XML DB. This drops all procedures and system objects created under database user XBRLSYS, and it deletes folder /xbrl from Oracle XML DB Repository.

  1. Drop each XBRL repository – see "Dropping an XBRL Repository".

  2. Run SQL script xbrluninstall.sql.

    SQL+> @xbrluninstall.sql sys_pass xb_sys_pass
    
  3. Check the results of the following SQL statements, to verify that XBRL Extension to Oracle XML DB has successfully been uninstalled.

    SQL+> CONNECT SYSTEM/sys_pass
    SQL+> SELECT 1 FROM DBA_USERS WHERE USERNAME = 'XBRLSYS';
    
    no rows selected
    
    SQL+> SELECT ANY_PATH FROM RESOURCE_VIEW WHERE equals_path(RES, '/xbrl') = 1;
    
    no rows selected
    

Creating an XBRL Repository

Perform the following steps to create an XBRL repository. This also creates a database user (schema) with the same name as the repository. You can create any number of XBRL repositories. The repositories are independent of each other.

  1. Create a tablespace and a temporary tablespace for the XBRL repository. Use a redundancy factor of about 3.5 when calculating tablespace size, to account for indexed storage.

    SQL+> CREATE TABLESPACE xb_rep_ts . . .;
    SQL+> CREATE TABLESPACE xb_rep_tmp_ts . . .;
    
  2. (Optional) If you want to partition the table that stores instance documents, then edit the CREATE TABLE statement for table ORA$XBRLINSTANCE in script xbrlddl.sql to add a virtual-column partition. See "Partitioning XBRL Repositories".

  3. Run SQL script, xbrlcrt.sql, to create the XBRL repository.

    shell> cd XBRLScripts
    
    SQL+> @xbrlcrt.sql sys_pass xb_sys_pass -
        >              xb_rep xb_rep_pass xb_rep_ts xb_rep_tmp_ts xb_rep_idx_ts
    

    This creates all of the tables and indexes that are needed for XBRL document storage. It also creates an Oracle XML DB Repository folder, under folder /xbrl, that has the same name as the XBRL repository, xb_rep.

  4. Check the results of the following SQL statements, to verify that the repository creation was successful. The expected results are shown here.

    SQL+> CONNECT xb_rep/xb_rep_pass
    SQL+> SELECT OBJECT_NAME FROM USER_OBJECTS -
        >   WHERE STATUS = 'VALID' AND OBJECT_TYPE = 'PACKAGE';
    
    OBJECT_NAME
    --------------------
    XBRL_ASYNC_EVENTS
    DBMS_ORA_XBRL_EVENTS
    
    SQL+> SELECT ANY_PATH FROM RESOURCE_VIEW
        >   WHERE equals_path(RES, '/xbrl/xb_rep') = 1;
    
    ANY_PATH
    ------------
    /xbrl/xb_rep
    
    SQL+> SELECT INDEX_NAME FROM USER_INDEXES -
        >   WHERE INDEX_TYPE = 'FUNCTION-BASED DOMAIN' AND STATUS = 'VALID';
    
    INDEX_NAME
    ----------------
    ORA$XBRLCACHEIDX
    XBRL$INSTANCEIDX
    XBRL$SCHEMAIDX
    
    SQL+> SELECT TABLE_NAME FROM USER_OBJECT_TABLES WHERE STATUS = 'VALID';
    
    TABLE_NAME
    ----------------
    ORA$XBRLINSTANCE
    ORA$XBRLLINKBASE
    ORA$XBRLSCHEMA
    

    Check for any error messages in log file xbrlcft.log.

  5. If there are any error messages in log file xbrlcft.log, or if the result returned by any of the SQL queries in step 4 is not as expected, then run script xbrldrop.sql to drop the newly created repository — see "Dropping an XBRL Repository". Resolve the error, then create the repository again (repeat steps 3 and 4).

Dropping an XBRL Repository

Perform the following steps to drop (delete) an XBRL repository.

  1. Run SQL script xbrldrop.sql.

    SQL+> @xbrldrop.sql xb_sys_pass xb_rep xb_rep_pass
    
  2. Check the results of the following SQL statements, to verify that the drop was successful.

    SQL+> CONNECT SYSTEM/sys_pass
    SQL+> SELECT 1 FROM DBA_USERS WHERE USERNAME = UPPER ('xb_rep');
    
    no rows selected
    
    SQL+> SELECT ANY_PATH FROM RESOURCE_VIEW
        >   WHERE equals_path(RES, '/xbrl/xb_rep') = 1;
    
    no rows selected
    

Purging an Accidentally Dropped XBRL Repository

In case the database schema corresponding to an XBRL repository is dropped, you can perform the following steps to purge an XBRL repository, deleting all dependent objects that were created in Oracle XML DB Repository.

  1. Run SQL script xbrludpurge.sql.

    SQL+> @xbrludpurge.sql xb_sys_pass xb_rep
    
  2. Check the results of the following SQL statements, to verify that the objects corresponding to the XBRL repository have been successfully purged.

    SQL+> CONNECT SYSTEM/sys_pass
    SQL+> SELECT ANY_PATH FROM RESOURCE_VIEW
        >   WHERE equals_path(RES, '/xbrl/xb_rep') = 1;
    
    no rows selected
    

Installing the Sample XBRL Repository and GAAP Demo

Perform the following steps to install the sample XBRL repository and GAAP demo.

  1. Run SQL script InstallXBRLDemo.sql from directory xbrl_xdb/XBRLScripts. This creates a sample XBRL repository named oraxbrl.

  2. Follow the instructions in "Building and Using a Sample XBRL Application: USGAAP 2008".

  3. Refer to the SQL statements in xbrl_xdb/XBRLScripts, to become familiar with the APIs of XBRL Extension to Oracle XML DB.

Directory xbrl_xdb

This section describes the contents of the xbrl_xdb directory.

XBRLScripts

Directory XBRLScripts contains the following SQL script files.

Table 5-1 SQL Scripts in Directory XBRLScripts

SQL Script Name Description

xbrlinstall.sql

Create database user XBRLSYS and install packages that contain XBRL- specific APIs. If Oracle XML DB Repository is used, then a root directory /xbrl is created, with owner XBRLSYS.

xbrlcrt.sql

Create an XBRL repository and a database schema with the same name. Create all necessary tables, indexes, and procedures.

xbrlddl.sql

Create tables and indexes. This script is run automatically by script xbrlcrt.sql.

If you want to partition the base table for the XBRL instance documents of a given repository, then edit script xbrlddl.sql before you use script xbrlcrt.sql to create that repository. See "Partitioning XBRL Repositories".

xbrldrop.sql

Drop a given XBRL repository, including the corresponding database schema, tables, indexes, and procedures.

xbrluninstall.sql

Finish uninstalling. Invoke this after dropping all XBRL repositories.

xbrludpurge.sql

Remove other system objects associated with an XBRL repository. Use this if a database schema corresponding to an XBRL repository is dropped accidentally.

xbrlpurgefile.sql

Delete resources from Oracle XML DB Repository that are associated with an XBRL repository. Use this if you use Oracle XML DB Repository and you mistakenly delete a document from the XBRL repository.

xbrlrecidxdrv.sql

Drop the XMLIndex indexes used for an XBRL repository, then recreate them, so you can move the index storage tables to a different tablespace.

xbrlregschema.sql

Register standard XBRL schemas. Must be run before using the tuple APIs.

xbrlerrmsg.sql

Load error messages in different languages for XBRL Extension to Oracle XML DB.

InstallXBRLDemo.sql

Install XBRL Extension to Oracle XML DB and create an XBRL repository.


XBRLDemoScripts

Directory XBRLDemoScripts contains the following files.

  • demo.sql – Script that loads and queries Bank of America and USGAAP 2008 files.

  • demo2.sql – Script that loads and queries a tuple demo (files oraclexbrltupledemo.xsd, oraclexbrltupledemo-inst.xml).

  • Files schema.xml and linkbase.xml, which are used by the USGAAP 2008 demo. These files list the XBRL schema and linkbase files in USGAAP 2008. See "Building and Using a Sample XBRL Application: USGAAP 2008".

Demo-BIFiles

Directory Demo-BIFiles contains Oracle Business Intelligence Suite Enterprise Edition (OBIEE) resources used for the USGAAP 2008 demo. It contains these subdirectories:

  • xbrl.rpd – Sample business intelligence XBRL application based on USGAAP 2008.

  • xbrl.zip – Sample business intelligence XBRL application based on USGAAP 2008.

Installing a Third-Party XBRL Processing Engine

You must install an Oracle-certified third-party XBRL processing engine, outside the database. For information about this, consult Oracle XBRL support:

http://www.oracle.com/technetwork/database/features/xmldb/index-087631.html

Integration with Oracle Business Intelligence Suite

Oracle Business Intelligence Suite Enterprise Edition (OBIEE) is not included as part of XBRL Extension to Oracle XML DB. You must procure it separately and install it according to the OBIEE instructions. You can install it in any tier. You must install an Oracle client for OBIEE to work properly with XBRL Extension to Oracle XML DB.

XBRL Extension to Oracle XML DB provides a demo package to demonstrate integration with OBIEE. Included in directory xbrl_xdb is a directory Demo-BIFiles, which contains the OBIEE repository file xbrl.rpd and folders and files for a sample dashboard, in zip archive xbrl.zip.

See Also:

Perform the following steps to configure OBIEE with the demo package:

  1. Establish a connection to the database instance.

    1. Add entry DEMO to file oracle_client_dir\network\admin\tnsnames.ora. In the following, change hostname.domain, port, and sid to the correct values for your database instance:

      DEMO = (DESCRIPTION =
               (ADDRESS_LIST = 
                 (ADDRESS = (PROTOCOL = TCP)
                            (HOST = hostname.domain)
                            (PORT = port)))
               (CONNECT_DATA = (SERVICE_NAME = sid)))
      
    2. Select from the Microsoft Windows Start menu: oracle_client, then Configuration and Migration Tools, then Microsoft ODBC Administrator.

    3. In the Oracle ODBC Driver Configuration dialog box, click the System DSN tab. Click Add. Select oracle_client as the driver. Click Finish.

    4. Enter x02 as the Data Source Name, demo as the TNS Service Name, and oraxbrl as the User ID. Click OK.

  2. Copy OBIEE repository file xbrl.rpd from xbrl_xdb\Demo-BIFiles to obiee_home\server\Repository.

  3. Extract zip archive xbrl.zip to directory obieedata_home\web\catalog.

  4. Open file obiee_home\server\Config\NQSConfig.INI in a text editor, and change the text that follows Star = to make it xbrl.rpd:

    [ REPOSITORY ]
    Star = xbrl.rpd, DEFAULT;
    
  5. Open file obieedata_home\web\config\instanceconfig.xml in a text editor, and change the final directory component of the catalog path to make it xbrl:

    <CatalogPath>obieedata_home/web/catalog/xbrl</CatalogPath>
    
  6. Start the Oracle BI services.

    1. Choose from the Microsoft Windows Start menu: Run.

    2. Enter services.msc.

    3. In the Services dialog box, start or restart each of the following services, by selecting the service name, right-clicking, and then selecting Start or Restart: Oracle BI Server, Oracle BI Javahost, and Oracle BI Presentation Server.



Footnote Legend

Footnote 1: Shell examples are indicated here using the prompt shell>.
Footnote 2: The SQL examples here assume you are using SQL*Plus, for consistency. The prompt is shown as SQL+>, and the continuation prompt is shown as >. Hyphen (-) is the SQL*Plus line continuation character.