Licensing: How To Apply Licenses

Apply New Licenses (Linux)

Apply New Licenses Using Ansible

You apply a new SAS license when your current license has expired, or when you are adding new SAS products to your deployment. If your deployment was performed using Ansible, you can use Ansible to apply a new license. Ansible applies your new license to the CAS controllers—primary and backup—and also to the SAS programming run-time environment.

IMPORTANT When renewing the SAS license for deployments that have a SAS Data Agent, be sure to follow the instructions in Apply New SAS Data Agent Licenses. These steps are required when using either the Ansible or manual steps.
Note: To add a new license without using Ansible, see Apply New Licenses Manually.
  1. Log on to your Ansible controller machine with a user that meets the requirements in Set Up the User Account that Deploys the Software in SAS Viya for Linux: Deployment Guide.
  2. Move the current license files into a backup location.

    Copies of your current license files should reside in your Ansible playbook directory (sas_viya_playbook/, by default).

    The license files are named, SASViyaV0300_order-number_site-number_Linux_x86-64.jwt and SASViyaV0300_order-number_Linux_x86-64.txt.

  3. SAS distributes renewal licenses to customers as file attachments in a renewal order email (ROE). Make sure that your new license files (a .txt file and a .jwt file) reside in your Ansible playbook directory.
    Note: Some SAS Viya products use the text file (.txt). Other products use the JSON web token file (.jwt). Both SAS Cloud Analytic Services (CAS) and the SAS programming run-time environment use the same license.
  4. Modify your Ansible playbook to point to the new license files.

    Open sas_viya_playbook/vars.yml, locate LICENSE_FILENAME and LICENSE_COMPOSITE_FILENAME, and replace the current license file name with the corresponding new license file name.

    Note: The JSON web token license file (.jwt) is also referred to as a composite license.

    Here is an example:

    # The name of the license file on the Ansible machine.
     LICENSE_FILENAME: "SASViyaV0300_09MMMV_Linux_x86-64.txt" 
    
    # The name of the composite license file on the Ansible machine.
    # If both files are present, the playbook will use the
    # composite license file.
     LICENSE_COMPOSITE_FILENAME: "SASViyaV0300_09MMMV_70180938_Linux_x86-64.jwt" 
    
  5. Run the following Ansible command for the default inventory file:
    ansible-playbook -vvv apply-license.yml
    IMPORTANT If you deployed additional CAS servers, run the ansible-playbook command with the -i option using the appropriate inventory file.

    CAS sessions created after you apply the new license automatically update with license information from the new license.

  6. Verify that your SAS Cloud Analytic Services license has been renewed by following the steps in View SAS Cloud Analytic Services License Information.
  7. Verify that your SAS programming run-time license has been renewed by following the steps in View SAS Programming Run-Time License Information.
  8. If you deployed additional CAS servers, then perform Step 5Step 6 on your additional controller and your additional backup controller machines.
  9. If you deployed CAS servers in a multi-tenant environment, then use the following command for each tenant that you want to license:
    ansible-playbook -i inventory.ini -e "@<tenentID>_vars.yml" utility/apply-cas-tenant-license.yml
  10. If your deployment includes SAS Visual Investigator, you must also perform additional steps described in the SAS Visual Invesitgator documentation.

Apply New Licenses Manually

You apply a new SAS license when your current license is about to expire, or when you are adding new SAS products to your deployment. You must apply your license to all CAS controllers—primary and secondary—and also to the SAS programming run-time environment.

IMPORTANT When renewing the SAS license for deployments that have a SAS Data Agent, be sure to follow the instructions in Apply New SAS Data Agent Licenses. These steps are required when using either the Ansible or manual steps.
Note: To add a new license using Ansible, see Apply New Licenses (Linux).
  1. On the machine where the SAS programming run-time environment is deployed, log on as a user that meets the requirements in Set Up the User Account that Deploys the Software in SAS Viya for Linux: Deployment Guide.
  2. Move the current license files into a backup location.

    Your current license files reside in /opt/sas/spre/home/SASFoundation/.

    The license file is named license.

  3. SAS distributes renewal licenses to customers as file attachments in a renewal order email (ROE). Make sure that your new license files (a .txt file and a .jwt file) reside in location that is accessible from your SAS programming run-time machine.
    Note: Some SAS Viya products use the text file (.txt). Other products use the JSON web token file (.jwt). Both SAS Cloud Analytic Services (CAS) and the SAS programming run-time environment use the same license.
  4. Run the following command to apply the license to your SAS programming run-time environment:
    sudo su -s "/bin/sh" -c 
    "/opt/sas/spre/home/SASFoundation/utilities/bin/apply_license
    /path/SASViyaVrelease-number_order-number_site-number_Linux_x86-64.jwt" sas

    where path is the location where the new license file resides.

    Here is an example:

    sudo su -s "/bin/sh" -c 
    "/opt/sas/spre/home/SASFoundation/utilities/bin/apply_license 
    /opt/sas/installfiles/SASViyaV0300_09MMMV_70180938_Linux_x86-64.jwt" sas

    You receive a message that your license has been applied.

  5. Verify that your SAS programming run-time license has been renewed by following the steps in View SAS Programming Run-Time License Information.
  6. On the machine where the CAS controller is deployed, log on as a user that meets the requirements in Set Up the User Account that Deploys the Software in SAS Viya for Linux: Deployment Guide.
  7. Make sure that your new license files (a .txt file and a .jwt file) reside on your CAS controller machine in the following directory: /opt/sas/viya/config/etc/cas/default/.
    IMPORTANT On machines that contain additional CAS servers, the path for the license file is /opt/sas/viya/config/etc/cas/cas-instance-name.
  8. Update the symbolic link for sas_license.txt to point to the new CAS license file. (This should be the .jwt file.)

    Here is an example:

    cd /opt/sas/viya/config/etc/cas/default
    ln -sf SASViyaV0300_09MMMV_70180938_Linux_x86-64.jwt sas_license.txt

    Here is an example for an additional CAS server:

    cd /opt/sas/viya/config/etc/cas/casserver2
    ln -sf SASViyaV0300_09MMMV_70180938_Linux_x86-64.jwt sas_license.txt

    CAS sessions created after you apply the new license automatically update with information from the new license file.

  9. If you are running a multi-tenant deployment and have multiple CAS servers on a single machine, repeat Step 7Step 8 for each tenant instance of the CAS server (for example, /opt/sas/tenant-1/config/etc/cas/default, /opt/sas/tenant-2/config/etc/cas/default, and so on).
  10. If you have a distributed CAS server, repeat Step 6Step 8 for each CAS worker node machine.
  11. Verify that your SAS Cloud Analytic Services license has been renewed by following the steps in View SAS Cloud Analytic Services License Information.
  12. If you deployed a CAS backup controller (also referred to as a secondary controller), then perform Step 7Step 11 on your backup controller machine.
  13. If you deployed additional CAS servers, then perform Step 7Step 11 on your additional controller and your additional backup controller machines.
  14. Check the administration documentation for your SAS Viya products in case there are additional steps required for applying a license. Specifically, if your deployment includes SAS Visual Investigator, you must also perform additional steps described in the SAS Visual Invesitgator documentation.

Apply New SAS Data Agent Licenses

SAS Data Agent has special licensing instructions. Apply a new SAS Data Agent license with the following steps:

  1. Determine which machines are assigned to the DataAgent host group. This information is found in the sas_viya_playbook/inventory.ini file.
  2. On each of these machines, copy the new text license file to /opt/sas/viya/config/etc/dagentsrv/default/setinit.txt.
  3. Ensure that ownership of this file is sas:sas and Read and Write permissions are set to mode 660.
  4. Restart the sas-viya-dagentsrv-default service.

In multi-tenant environments, repeat these steps for each tenant to update the file at /opt/sas/tenant/config/etc/dagentsrv/default/setinit.txt, set the owner of the file as the tenant administrator, and restart sas-tenant-dagentsrv-default on each tenant.

Apply New Licenses (Windows)

You apply a new SAS license when your current license is about to expire, or when you are adding new SAS products to your deployment. The license file is used by both SAS Foundation and SAS Cloud Analytic Services (CAS).

  1. Log on to the SAS Viya machine as a user that is a member of the Windows Administrators group.
  2. Move the current license files into a backup location.

    Copies of your current license files should reside in the directory where your SAS Viya deployment scripts were created.

    TipIf you followed the recommendation in the SAS Viya for Windows: Deployment Guide your deployment scripts and license files reside underneath \sas\install.

    The license files are named, SASViyaV0300_order-number_Win_x64_Wrkstn_Srv.jwt and SASViyaV0300_order-number_Win_x64_Wrkstn_Srv.txt.

  3. SAS distributes renewal licenses to customers as file attachments in a renewal order email (ROE). Make sure that your new license files (a TXT file and a JWT file) reside in the same directory as your SAS Viya deployment scripts.
    Note: Some SAS Viya products use the text file (TXT). Other products use the JSON web token file (JWT). Both SAS Cloud Analytic Services (CAS) and SAS Foundation use the same license.
  4. Change to the deployment scripts directory, open the file, vars.psd1, and modify the license file names to match the new license file name.

    Here is an example:

    COMPOSITE_LICENSE_FILENAME = "SASViyaV0300_09ML1N_70196364_Win_x64_Wrkstn_Srv.jwt"
    LICENSE_FILENAME = "SASViyaV0300_09ML1N_Win_x64_Wrkstn_Srv.txt"
  5. Run the following command to apply your new SAS license:

    setup.bat -apply-license

    CAS sessions created after you apply the new license are not automatically updated with the new license information. You must restart CAS for the new license to take effect. Note that this behavior is different on Windows and Linux.

  6. Verify that your SAS Foundation license has been renewed by following the steps in View SAS Programming Run-Time License Information.
  7. Verify that your SAS Cloud Analytic Services license has been renewed by following the steps in View SAS Cloud Analytic Services License Information.
Last updated: May 12, 2025