?
Solved

Who is filling a SQL table?

Posted on 2012-08-23
5
Medium Priority
?
291 Views
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?
0
Comment
Question by:baytowel
5 Comments
 
LVL 15

Expert Comment

by:Anuj
ID: 38325883
Run a trace in SQL Server Profiler, you will find the details.
0
 
LVL 13

Expert Comment

by:dwkor
ID: 38326666
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
0
 

Author Comment

by:baytowel
ID: 38326693
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.
0
 
LVL 7

Accepted Solution

by:
sqlxl earned 200 total points
ID: 38326880
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.

http://msdn.microsoft.com/en-us/library/ms189799.aspx

http://www.roseindia.net/sql/create-after-insert-trigger.shtml
0
 

Author Closing Comment

by:baytowel
ID: 38377853
Close this question.  I will have to hire a local dba to get the solution because I can not personally carry out their suggestions.
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.

807 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