Solved

Failed to use fn_trace_gettable to import trace file to table

Posted on 2008-10-02
24
1,794 Views
Last Modified: 2012-05-05
When I use fn_trace_gettable  to import a trace file to table, it failed. The error message is:
File ''xxx.trc' either does not exist or is not a recognizable trace file ....

I can load the trace file into Profiler

0
Comment
Question by:treehouse2008
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 10
  • 7
  • 6
24 Comments
 
LVL 60

Expert Comment

by:chapmandew
ID: 22628357
post your sql....
0
 
LVL 39

Expert Comment

by:BrandonGalderisi
ID: 22628371
Are you specifying the full path to the file?

0
 

Author Comment

by:treehouse2008
ID: 22628373
Select * into TraceTable from fn_trace_gettable('C:\tracefile.trc',default);
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:treehouse2008
ID: 22628378
Yes, I specified the full path to the file
0
 
LVL 39

Expert Comment

by:BrandonGalderisi
ID: 22628476
Does the account that SQL Server is running as have access to the path?  IF SQL Server is running as "network service" or local, and the trc is on a network share or a path local with restricted permissions, you won't be able to access it.
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 22628479
are you on the local server?  is the file at the C: drive on the local server?  if not, move it to there...the file path you're specifying has to be on the sql server itself.
0
 
LVL 39

Expert Comment

by:BrandonGalderisi
ID: 22628487
"the file path you're specifying has to be on the sql server itself."

Or in a location that the SQL Service account has access to :)
0
 

Author Comment

by:treehouse2008
ID: 22628504
The trace file is on my local machine. The SQL Server is on the server. I use Management Studio to access the database.
0
 

Author Comment

by:treehouse2008
ID: 22628512
How do I know if the account that SQL Server is running as have access to the path?
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 22628514
so, move the trace file to the sql server (or somewhere sql server can get to) and try it again.

0
 
LVL 39

Accepted Solution

by:
BrandonGalderisi earned 500 total points
ID: 22628527
so if you have it local under c:\trace.trc, and you type in c:\trace.trc, it is trying to find it in the ROOT of the c: on the SQL Server itself.  Either copy it locally to the SQL server (using windows file sharing), or to a location on the network (such as \\YourComputerName\YourShareName) where the account that SQL Server is running as has access to it.  IF you are not a SQL Server admin, you may not know what account it is running as so best to try and get it on the physical server somewhere.
0
 

Author Comment

by:treehouse2008
ID: 22628533
I cannot move the trace file into the machine with sql server. I do not have that authorization.
0
 

Author Comment

by:treehouse2008
ID: 22628543
I got it. Thank you both.
0
 

Author Closing Comment

by:treehouse2008
ID: 31502565
Thanks
0
 
LVL 39

Expert Comment

by:BrandonGalderisi
ID: 22628546
If you don't have authorization to get the .trc on there, then you probably don't have the authorization to know what account SQL is running as.

You are going to need help from a DBA or IT person at your company for this.
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 22628550
yeah, you're going to need to either get it to a share or the local machine

if the acct running sql is a domain admin, then try this:

Select * into TraceTable from fn_trace_gettable('\\yourpcname\C$\tracefile.trc',default);
0
 

Author Comment

by:treehouse2008
ID: 22628556
I want to accept both of you as "Accepted Solution", but it seems I cannot accept two. I will try
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 22628562
You can accept to....I hate to, but I have to object.
0
 

Author Comment

by:treehouse2008
ID: 22628570
Please tell me how I can accpet two solutions if it can.
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 22628600
You'll have to submit a post here to have it reopened so you can split them.

http://www.experts-exchange.com/Other/Community_Support/
0
 
LVL 39

Expert Comment

by:BrandonGalderisi
ID: 22628623
That wasn't supposed to be an administrative comment.  Oops.
0
 

Author Comment

by:treehouse2008
ID: 22628678
I will do it today.

Thank you two again,.
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 22633397
thank you.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Need help with a query 3 39
IF SQL Query 12 29
TSQL - How to get output results in row with additional character(comma) 7 15
Need age at date of document 5 17
Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question