469,625 Members | 1,127 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,625 developers. It's quick & easy.

is there a way using sqlexpress to review the most recent set of sql commands submitted to a database?

is there a way using sqlexpress to review the most recent set of sql commands
submitted to a database?
I remember something about setting up logging in sql server 2000, but don't
see much about this on google or the news group for 2005.
thanks
Jeff Kish
May 18 '07 #1
2 1565
Jeff Kish (je*******@mro.com) writes:
is there a way using sqlexpress to review the most recent set of sql
commands submitted to a database?
I remember something about setting up logging in sql server 2000, but
don't see much about this on google or the news group for 2005.
You could set up a server-side trace for this, look up the sp_trace_xxx
functions in Books Online.

The lazy way to run a trace is to use Profiler, but Profiler does not
ship with SQL Express. Then again, longer tracing in production systems
is best done with server-side traces as they take less resources. Yet
then again, it's convenient to have Profiler, as you can define the
trace in Profiler and then export the trace definition as an SQL script.

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
May 18 '07 #2
On Fri, 18 May 2007 20:45:24 +0000 (UTC), Erland Sommarskog
<es****@sommarskog.sewrote:
>Jeff Kish (je*******@mro.com) writes:
>is there a way using sqlexpress to review the most recent set of sql
commands submitted to a database?
I remember something about setting up logging in sql server 2000, but
don't see much about this on google or the news group for 2005.

You could set up a server-side trace for this, look up the sp_trace_xxx
functions in Books Online.

The lazy way to run a trace is to use Profiler, but Profiler does not
ship with SQL Express. Then again, longer tracing in production systems
is best done with server-side traces as they take less resources. Yet
then again, it's convenient to have Profiler, as you can define the
trace in Profiler and then export the trace definition as an SQL script.
Oh thanks.
I have sql server 2000 also on the machine, however I'm trying not to use it
as 2005 is the preferred microsoft platform for db's.
i'll check out the online books.
thanks much
Jeff Kish
May 20 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by andrewcw | last post: by
5 posts views Thread by cover | last post: by
1 post views Thread by xcelmind | last post: by
14 posts views Thread by raylopez99 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.