SQL Server – Stop/Close a Server-Side Trace

This function “sp_trace_setstatus” modifies the current state of the specified trace. Syntax sp_trace_setstatus [ @traceid = ] trace_id , [ @status = ] status Example –See the Ruuning trace SELECT * FROM ::fn_trace_getinfo(NULL) — Stop thr Running Trace EXEC sp_trace_setstatus @traceid = 1 , @status = 0 — Delete the Running trace EXEC sp_trace_setstatus @traceid = 1 , @status = 2 Note: 0 = Stops the specified trace. 1 = Starts the specified trace. 2 = Closes the specified trace

» Read more

SQL Server – Find the expensive queries with Server Side Trace

With the help of this post sharing with you the procedure to find the expensive queries with Server Side trace. First we see how to create a server side trace script. Run the Profiler Trace as mentioned here Go to the File >> Export >> Script Trace Definition >> For SQL Server 2000 or For SQL Server 2005- 2008R2   You will get a Script for Server Side Trace as /****************************************************/ /* Created by: SQL Profiler */ /* Date: 01/11/2011

» Read more

SQL Server – Profiler Trace Vs Server Side Trace

Profiler Trace Profiler Trace using the standard default template supplied by SQL Server with SQL Profiler. SQL Profiler running on a client machine and it is connected to the SQL Server instance over the network. Server Side Trace The Script is used to create Server Side Trace. You can generate for server site trace with the help of SQL Profiler. Difference between Profiler Trace and Server Side Trace (Profiler Trace Vs Server Side Trace) Client-side traces dragged transaction throughput down as

» Read more