- Flexera Community
- :
- FlexNet Manager
- :
- FlexNet Manager Forum
- :
- How to remove all custom properties
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to remove all custom properties
This thread has been automatically locked due to inactivity.
To continue the discussion, please start a new thread.
- Mark as New
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You would have to do this for each Object Type - but below is an example that removes all Custom Properties on Assets....
-- delete properties for refresh - get ALL Properties for Assets and delete
DECLARE ap_cursor CURSOR FOR
select distinct PropertyName
from AssetTypeProperty
DECLARE @return_value int
DECLARE @ap_propertyName nvarchar(500)
OPEN ap_cursor
FETCH ap_cursor into @ap_propertyName
WHILE @@FETCH_STATUS=0
BEGIN
EXEC @return_value = [dbo].[DeleteAssetProperty] @ap_propertyName
FETCH NEXT FROM ap_cursor into @ap_propertyName
END
-- Close and deallocate the cursor
CLOSE ap_cursor
DEALLOCATE ap_cursor
- Mark as New
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try following statements to delete all custom property definitions:
DELETE FROM dbo.ComplianceUserTypeProperty DELETE FROM dbo.ComplianceComputerTypeProperty DELETE FROM dbo.VMHostProperty DELETE FROM dbo.PurchaseOrderProperty DELETE FROM dbo.PurchaseOrderDetailProperty DELETE FROM dbo.VendorProperty DELETE FROM dbo.ContractProperty DELETE FROM dbo.AssetTypeProperty DELETE FROM dbo.SoftwareTitleProperty DELETE FROM dbo.SoftwareLicenseTypeProperty DELETE FROM dbo.ImportedVMHostProperty DELETE FROM dbo.ImportedComputerCustomProperty -- Delete report column definitions for all custom properties. -- WARNING: This statement should be safe as long as the only custom columns defined are for custom properties. -- If your environment has other custom columns defined, you may need to consider whether to change the WHERE clause -- conditions to only delete what you want. DELETE FROM dbo.ComplianceSearchTypeColumn
WHERE ComplianceSearchTypeColumnID >= 10000 AND ColumnName LIKE '%Custom.%'
