Showing results for 
Search instead for 
Did you mean: 

Deleting Tenants from FlexNet Manager Suite while databases remain online

Deleting Tenants from FlexNet Manager Suite while databases remain online


This document is targeted to Managed Service Providers (MSPs) of FlexNet Manager Suite and describes how to delete tenants from a multi-tenanted system without disrupting FlexNet Manager Suite online operations. This is a manual process using the attached SQL script and is supported with FlexNet Manager Suite 2019 R1 and later. This process doesn't involve Broker Tools.  

Deleting tenants from FlexNet Manager Suite while databases remain online

To manually delete tenants from a multi-tenanted environment (while databases remain online):

  1. Important! Contact Engineering to ensure that the following databases have been backed up prior to performing any of the remaining tenant deletion steps:
    • FNMP

    • FNMPDatabaseWarehouse

    • FNMPInventorydatabase  

  2. Download the TenantDeletion-Online.sql file located in the ATTACHMENTS section of this Knowledge Base article.
  3. In TenantDeletion-Offline.sql, update the Set @TenantUID line to include all the tenant UIDs that need to be removed. If specifying multiple tenant UIDs, separate with a space or comma or both:

    Example 1 (To remove a specific TenantUID, (such as 'TAD9HUVMUQ5RHBMY'):

    Example 2 (To remove three tenants):

  4. Note that the deletion process is irreversible. Ensure that you have recent database backups completed from Step 1. The only option to retrieve the deleted data is to restore the database to a previous point in time. If you are sure you're ready to continue, uncomment the following line in the SQL file by removing the two dashes.
    --SET @OutputOrExecute = 'Execute'
  5. Ensure that there is sufficient disk space for the transaction log (where "sufficient" varies depending on the amount of data). If there is not enough space, the SQL script stops with an error such as: 
    The transaction log for database 'FNMP' is full due to 'ACTIVE_TRANSACTION'.
  6. Execute the resulting SQL statement against each of the following databases before the next reconciliation starts so that the tenant is not automatically recreated:
    • FNMP

    • FNMPDatabaseWarehouse

    • FNMPInventorydatabase  

Labels (1)
Was this article helpful? Yes No
100% helpful (1/1)

Thanks a lot for sharing this!

does this script work with 2019R1 and older releases?

In the past I used "KB 000027260 Delete Tenant data for 2018 R1 2019-03-04" for 2018R1 and there where quite a lot of "left overs" especially in AD-Inv.Data etc...



Hi Steffen, 

The script has been tested with 2019 R1 and later.





thanks for providing the script.

The result of the first test to remove a specific tenant looks good.
It takes 5 minutes until the script finished successfully.

Then the tenant was removed from the GUI login:

The URL of the tenant shows only:

Also in the databases in dbo.Tenant the tenant was removed.

I will observe the behavior in the next days after some imports and reconciliation.

Btw, tested on FNMS 2019 R1 Hotfix 1-4 and Update 5

Best regards


also to use the script with e.g. 3 multiple tenant UIDs was working.

Please aware about these points:

  • A tenant with a high number of devices will not finished in 5 minutes per database.
  • Be sure, that you have enough disk space otherwise the script stop with: 
    The transaction log for database 'FNMP' is full due to 'ACTIVE_TRANSACTION'.
    The result can be, that the Flexera GUI shows only an error message and 
    the GUI is not available anymore. It can be that the transaction log needs
    space about 10 or more GB. Hope you have a test system to check it out.
  • Use the script for one tenant against each of the following databases (FNMP, FNMPDatabaseWarehouse, FNMPInventorydatabase)
    before the next reconciliation will started. Otherwise e.g. when you have only
    delete the tenant in FNMP, the tenant will created again in FNMP.


btw... The URL .../Suite/Tenant/TenantUID/Login/Failure/TenantInvalid shows:
Sign In Failure
Your FlexNet Manager Suite license was not found. Please ask your administrator to contact Flexera Support and have your license verified.
Return to FlexNet Manager Suite
"Return to FlexNet Manager Suite" is a link to the URL: .../Suite/Tenant/TenantUID/Login/Relogon
But the tenant was deleted, so this will not work. Perhaps this URL is more helpful: .../Suite/Tenants/Select

Best regards

Version history
Revision #:
13 of 13
Last update:
‎Oct 18, 2019 01:20 PM
Updated by: