Link to home
Start Free TrialLog in
Avatar of baytowel
baytowelFlag for United States of America

asked on

Who is filling a SQL table?

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?
Avatar of Anuj
Anuj
Flag of India image

Run a trace in SQL Server Profiler, you will find the details.
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
Avatar of baytowel

ASKER

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.

Hints?

thanks.
ASKER CERTIFIED SOLUTION
Avatar of sqlxl
sqlxl
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Close this question.  I will have to hire a local dba to get the solution because I can not personally carry out their suggestions.