Automate Licensing Tasks

Several command line options allow you to perform common licensing tasks for Tableau Server using automated scripts.

If you want to perform these licensing tasks for Tableau Desktop using automated scripts, see Deploy Tableau Desktop(Link opens in a new window) in the Desktop Deployment Guide.

Command Line Tool Options and Better Script Automation

You can use a utility called tabinstallck.exe to script the activation, refresh and deactivation of server product keys. tabinstallck.exe is installed in the Tableau Server \bin directory on the initial node. By default, this is:

C:\Program Files\Tableau\Tableau Server\packages\bin.<version_code>

You can also use tsm licenses to perform licensing tasks such as activating or deactivating a Tableau Server product key on- or off-line, and getting associated files for offline activation or deactivation. However, Tableau Server must already be deployed and configured. You can automate these licensing tasks using the Tableau Services Manager API. In addition, tabinstallck.exe provides a way to script the licensing step for a new Tableau Server installation that is not completely configured.

To use tabinstallck.exe, you need to run the commands or script as an administrator on the primary Tableau Server node.

Note: tabinstallck.exe does not support offline activation and deactivation. To learn more, see Activate Tableau Server Offline.

Product key operations with forward proxy servers

If the computer where you are running Tableau Server has been configured to connect to the internet through a forward proxy, follow the procedure in the topic, Configure Product Key Operations with Forward Proxy, before attempting to activate, refresh or deactivate product keys.

Activate

Activate a Tableau Server licence using the -activate option:

start/wait tabinstallck.exe -activate <product_key>

Refresh

Refresh a Tableau Server licence using the -refresh option:

start/wait tabinstallck.exe -refresh <product_key>

Deactivate

Deactivate a Tableau Server licence using the -return option:

start/wait tabinstallck.exe -return <product_key>

Example

An example of a script to activate Tableau Server might look like this:

@echo off
start/wait tabinstallck.exe -activate <product_key>
if %errorlevel% EQU 0 (ECHO SUCCESS) ELSE (ECHO FAILED)

Error Handling

When you use tabinstallck.exe to automate Tableau Server licensing tasks, status information is returned as an exit code in the ERRORLEVEL environment variable. If activation was successful, the exit code is 0 (zero). The table below lists exit codes from the activation process and what they mean. You can also find error information in the tabinstallck.log file. This log file is located in the Tableau Server \logs folder, by default:

C:\ProgramData\Tableau\Tableau Server\data\tabsvc\logs\

The ProgramData folder is hidden by default.

This example script shows how to activate Tableau Server and check for specific errors, such as an invalid product key (536871018) and general licensing issues (536871012).

@echo off
start/wait tabinstallck.exe -activate  <product_key>
if %errorlevel% EQU 536871018 (ECHO TABLEAU_ERROR_LICENSING_INVALID_KEY)
if %errorlevel% EQU 536871012 (ECHO TABLEAU_ERROR_LICENCING_GENERAL)
if %errorlevel% EQU 0 (ECHO SUCCESS)
Exit CodeMessageValue
536871012TABLEAU_ERROR_LICENSING_GENERALAn unknown error occurred during the licensing operation.
536871013TABLEAU_ERROR_LICENSING_INTERNALThe product is unable to start due to an internal licensing error.
536871014TABLEAU_ERROR_LICENSING_SETUPThe product is unable to start due to an internal licensing error.
536871015TABLEAU_ERROR_LICENSING_CONNECTAn error occurred contacting the Tableau licence server.
536871017TABLEAU_ERROR_LICENSING_ACTIVATION_ASRAn error occurred while activating the ASR.
536871016TABLEAU_ERROR_LICENSING_ACTIVATION_GENERALActivation failed, please try again.
536871018TABLEAU_ERROR_LICENSING_ACTIVATION_INVALID_KEYInvalid product key.
536871019TABLEAU_ERROR_LICENSING_ACTIVATION_OFFLINEUnable to complete offline activation.
536871020TABLEAU_ERROR_LICENSING_ACTIVATION_INVALID_MODELAn error was returned from the licence server. Check the Tableau log file for more information.
536871021TABLEAU_ERROR_LICENSING_ACTIVATION_MAX_REHOSTSFailed to deactivate the licence because you have reached the limit of deactivations for this licence.
536871033TABLEAU_ERROR_LICENSING_ACTIVATION_MAX_EXTRA_ACTIVATIONSFailed to activate the licence because you have reached the limit of activations for this licence.
536871022TABLEAU_ERROR_LICENSING_UNLICENSED_GENERALAn unknown error occurred during the unlicensing operation. Check your product key or contact support.
536871023TABLEAU_ERROR_LICENSING_UNLICENSED_NONE_FOUNDNo licences found.
536871024TABLEAU_ERROR_LICENSING_UNLICENSED_EXPIREDOnly expired product keys were found.
536871025TABLEAU_ERROR_LICENSING_UNLICENSED_EXPIRED_TRIALYour trial for this version has ended.
536871026TABLEAU_ERROR_LICENSING_UNLICENSED_EXPIRED_SUBSCRIPTIONThe product key is expired.
536871027TABLEAU_ERROR_LICENSING_UNLICENSED_EXPIRED_MAINTENANCEMaintenance has expired.
536871028TABLEAU_ERROR_LICENSING_RESYNC_GENERALYour product keys could not be synchronised.
536871029TABLEAU_ERROR_LICENSING_REGISTRATION_GENERALAn error occurred during product registration.
536871030TABLEAU_ERROR_LICENSING_SERVICE_INSTALLAn unknown error occurred during licensing operations.
536871031TABLEAU_ERROR_LICENSING_SERVICE_UNINSTALLAn unknown error occurred during licensing operations.
536871032TABLEAU_ERROR_LICENSING_SERVICE_NOT_PRESENTThe FLEXnet licensing service is not present on the system.
Thanks for your feedback!Your feedback has been successfully submitted. Thank you!