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 Code | Message | Value |
---|---|---|
536871012 | TABLEAU_ERROR_LICENSING_GENERAL | An unknown error occurred during the licensing operation. |
536871013 | TABLEAU_ERROR_LICENSING_INTERNAL | The product is unable to start due to an internal licensing error. |
536871014 | TABLEAU_ERROR_LICENSING_SETUP | The product is unable to start due to an internal licensing error. |
536871015 | TABLEAU_ERROR_LICENSING_CONNECT | An error occurred contacting the Tableau licence server. |
536871017 | TABLEAU_ERROR_LICENSING_ACTIVATION_ASR | An error occurred while activating the ASR. |
536871016 | TABLEAU_ERROR_LICENSING_ACTIVATION_GENERAL | Activation failed, please try again. |
536871018 | TABLEAU_ERROR_LICENSING_ACTIVATION_INVALID_KEY | Invalid product key. |
536871019 | TABLEAU_ERROR_LICENSING_ACTIVATION_OFFLINE | Unable to complete offline activation. |
536871020 | TABLEAU_ERROR_LICENSING_ACTIVATION_INVALID_MODEL | An error was returned from the licence server. Check the Tableau log file for more information. |
536871021 | TABLEAU_ERROR_LICENSING_ACTIVATION_MAX_REHOSTS | Failed to deactivate the licence because you have reached the limit of deactivations for this licence. |
536871033 | TABLEAU_ERROR_LICENSING_ACTIVATION_MAX_EXTRA_ACTIVATIONS | Failed to activate the licence because you have reached the limit of activations for this licence. |
536871022 | TABLEAU_ERROR_LICENSING_UNLICENSED_GENERAL | An unknown error occurred during the unlicensing operation. Check your product key or contact support. |
536871023 | TABLEAU_ERROR_LICENSING_UNLICENSED_NONE_FOUND | No licences found. |
536871024 | TABLEAU_ERROR_LICENSING_UNLICENSED_EXPIRED | Only expired product keys were found. |
536871025 | TABLEAU_ERROR_LICENSING_UNLICENSED_EXPIRED_TRIAL | Your trial for this version has ended. |
536871026 | TABLEAU_ERROR_LICENSING_UNLICENSED_EXPIRED_SUBSCRIPTION | The product key is expired. |
536871027 | TABLEAU_ERROR_LICENSING_UNLICENSED_EXPIRED_MAINTENANCE | Maintenance has expired. |
536871028 | TABLEAU_ERROR_LICENSING_RESYNC_GENERAL | Your product keys could not be synchronised. |
536871029 | TABLEAU_ERROR_LICENSING_REGISTRATION_GENERAL | An error occurred during product registration. |
536871030 | TABLEAU_ERROR_LICENSING_SERVICE_INSTALL | An unknown error occurred during licensing operations. |
536871031 | TABLEAU_ERROR_LICENSING_SERVICE_UNINSTALL | An unknown error occurred during licensing operations. |
536871032 | TABLEAU_ERROR_LICENSING_SERVICE_NOT_PRESENT | The FLEXnet licensing service is not present on the system. |