<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/Teiid+Management+CLI">Teiid Management CLI</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://docs.jboss.org/author/display/~shawkins">Steven Hawkins</a>
    </h4>
        <br/>
                         <h4>Changes (10)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">Teiid Management CLI is a command line based administrative and monitoring tool for Teiid. This article including a series useful commands for administrate Teiid Server: <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">The AS CLI is a command line based administrative and monitoring tool for Teiid. Many snippets of CLI scripting are shown throughout the Admin Guide - especially around managing data sources.  [AdminShell] provides a binding into the Groovy scripting language and higher level methods that are often needed when interacting with Teiid.  It is still useful to know the underlying CLI commands in many circumstances.  The below is a series useful CLI commands for administering a Teiid Server.  Please also refer to the AS documentation for more on interacting with the CLI - including how to navigate, list operations, etc. <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">h1. Operate VDB <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">h1. VDB Operations <br></td></tr>
            <tr><td class="diff-unchanged" > <br>{panel} <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >{panel} <br> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">h1. Operate Source <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">h1. Source Operations <br></td></tr>
            <tr><td class="diff-unchanged" > <br>{panel} <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >{panel} <br> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">h1. Operate Translator <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">h1. Translator Operations <br></td></tr>
            <tr><td class="diff-unchanged" > <br>{panel} <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >{panel} <br> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">h1. Operate Runtime <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">h1. Runtime Operations <br></td></tr>
            <tr><td class="diff-unchanged" > <br>{panel} <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <p>The AS CLI is a command line based administrative and monitoring tool for Teiid. Many snippets of CLI scripting are shown throughout the Admin Guide - especially around managing data sources.  <a href="/author/display/TEIID/AdminShell" title="AdminShell">AdminShell</a> provides a binding into the Groovy scripting language and higher level methods that are often needed when interacting with Teiid.  It is still useful to know the underlying CLI commands in many circumstances.  The below is a series useful CLI commands for administering a Teiid Server.  Please also refer to the AS documentation for more on interacting with the CLI - including how to navigate, list operations, etc.</p>

<h1><a name="TeiidManagementCLI-VDBOperations"></a>VDB Operations</h1>

<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>deploy adminapi-test-vdb.xml<br/>
undeploy adminapi-test-vdb.xml</p>

<p>/subsystem=teiid:restart-vdb(vdb-name=AdminAPITestVDB, vdb-version=1, model-names=TestModel)</p>

<p>/subsystem=teiid:list-vdbs()<br/>
/subsystem=teiid:get-vdb(vdb-name=AdminAPITestVDB,vdb-version=1)<br/>
/subsystem=teiid:change-vdb-connection-type(vdb-name=AdminAPITestVDB, vdb-version=1,connection-type=ANY)</p>

<p>/subsystem=teiid:add-data-role(vdb-name=AdminAPITestVDB, vdb-version=1, data-role=TestDataRole, mapped-role=test)<br/>
/subsystem=teiid:remove-data-role(vdb-name=AdminAPITestVDB, vdb-version=1, data-role=TestDataRole, mapped-role=test)</p>
</div></div>

<h1><a name="TeiidManagementCLI-SourceOperations"></a>Source Operations</h1>

<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>/subsystem=teiid:add-source(vdb-name=AdminAPITestVDB, vdb-version=1, source-name=text-connector-test, translator-name=file, model-name=TestModel, ds-name=java:/test-file)<br/>
/subsystem=teiid:remove-source(vdb-name=AdminAPITestVDB, vdb-version=1, source-name=text-connector-test, model-name=TestModel)<br/>
/subsystem=teiid:update-source(vdb-name=AdminAPITestVDB, vdb-version=1, source-name=text-connector-test, translator-name=file, ds-name=java:/marketdata-file)</p>
</div></div>

<h1><a name="TeiidManagementCLI-TranslatorOperations"></a>Translator Operations</h1>

<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>/subsystem=teiid:list-translators()<br/>
/subsystem=teiid:get-translator(translator-name=file)<br/>
/subsystem=teiid:read-translator-properties(translator-name=file,type=OVERRIDE)<br/>
/subsystem=teiid:read-rar-description(rar-name=file)</p>
</div></div>

<h1><a name="TeiidManagementCLI-RuntimeOperations"></a>Runtime Operations</h1>

<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>/subsystem=teiid:workerpool-statistics()</p>

<p>/subsystem=teiid:cache-types()<br/>
/subsystem=teiid:clear-cache(cache-type=PREPARED_PLAN_CACHE)<br/>
/subsystem=teiid:clear-cache(cache-type=QUERY_SERVICE_RESULT_SET_CACHE)<br/>
/subsystem=teiid:clear-cache(cache-type=PREPARED_PLAN_CACHE, vdb-name=AdminAPITestVDB,vdb-version=1)<br/>
/subsystem=teiid:clear-cache(cache-type=QUERY_SERVICE_RESULT_SET_CACHE, vdb-name=AdminAPITestVDB,vdb-version=1)<br/>
/subsystem=teiid:cache-statistics(cache-type=PREPARED_PLAN_CACHE)<br/>
/subsystem=teiid:cache-statistics(cache-type=QUERY_SERVICE_RESULT_SET_CACHE)</p>

<p>/subsystem=teiid:engine-statistics()</p>

<p>/subsystem=teiid:list-sessions()<br/>
/subsystem=teiid:terminate-session(session=sessionid)</p>

<p>/subsystem=teiid:list-requests()<br/>
/subsystem=teiid:cancel-request(session=sessionId, execution-id=1)<br/>
/subsystem=teiid:list-requests-per-session(session=sessionId)<br/>
/subsystem=teiid:list-transactions()</p>

<p>/subsystem=teiid:mark-datasource-available(ds-name=java:/accounts-ds)</p>

<p>/subsystem=teiid:get-query-plan(session=sessionid,execution-id=1)</p>
</div></div>
    </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/Teiid+Management+CLI">View Online</a>
        |
        <a href="https://docs.jboss.org/author/pages/diffpagesbyversion.action?pageId=89621120&revisedVersion=2&originalVersion=1">View Changes</a>
                |
        <a href="https://docs.jboss.org/author/display/TEIID/Teiid+Management+CLI?showComments=true&amp;showCommentArea=true#addcomment">Add Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>