<html>
<head>
    <base href="https://docs.jboss.org/author">
            <link rel="stylesheet" href="/author/s/en/2172/19/5/_/styles/combined.css?spaceKey=TEIID&amp;forWysiwyg=true" type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://docs.jboss.org/author/display/TEIID/Deploying+VDBs">Deploying VDBs</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://docs.jboss.org/author/display/~shawkins">Steven Hawkins</a>
    </h4>
        <br/>
                         <h4>Changes (1)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-changed-lines" >A [VDB|http://www.jboss.org/teiid/basics/virtualdatabases.html] is the primary means to define a Virtual Database in Teiid. A user can create a VDB using <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">[Teiid Designer|http://www.jboss.org/teiiddesigner.html]</span> <span class="diff-added-words"style="background-color: #dfd;">Teiid Designer - {space-metadata-from:designerUrl} -</span> or follow the instructions in the Reference Guide to create a &quot;Dynamic VDB&quot; without Teiid Designer. <br></td></tr>
            <tr><td class="diff-unchanged" > <br>Once you have a &quot;VDB&quot; built it can be deployed/undeployed in Teiid runtime in different ways. <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <p>A <a href="http://www.jboss.org/teiid/basics/virtualdatabases.html" class="external-link" rel="nofollow">VDB</a> is the primary means to define a Virtual Database in Teiid. A user can create a VDB using Teiid Designer - <a href="http://www.jboss.org/teiiddesigner/" class="external-link" rel="nofollow">http://www.jboss.org/teiiddesigner/</a> - or follow the instructions in the Reference Guide to create a "Dynamic VDB" without Teiid Designer.</p>

<p>Once you have a "VDB" built it can be deployed/undeployed in Teiid runtime in different ways.</p>

<div class='panelMacro'><table class='warningMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/author/images/icons/emoticons/forbidden.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>If VDB versioning is not used to give distinct version numbers, overwriting a VDB of the same name will terminate all connections to the old VDB.  It is recommended that VDB versioning be used for production systems.</td></tr></table></div>

<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/author/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>Removing an existing VDB will immediately clean up VDB file resources, but will not automatically terminate existing sessions.</td></tr></table></div>

<h1><a name="DeployingVDBs-DirectFileDeployment"></a>Direct File Deployment</h1>

<p>Copy the VDB file into the</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false" style="font-size:12px; font-family: ConfluenceInstalledFont,monospace;">&lt;jboss-install&gt;/standalone/deployments</pre>
</div></div>
<p>directory. Then create an empty marker file with same name as the VDB with extension ".dodeploy" in the same directory.  For example, if your vdb name is "enterprise.vdb", then marker file name must be "enterprise.vdb.dodeploy". 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. This is mostly designed for quick deployment during development, when the Teiid server is available locally on the developer's machine.</p>

<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/author/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>This only works in the Standalone mode. For Domain mode, you must use one of the other available methods.</td></tr></table></div>

<h1><a name="DeployingVDBs-AdminConsoleDeployment%28Web%29"></a>Admin Console Deployment (Web)</h1>

<p>Use the admin web console at:</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false" style="font-size:12px; font-family: ConfluenceInstalledFont,monospace;">
http://&lt;host&gt;:&lt;port&gt;/admin-console
</pre>
</div></div>

<p>More details for this can be found in the Admin Console VDB deployment section. This is the easiest way to deploy a VDB to a remote server.</p>


<h1><a name="DeployingVDBs-CLIbasedDeployment"></a>CLI based Deployment</h1>

<p>JBoss AS provides command line interface (CLI) for doing any kind of administrative task. Execute</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false" style="font-size:12px; font-family: ConfluenceInstalledFont,monospace;">bin/jboss-cli.sh</pre>
</div></div>

<p>command and run</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false" style="font-size:12px; font-family: ConfluenceInstalledFont,monospace;">
# in stand alone mode
deploy /path/to/my.vdb

# in domain mode
deploy --all-server-groups /path/to/my.vdb
</pre>
</div></div>

<p>to deploy the VDB. Note that in domain mode, you need to either select a particular "server-group" or all available server groups are deployment options. Check out <a href="https://docs.jboss.org/author/display/AS7/Admin+Guide" class="external-link" rel="nofollow">CLI documentation</a> for more general usage of the CLI.</p>


<h1><a name="DeployingVDBs-AdminShellDeployment"></a>AdminShell Deployment</h1>

<p>Teiid provides a groovy based AdminShell scripting tool, which can be used to deploy a VDB. See the "deploy" method.  Consult the <a href="/author/display/TEIID/AdminShell" title="AdminShell">AdminShell</a> documentation for more information. Note that using the AdminShell scripting, you can automate deployment of artifacts in your environment. When using AdminShell, in domain mode, the VDB is deployed to all the available servers.</p>


<h1><a name="DeployingVDBs-AdminAPIDeployment"></a>Admin API Deployment</h1>

<p>The Admin API (look in org.teiid.adminpi.*) provides Java API methods that lets a user connect to a Teiid runtime and deploy a VDB. If you need to programatically deploy a VDB use this method. This method is preferable for OEM users, who are trying to extend the Teiid's capabilities through their applications. When using Admin API, in domain mode, the VDB is deployed to all the servers.</p>
    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;" class="grey">
                        <a href="https://docs.jboss.org/author/users/removespacenotification.action?spaceKey=TEIID">Stop watching space</a>
            <span style="padding: 0px 5px;">|</span>
                <a href="https://docs.jboss.org/author/users/editmyemailsettings.action">Change email notification preferences</a>
</div>
        <a href="https://docs.jboss.org/author/display/TEIID/Deploying+VDBs">View Online</a>
        |
        <a href="https://docs.jboss.org/author/pages/diffpagesbyversion.action?pageId=18646053&revisedVersion=10&originalVersion=9">View Changes</a>
                |
        <a href="https://docs.jboss.org/author/display/TEIID/Deploying+VDBs?showComments=true&amp;showCommentArea=true#addcomment">Add Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>