Version 6

    WARNING this article is out of date - please refer to more recent documentation.


    A VDB is the primary means to define a Virtual Database in Teiid. A user can create a VDB using Teiid Designer or follow these instructions to create a Dynamic VDB without Designer for data integration purposes. If you do not know what a VDB is, then please start with these documents.


    Once you have a VDB it can be deployed in Teiid runtime in different ways.


    1. Copy the VDB file into the "<jboss-install>/server/<profile>/deploy" directory. Make sure that there are no other VDB files with the same name. If a VDB already exists with the same name, then this VDB will be replaced with the new VDB. This is the simplest way to deploy a VDB.
    2. The Admin API (look in org.teiid.adminpi.*) provides Java API methods that let's a user connect to a Teiid runtime and deploy a VDB. If you need to programmatically deploy a VDB use this method.
    3. Use the Admin Shell program to connect to the Teiid runtime and use "addVDB" command to deploy a VDB.
    4. Use the JOPR-based web console configuration system, which will enable users to connect to a running Teiid and provide a way to deploy a VDB. Check out the JOPR plugin at:
      http://<AS host>:8080/admin-console


    Option 1 can be used for local development VDB deployment or deployment in a manually controlled environment. Options 2, 3 and 4 can be used when your Teiid runtime instance is a remote instance or if you need a programmatic way to control your deployment.


    Deploying VDB Dependencies


    Apart from deploying the VDB, the user is also responsible for providing all the necessary dependent libraries, configuration changes and data files that may be needed by the Connectors defined in "META-INF/vdb.xml" file inside your VDB.  This file defines basic information about your VDB along with the sources you are integrating using Teiid.


    For example, if you are trying to integrate Oracle and Text sources in your VDB, then you are responsible for providing the JDBC driver for the Oracle source, and any necessary documents and configuration that are needed by the Text Connector.


    For a JDBC Connector using "Oracle" follow the below procedure

    • Copy the Oracle JDBC JAR file into "<jboss-install>/server/<profile>/lib" directory
    • Create a "data source" to the Oracle instance in the JBoss container. This typically done by creating "xxx-ds.xml" file and copying this file to the "<jboss-install>/server/<profile>/deploy" directory. You can also use admin-console to create this data source.


    <?xml version="1.0" encoding="UTF-8"?>
        <!-- uncomment to enable interleaving <interleaving/> -->
        <xa-datasource-property name="URL">jdbc:oracle:oci8:@tc</xa-datasource-property>
        <xa-datasource-property name="User">scott</xa-datasource-property>
        <xa-datasource-property name="Password">tiger</xa-datasource-property>
        <!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool -->
        <!-- Checks the Oracle error codes and messages for fatal errors -->
        <!-- Oracles XA datasource cannot reuse a connection outside a transaction once enlisted in a global transaction and vice-versa -->
          <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
    • Create connector binding factory for this Oracle data source. This also can be created by defining a "-ds.xml" file. You can also use admin-console for creating this connection factory. A sample xml looks like below.


    <?xml version="1.0" encoding="UTF-8"?>
          <config-property name="XaCapable" type="java.lang.Boolean">true</config-property>
          <config-property name="ExtensionTranslationClassName" type="java.lang.String"></config-property>
          <config-property name="SourceJNDIName" type="java.lang.String">java:OracleDS</config-property>            



    For Text Connector

    • Make sure that you another "-ds.xml" file defining the connection factory for Text Connector.


    Note that most of these configuration settings are correctly set if you used the Designer tool to build your VDB. However, you still need to deploy the dependent JAR files to Teiid's configuration along with the VDB.  If your deployment is not successful, there will be entries in the log file to explain why the VDB failed to deploy.


    Making changes to a deployed VDB

    If you want to just make simple connection changes like changing the Server or user for the Connector, then directly edit the "vdb.xml" file inside the VDB file. You can also use the admin-console to make changes to these settings.


    Migrating VDBs from 6.x

    VDBs from prior release contain an older configruation file version that is no longer supported.  You can use the migration utility (bin/ or bin/migrate.bat) supplied with the Admin Shell download to update these VDBs for use with Teiid 7.  Note - additional manual edits may be needed to the generated {vdb}-bindings-ds.xml file if you are using custom or xml connectors.