SQL Nexus, Read Trace Errors Resolved!

Last Monday we started our SQL Nexus journey together in order for me to refresh my knowledge of  this awesome tool.  Near the end of last week, the blog series was delayed due to an error with the ReadTrace and its corresponding report.  Yesterday and again today, I am troubleshooting our attempt to resume our journey but with little hope for correcting the error.  I have posted the error on CodePlex and am awaiting a response.

Yesterday, I referenced a “ReadTrace exit code: -2″ error in the ReadTrace log file.   I did find one page out there on SQL Server Central where Grant Fritchey (Twitter | Blog) had encountered the problem.  After contacting, Grant he told me that the problem that he had was a simple one, he did not have the file and path name correct which corresponded with the file not found error higher up in the ReadTrace log.  However, when cutting and pasting this file straight out of the log, the file opens.  Strange indeed, but Grant got me thinking and thus reading through all of the files looking for a possible mistake in the scripts.  I could not find any.

Keep in mind, this is with running the StartSQLDiagDetailed_Trace2008R2.cmd performance script that I outlined in one of the previous posts.  This simply reference XML files that appear to only outline the performance indicators in which we want to monitor.    It is in the MSDiagProcs.sql script that it identifies the trace files to load and run.  In addition, none of the three scripts will load trace files into the import.

Here is a sample of what is called from the CMD scripts:

H:\PerfScripts\2008R2>”C:\Program Files\Microsoft SQL Server\100\Tools\Binn\SQLdiag.exe” /I “H:\PerfScripts\2008R2\SQLDiagPerfStats_Trace2008.XML” /O “H:\PerfScripts\2008R2\SQLDiagOutput” /P

However, attempts to run this manually through ReadTrace also failed with one of the trace files created by the performance script, such as:

H:\Program Files\Microsoft Corporation\RMLUtils>readtrace.exe -I”H:\PerfScripts\2008R2\SQLDiagOutput\SQLVMDEV10_SQLDIAG__sp_trace.trc” -o”C:\Users\crssqladmin\AppData\Local\Temp\2\RML” -SSQLVMDEV10 -dsqlnexus -E -T18 -f -H!PSSDIAG

However, playing with the file names yielded a different problem.  When I renamed the file taking out the double underscore, ‘__’,  thus resulting in SQLVMDEV10_SQLDIAGsp_trace.trc and SQLVMDEV10_SQLDIAGsp_trace_blk.trc, which seemed odd to me from the beginning, the ReadTrace load now indicated a permissions error.  When I added my administrative account to these two trace files, the ReadTrace worked.  Hmm, weird but interesting.  I wonder now if the SQL Nexus import would load?  See for yourself:

SQL Nexus Import Successful

 Enjoy and I hope this helps if you encountered the same issue!

About these ads

About SQLGator

Florida Gator and Certified SQL Server Enthusiast, Star Wars fanatic and is there anything else...oh yeah PS3! I am a geek and SQL Server DBA who dabbles with VMWare, there are other technologies greater than these? Not so fast my friend! I also love to travel to new and exotic places.

Posted on May 23, 2012, in Monitoring, Troubleshooting and tagged , , , . Bookmark the permalink. 3 Comments.

  1. Ahh yes, the dreaded underscore problem. There’s some documentation in Books Online (I think) that trace file names should not contain underscores. It causes problems as it expects a sequence number, and nothing else, to follow the underscore.

  2. Reblogged this on SQL Swampland and commented:

    The fifth most popular blog post for 2012!

  1. Pingback: SQL Nexus, More Quirkiness « SQL Swampland

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 1,080 other followers

%d bloggers like this: