﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Administration / SQL Server 7,2000  / Loading Trace Files To A Table / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sat, 18 May 2013 08:03:59 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Loading Trace Files To A Table</title><link>http://www.sqlservercentral.com/Forums/Topic761110-5-1.aspx</link><description>Hi chinn,I am looking for a similar solution that you were looking for. Could you let me know how you were able to accomplish the automation of loading trace files to a table?Thanks!</description><pubDate>Mon, 07 Jan 2013 08:34:08 GMT</pubDate><dc:creator>Prakash.Bhojegowda</dc:creator></item><item><title>RE: Loading Trace Files To A Table</title><link>http://www.sqlservercentral.com/Forums/Topic761110-5-1.aspx</link><description>Thanks Very Much For You Prompt replies.Thanks Again...</description><pubDate>Fri, 31 Jul 2009 13:25:28 GMT</pubDate><dc:creator>chinn</dc:creator></item><item><title>RE: Loading Trace Files To A Table</title><link>http://www.sqlservercentral.com/Forums/Topic761110-5-1.aspx</link><description>You'll have to re-create it.  I set them to do that in an auto-start proc that fires off when the SQL service starts.</description><pubDate>Fri, 31 Jul 2009 12:36:35 GMT</pubDate><dc:creator>GSquared</dc:creator></item><item><title>RE: Loading Trace Files To A Table</title><link>http://www.sqlservercentral.com/Forums/Topic761110-5-1.aspx</link><description>The trace definition is deleted.  You will need to recreate it and restart it.  If this is something you always want running you may want to encapsulate it in a stored procedure and mark the stored procedure for startup.  Here's a [url=http://msdn.microsoft.com/en-us/library/aa214405(SQL.80).aspx][u]link[/u][/url] for that.  Or you can put it in a job that runs on startup.</description><pubDate>Fri, 31 Jul 2009 12:36:34 GMT</pubDate><dc:creator>  Jack Corbett</dc:creator></item><item><title>RE: Loading Trace Files To A Table</title><link>http://www.sqlservercentral.com/Forums/Topic761110-5-1.aspx</link><description>Guys,One quick question...When running Server Side Tracing...if we restart sql server ..Do i need to just start the existing traceor Recreate the TraceIn other words..will the trace be stopped or closed(deletes the definition)Thanks,</description><pubDate>Fri, 31 Jul 2009 12:28:55 GMT</pubDate><dc:creator>chinn</dc:creator></item><item><title>RE: Loading Trace Files To A Table</title><link>http://www.sqlservercentral.com/Forums/Topic761110-5-1.aspx</link><description>Thanks...Very Much!I got an idea from your previous post...Thanks for you help!</description><pubDate>Thu, 30 Jul 2009 07:08:48 GMT</pubDate><dc:creator>chinn</dc:creator></item><item><title>RE: Loading Trace Files To A Table</title><link>http://www.sqlservercentral.com/Forums/Topic761110-5-1.aspx</link><description>Try this for a list of the files:[code]create table #T (ID int identity primary key,FName varchar(256));--insert into #T (FName)exec master..xp_cmdshell 'dir MyTraceDirectory\*.trc /b';--select *from #T;[/code]You'll have to put in the actual directory, of course.Once you have that list, it should be very easy to select everything except the last file, and to load up the trace table from that.  It's easier in SQL 2005, because you could construct a simple Except argument, but it's not that difficult in 2000 to set up a comparable outer join or Where Not In.That should give you what you need, right?</description><pubDate>Thu, 30 Jul 2009 06:50:39 GMT</pubDate><dc:creator>GSquared</dc:creator></item><item><title>RE: Loading Trace Files To A Table</title><link>http://www.sqlservercentral.com/Forums/Topic761110-5-1.aspx</link><description>Lowell,That script is 2005/2008 specific and this is a 2000 forum.  You'd have to modify the script to use Scott's solution to get the path.</description><pubDate>Wed, 29 Jul 2009 10:17:00 GMT</pubDate><dc:creator>  Jack Corbett</dc:creator></item><item><title>RE: Loading Trace Files To A Table</title><link>http://www.sqlservercentral.com/Forums/Topic761110-5-1.aspx</link><description>there is a script submission that loads all the trace files into a table here:[url=http://www.sqlservercentral.com/scripts/SQL+Trace/65790/]Default Trace Load of All 5 Files[/url]you could easily change the command from '*.trc" to logins*.trc" to get all the specific ones you were looking for.</description><pubDate>Wed, 29 Jul 2009 07:36:50 GMT</pubDate><dc:creator>Lowell</dc:creator></item><item><title>RE: Loading Trace Files To A Table</title><link>http://www.sqlservercentral.com/Forums/Topic761110-5-1.aspx</link><description>Hello,Is there a way we can do that Programatically.Ignore the file that is being used...Thanks,</description><pubDate>Wed, 29 Jul 2009 07:28:54 GMT</pubDate><dc:creator>chinn</dc:creator></item><item><title>RE: Loading Trace Files To A Table</title><link>http://www.sqlservercentral.com/Forums/Topic761110-5-1.aspx</link><description>If you query a list of the files, it would be very easy to not use the last one in the list.  That's why I suggested that.</description><pubDate>Wed, 29 Jul 2009 07:22:07 GMT</pubDate><dc:creator>GSquared</dc:creator></item><item><title>RE: Loading Trace Files To A Table</title><link>http://www.sqlservercentral.com/Forums/Topic761110-5-1.aspx</link><description>Hello All....Thanks For Your Inputs...But my question is how do i Know..which one is currently being used or written to because i want to ignore that and load the rest of them into a table.For example...C:\trace\logins.trc---current one 0 bytes..c:\trace\logins1.trcC:\trace\logins2.trc...i want to ignore logins.trc file because if i include that it(loading of trace files) will fail.Thanks....</description><pubDate>Wed, 29 Jul 2009 06:08:55 GMT</pubDate><dc:creator>chinn</dc:creator></item><item><title>RE: Loading Trace Files To A Table</title><link>http://www.sqlservercentral.com/Forums/Topic761110-5-1.aspx</link><description>You can get the trace file names in use from fn_trace_getinfo, assuming you know the traceid. [code]SELECT valueFROM fn_trace_getinfo( @traceid )WHERE property = 2[/code]Or if the traceid is uncertain but the base filename is known you could try[code]SELECT valueFROM fn_trace_getinfo(0)WHERE property = 2 AND value LIKE '%filename%'[/code]</description><pubDate>Tue, 28 Jul 2009 18:30:38 GMT</pubDate><dc:creator>Scott Coleman</dc:creator></item><item><title>RE: Loading Trace Files To A Table</title><link>http://www.sqlservercentral.com/Forums/Topic761110-5-1.aspx</link><description>why not create a view, so it is always ready on demand?CREATE VIEW MyTrace AsSelect * from FROM ::fn_trace_gettable(c:\my_trace.trc", default)</description><pubDate>Tue, 28 Jul 2009 15:29:25 GMT</pubDate><dc:creator>Lowell</dc:creator></item><item><title>RE: Loading Trace Files To A Table</title><link>http://www.sqlservercentral.com/Forums/Topic761110-5-1.aspx</link><description>You can use xp_cmdshell to query the files in a directory.  Would that allow you to do what you want?</description><pubDate>Tue, 28 Jul 2009 15:05:06 GMT</pubDate><dc:creator>GSquared</dc:creator></item><item><title>Loading Trace Files To A Table</title><link>http://www.sqlservercentral.com/Forums/Topic761110-5-1.aspx</link><description>Hello,We run profiler traces for auditing logins and i am using server side tracing and everything works great.I just want to automate loading of trace files into a table without stopping trace..i know i cant use this...SELECT * INTO temp_trcFROM ::fn_trace_gettable(c:\my_trace.trc", default)because one file will be always be used..i some how need to get info of the file being used or capture the file sizes so that i can get the name of the files...and load into the table....something...on those lines...any lead would be greatly appreciated...Thanks</description><pubDate>Tue, 28 Jul 2009 14:36:23 GMT</pubDate><dc:creator>chinn</dc:creator></item></channel></rss>