Showing posts with label trace. Show all posts
Showing posts with label trace. Show all posts

Saturday, February 25, 2012

Can anyone help explain 'XactSequence' in profiler trace

Hi All

Can you explain the column 'XactSequence' in detail in SQL Server 2005 profiler trace?

Thanks in advance.

transaction sequence.

|||

Thanks, can you let me know the difference between transaction sequence and transaction id? Also, for dtc transaction, does it have transaction sequence?

|||

They're not the same. Think of a sql job where you have multiple job steps. So, the jobid is not the same as the jobstepid. It's a 1-to-many relationship.

|||

Thanks. But when will SQL create a XactSequence for the specified SQL transaction? Also, will DTC transaction have XactSequence?

Sunday, February 19, 2012

Can a trace slow down a server?

Hi

I was wondering. Can a trace slow down a server? If so, is it significant?

I got a trace that catch about 300-400 event /hour with the filter on that write its result in a .trc file used later to help analyse indexes.

Could this trace slow down a server?

Any sort of monitoring is going to have a performance hit. Unfortunately it is difficult to quantify. I would guess that the more events you capture the more impact it will have.
Try running performance monitor to assess the impact of your trace. Include the usual counters Processor, Memory and Hard disk counters (e.g. Memory : Available MBytes, Memory : Pages/sec, Processor : %Processor time, Process: Page Faults/sec, Hard disk : % Disk time, System : Context switches).
So stop the trace, start Performance monitor with your counters added, wait for a baseline to be established then restart your trace, then assess the impact.
You could use the "Index Tuning Wizard" or "Display Estimated Execution plan" in Query Analyser to analyse the effectiveness of your queries.

Can a stored procedure be viewed with trace?

Ok this should be easy but I haven't found an aswer.

I have a stored procedure in a SQL Server database I use it to add new records to a table. I assign values to parameters and ExecuteNonQuery();

I'm getting an error input string invalid. I'm sure its due to null values which I can troubleshoot on my own.

I know how to view the contents of an inline sql statement in classic ASP such as mySQL = "Select authors from pubs" and then Response.Write mySQL. But how do I do this for a stored procedure in .NET?

Tracing for the page is on. I've tried Trace.Write (sqlCommand1.CommandText); but I don't see the command text.

What am I missing?OK Got It. Went into SQL Server and used SQL Server Profiler.

Thursday, February 16, 2012

Can a profiler trace be scheduled?

I need to run a Sql Profiler Trace on one of our sql server 2000 instances at 3:00 AM but rather than getting up at 3, I would rather schedule a trace to run. Can this be done? If so, where can I see an example?

Thanks

Yes.. you can do that... You can write your own script using sql tracing SP and functions.

Read :http://msdn2.microsoft.com/en-us/library/ms191006.aspx

http://vyaskn.tripod.com/server_side_tracing_in_sql_server.htm

The other way is ... you make a trace using the Profiler Tool and then you can script it. Once you create the script run the script using job...

Madhu