Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
Programming
»
General
»
Count primary key violations on a table
Count primary key violations on a table
Rate Topic
Display Mode
Topic Options
Author
Message
andy.richman
andy.richman
Posted Monday, November 12, 2012 11:32 AM
Forum Newbie
Group: General Forum Members
Last Login: Wednesday, May 15, 2013 1:29 PM
Points: 1,
Visits: 24
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
Kingston Dhasian
Kingston Dhasian
Posted Tuesday, November 13, 2012 11:33 PM
SSCrazy
Group: General Forum Members
Last Login: Yesterday @ 4:40 AM
Points: 2,198,
Visits: 4,148
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 »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.