Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Count primary key violations on a table Expand / Collapse
Author
Message
Posted Monday, November 12, 2012 11:32 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, September 4, 2013 10:10 AM
Points: 1, Visits: 26
Hi,

I am relatively new to SQL Server. I have an app that frequently inserts values with the same key to a table. I need a way to monitor the frequency at which primary key violations are occurring on this table.

It could be real time monitoring or gathering data after the fact. The key is I only want the counts for this 1 table.

Thanks,

Andy
Post #1383797
Posted Tuesday, November 13, 2012 11:33 PM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 2:37 AM
Points: 2,649, Visits: 4,726
One way could be to use an INSTEAD OF trigger

The below mentioned link could be of help to you
http://msdn.microsoft.com/en-us/library/ms175521%28v=sql.105%29.aspx



Kingston Dhasian

How to post data/code on a forum to get the best help - Jeff Moden
http://www.sqlservercentral.com/articles/Best+Practices/61537/
Post #1384396
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse