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.
To manually delete tenants from a multi-tenanted environment (while databases remain online):
FNMP
FNMPDatabaseWarehouse
FNMPInventorydatabase
FNMP
FNMPDatabaseWarehouse
FNMPInventorydatabase
Sep 25, 2019 01:39 PM - edited Nov 05, 2020 04:36 PM
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...
greetings
Steffen
Hi Steffen,
The script has been tested with 2019 R1 and later.
@GregBirk
Hi,
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:
.../Suite/Tenants/Select
The URL of the tenant shows only:
.../Suite/Tenant/TenantUID/Login/Failure/TenantInvalid
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
Hi,
also to use the script with e.g. 3 multiple tenant UIDs was working.
Please aware about these points:
Hi,
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
Hi,
when the script delete a tenant in the database FNMPInventorydatabase,
for some tenants the script finished with: Query completed with errors.
The check shows these messages with: The statement has been terminated.
a)
Deleting data for tenant 6 [2019-10-24 08:29:09.170]
Msg 2627, Level 14, State 1, Line 1
Violation of UNIQUE KEY constraint 'UQ_Organization'. Cannot insert duplicate key in object 'dbo.Organization_MT'. The duplicate key value is (<NULL>, , 6).
The statement has been terminated.
b)
Processing dbo.Domain_MT [2019-10-24 08:33:00.000]
Msg 547, Level 16, State 0, Line 1
The DELETE statement conflicted with the REFERENCE constraint "FK_Organization_Domain". The conflict occurred in database "IM", table "dbo.Organization_MT".
The statement has been terminated.
Processing dbo.Organization_MT [2019-10-24 08:33:00.110]
Msg 547, Level 16, State 0, Line 1
The DELETE statement conflicted with the REFERENCE constraint "FK_Domain_ID". The conflict occurred in database "IM", table "dbo.Domain_MT".
The statement has been terminated.
Can you please check?
Best regards
Hi,
the script didn't delete the entries of the deleted tenants in
[FNMP].[dbo].[BatchProcessSchedule]
.
Please check:
SELECT * FROM [FNMP].[dbo].[BatchProcessSchedule]
.
That means
SELECT * FROM [FNMP].[dbo].[BatchProcessExecution]
WHERE Submitted >= '2020-09-03 02:00' and Output = 'Message validation failed'
order by BatchProcessExecutionID
shows a lot of failed batch processes of the deleted tenants.
A new version of the TenantDeletion-Offline.sql file is now attached to this article, fixing known issues with the previous version.