Quantcast
Channel: Ivanti User Community : All Content - Inventory
Viewing all articles
Browse latest Browse all 730

How to prevent Inventory scans from deadlocking on the ConnStats table

$
0
0

Applies to:

LDMS 9.6 & 9.6 SP1.

Does not apply to 9.6 SP2 as the issue is resolved in the schema design.

Some LANDESK Management Suite users who utilize 2 or more DB threads to insert inventory scans have experienced exceptions described below.

NOTE: This document only applies to 9.6 and 9.6 SP1 Cores experiencing deadlocks specifically on the ConnStats table. Deadlocks on any other table are unrelated to this document.


Issue

In the above conditions some inventory scans are throwing exceptions in the Core Server Windows Application Log such as:

Database exception: SCA111.SCN, LDInv.dll

-2147467259

Transaction (Process ID 1111) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

DELETE (1111): CONNSTATS.ConnStats_Idn in (1111), Thread ID: 11111


Resolution

 

Connstats already has an index on its primary key to allow for console lookups and sorting. However because the ConnStats table is many to one (many records to one device) an index should be added on the connstats_idn column to allow the database to delete records more efficiently while processing scans.

 

  1. Apply 9.6 SP2 (once available) to your Core Server. This Service Pack will make the necessary changes to the database

OR

  1. The following Script will make the same changes to the schema as 9.6 SP2. Applying SP2 afterwards will retain the changes made by the script below.
  2. Take a full backup of your database.
  3. During a maintenance window stop the LANDESK Inventory Server Service on the Core Server.
  4. Change the Script below, replace ulddb with your database name on the USE line. Run the Script. Once the Script runs restart the Inventory Server Service.

 

USE [ulddb]

GO

 

/****** Object:  Index [XIFConnStats]    Script Date: 04/16/2015 14:01:01 ******/

CREATE NONCLUSTERED INDEX [XIFConnStats] ON [dbo].[ConnStats]

(

  [ConnStats_Idn] ASC

)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]

GO


Viewing all articles
Browse latest Browse all 730

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>