A way to clean up unused subnets in 7.6 and later

book

Article ID: 171617

calendar_today

Updated On:

Products

Management Platform (Formerly known as Notification Server)

Issue/Introduction

In some environments the list of subnets that are not in use can be very large, causing slowness in retriving the subnet list or to associate subnets to sites.

Environment

SMP 7.6, 8.0, 8.1

Resolution

Please try the following:

1. Update and rebuild indexes for RM_ResourceSubnet and Inv_Subnet tables:

IF  EXISTS (SELECT TOP 1 1 FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].
[RM_ResourceSubnet]') AND name = N'ix_RM_ResourceSubnet_Deleted2')
    DROP INDEX [ix_RM_ResourceSubnet_Deleted2] ON [dbo].[RM_ResourceSubnet]

CREATE INDEX [IDX_RM_ResourceSubnet_Guid_Deleted] ON [dbo].[RM_ResourceSubnet]
( [Guid], [Deleted] )

IF  EXISTS (SELECT TOP 1 1 FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].
[Inv_Subnet]') AND name = N'IDX_Inv_Subnet_Subnet_Mask_ResourceGuid')
AND EXISTS (SELECT TOP 1 1 FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].
[Inv_Subnet]') AND name = N'Idx_Inv_Subnet_Subnet_Mask')
    DROP INDEX [Idx_Inv_Subnet_Subnet_Mask] ON [dbo].[Inv_Subnet]

ALTER INDEX ALL ON [dbo].[RM_ResourceSubnet] REBUILD WITH ( FILLFACTOR = 90,
ONLINE = OFF )
ALTER INDEX ALL ON [dbo].[Inv_Subnet] REBUILD WITH ( FILLFACTOR = 90, ONLINE =
OFF )

2. Use the (standard) "Re-Synchronize Subnets" option to remove unused subnets,

See 'Settings/Notification Server/Site Server Settings' menu
+ 'Subnets' in the left panel
+ push 'Re-Synchronize Subnets' button
+ 'Delete non-managed subnets' check-box

 

3. If the above does not work please use following steps:

- stop NS services
- execute attached SQL-query (see PurgeUnusedSubnets.sql)
- start NS services

 

Attachments

PurgeUnusedSubnets.sql get_app