Who is filling a SQL table?

Posted on 2012-08-23
Last Modified: 2012-09-07
I have to find how a user table is being filled.  The table is used in a dashboard but we cannot identify when or how it is being updated, we just know that it is.  The only stored procedure that references the table just reads it.  No SQL job I can find writes to it.

I have renamed the table and am waiting to see if anything breaks but this seems drastic.  There has to be a better way.

Does anyone have any ideas?
Question by:baytowel
    LVL 15

    Expert Comment

    Run a trace in SQL Server Profiler, you will find the details.
    LVL 13

    Expert Comment

    Simplest way is perhaps to create the trigger on insert and capture some information there (login name, app name, etc).

    SQL profiler would work too if you want to parse TextData for sql statements.

    There are other ways, of course, extended events, audit, etc but trigger perhaps is the simplest. Just don't forget to drop it when you are done

    Author Comment

    Thanks for the suggestions.  I looked into the trace but i am not a DBS so it seems pretty intimidating.

    The idea of a trigger I understand but I have no idea what info should be captured or where that info resides.


    LVL 7

    Accepted Solution

    If you're not a DBA, you might have a little reading to do. The links below show the overview of how a trigger works and have working samples.

    Author Closing Comment

    Close this question.  I will have to hire a local dba to get the solution because I can not personally carry out their suggestions.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
    This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
    This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
    Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

    755 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

    25 Experts available now in Live!

    Get 1:1 Help Now