Sunday, February 19, 2012
How can I track what canges a field?
many codebases that hit that database. One of the programs is inacuratly
adjusting the stock field and none of them log they're activity. Outside of
a bunch of programming (which will be done eventually) is there any way I
can track what changed the value and when? The only thing I can think of is
running a trace with SQL Profiler but I think I have to capture all activity
for the database, not just the spisific table or record, or field. The
database has way to much activity to trace for more than a few min. and we
may go a day or so before having a problem.Perhaps you can create a trigger that writes to a log table each time the
column is updated. You can record when, by whom and sometime the
application.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"Bishop" <nospam@.nospam.com> wrote in message
news:%23KZCFKeWIHA.5164@.TK2MSFTNGP03.phx.gbl...
I'm guessing there is no easy way to do this. I inherated a database and
many codebases that hit that database. One of the programs is inacuratly
adjusting the stock field and none of them log they're activity. Outside of
a bunch of programming (which will be done eventually) is there any way I
can track what changed the value and when? The only thing I can think of is
running a trace with SQL Profiler but I think I have to capture all activity
for the database, not just the spisific table or record, or field. The
database has way to much activity to trace for more than a few min. and we
may go a day or so before having a problem.|||Wow, triggers are cool, that's exactly what I needed. Thanks!
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:e1VvXOeWIHA.2268@.TK2MSFTNGP02.phx.gbl...
> Perhaps you can create a trigger that writes to a log table each time the
> column is updated. You can record when, by whom and sometime the
> application.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "Bishop" <nospam@.nospam.com> wrote in message
> news:%23KZCFKeWIHA.5164@.TK2MSFTNGP03.phx.gbl...
> I'm guessing there is no easy way to do this. I inherated a database and
> many codebases that hit that database. One of the programs is inacuratly
> adjusting the stock field and none of them log they're activity. Outside
> of
> a bunch of programming (which will be done eventually) is there any way I
> can track what changed the value and when? The only thing I can think of
> is
> running a trace with SQL Profiler but I think I have to capture all
> activity
> for the database, not just the spisific table or record, or field. The
> database has way to much activity to trace for more than a few min. and we
> may go a day or so before having a problem.
>
How can I track what canges a field?
many codebases that hit that database. One of the programs is inacuratly
adjusting the stock field and none of them log they're activity. Outside of
a bunch of programming (which will be done eventually) is there any way I
can track what changed the value and when? The only thing I can think of is
running a trace with SQL Profiler but I think I have to capture all activity
for the database, not just the spisific table or record, or field. The
database has way to much activity to trace for more than a few min. and we
may go a day or so before having a problem.
Perhaps you can create a trigger that writes to a log table each time the
column is updated. You can record when, by whom and sometime the
application.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"Bishop" <nospam@.nospam.com> wrote in message
news:%23KZCFKeWIHA.5164@.TK2MSFTNGP03.phx.gbl...
I'm guessing there is no easy way to do this. I inherated a database and
many codebases that hit that database. One of the programs is inacuratly
adjusting the stock field and none of them log they're activity. Outside of
a bunch of programming (which will be done eventually) is there any way I
can track what changed the value and when? The only thing I can think of is
running a trace with SQL Profiler but I think I have to capture all activity
for the database, not just the spisific table or record, or field. The
database has way to much activity to trace for more than a few min. and we
may go a day or so before having a problem.
|||Wow, triggers are cool, that's exactly what I needed. Thanks!
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:e1VvXOeWIHA.2268@.TK2MSFTNGP02.phx.gbl...
> Perhaps you can create a trigger that writes to a log table each time the
> column is updated. You can record when, by whom and sometime the
> application.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "Bishop" <nospam@.nospam.com> wrote in message
> news:%23KZCFKeWIHA.5164@.TK2MSFTNGP03.phx.gbl...
> I'm guessing there is no easy way to do this. I inherated a database and
> many codebases that hit that database. One of the programs is inacuratly
> adjusting the stock field and none of them log they're activity. Outside
> of
> a bunch of programming (which will be done eventually) is there any way I
> can track what changed the value and when? The only thing I can think of
> is
> running a trace with SQL Profiler but I think I have to capture all
> activity
> for the database, not just the spisific table or record, or field. The
> database has way to much activity to trace for more than a few min. and we
> may go a day or so before having a problem.
>
How can I track the queries being issued against my sql server 2000 instance?
I have an ASP.NET app built on top of SQL Server 2000. My app is running slowly and I think I'm issuing too many queries to the database.
How can I track the queries, and when they are being issued, against my sql server 2000 instance? Is there a tool to view the queries, or is it all in a log file somewhere?
This will help me tune my ASP.NET caching strategy.
Any help is greatly appreciated!
Franco
Use SQL Server Profiler|||Choose: SQL Server, Tools, SQL Profile, File, New, Trace, Choose Server...On the filters tab of the new window you see you can choose various filters. These include database name, application name, NT UserName, there are many to choose from.
SQL Profiler is an amazing tool for seeing whats happening "under the hood" I suggest you really read up on it in SQL Books Online as its extremely powerful.
Keep us all up to date with how you are getting on.
hth
Pace
|||Fantastic... just what I needed. Thanks!
How can I track the queries being issued against my sql server 2000 instance?
I have an ASP.NET app built on top of SQL Server 2000. My app is running slowly and I think I'm issuing too many queries to the database.
How can I track the queries, and when they are being issued, against my sql server 2000 instance? Is there a tool to view the queries, or is it all in a log file somewhere?
This will help me tune my ASP.NET caching strategy.
Any help is greatly appreciated!
Franco
Use SQL Server Profiler|||Choose: SQL Server, Tools, SQL Profile, File, New, Trace, Choose Server...On the filters tab of the new window you see you can choose various filters. These include database name, application name, NT UserName, there are many to choose from.
SQL Profiler is an amazing tool for seeing whats happening "under the hood" I suggest you really read up on it in SQL Books Online as its extremely powerful.
Keep us all up to date with how you are getting on.
hth
Pace
|||Fantastic... just what I needed. Thanks!