Loading
  • DAWN H (Flexera Software)

    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
    Expand Post
  • ChrisG (Flexera Software)

    Try following statements to delete all custom property definitions:

     

    DELETE FROM dbo.ComplianceUserTypePropertyDELETE FROM dbo.ComplianceComputerTypePropertyDELETE FROM dbo.VMHostPropertyDELETE FROM dbo.PurchaseOrderPropertyDELETE FROM dbo.PurchaseOrderDetailPropertyDELETE FROM dbo.VendorPropertyDELETE FROM dbo.ContractPropertyDELETE FROM dbo.AssetTypePropertyDELETE FROM dbo.SoftwareTitlePropertyDELETE FROM dbo.SoftwareLicenseTypePropertyDELETE FROM dbo.ImportedVMHostPropertyDELETE 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.%'

     

     

    Expand Post

Loading
How to remove all custom properties