Fault finidng in MS SQL Server 2008

Posted on 2011-10-20
Last Modified: 2012-05-12
I have an application that is running on SQL Server 2008.  It has been runing without problem for a number of years now.

However now it has started having a few problems.  It often reports key violations on one of the tables.  As i know the user is not entering invalid data i must assume that somewhere in my application, or in the database, there are problems.

I was wondering if there are any error logs that might help?  EIther ones produced by SQL Server, or by the OS.  I suspect problems with indexes, or space, log sizes etc...

Question by:soozh
    LVL 142

    Expert Comment

    by:Guy Hengel [angelIII / a3]
    if you get "key violations", this is usually a logical error in some UPDATE, DELETE or INSERT code of your application.
    like it tries to insert a row with a key that already exists.

    there will be no other "error log" than the reported error that can help.
    get the application code, compare with data, test on test/copy db etc ...

    Author Comment

    i understand why and how key violation is caused.  What i am looking for is if there are some logs that SQL Server keeps.

    I remember a problem like this last year that was caused by the lack of space or something like that.  So i want to be able to examine the health of the database...
    LVL 142

    Accepted Solution

    >What i am looking for is if there are some logs that SQL Server keeps.
    none about those errors as such.

    > So i want to be able to examine the health of the database...
    check out the ERRORLOG file of sql server ...

    Author Comment

    where can i find that?
    LVL 75

    Assisted Solution

    by:Anthony Perkins
    Under Management | SQL Server Logs in SSMS.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
    How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now