• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1984
  • Last Modified:

Failed to use fn_trace_gettable to import trace file to table

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
treehouse2008
Asked:
treehouse2008
  • 10
  • 7
  • 6
1 Solution
 
chapmandewCommented:
post your sql....
0
 
BrandonGalderisiCommented:
Are you specifying the full path to the file?

0
 
treehouse2008Author Commented:
Select * into TraceTable from fn_trace_gettable('C:\tracefile.trc',default);
0
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
treehouse2008Author Commented:
Yes, I specified the full path to the file
0
 
BrandonGalderisiCommented:
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
 
chapmandewCommented:
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
 
BrandonGalderisiCommented:
"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
 
treehouse2008Author Commented:
The trace file is on my local machine. The SQL Server is on the server. I use Management Studio to access the database.
0
 
treehouse2008Author Commented:
How do I know if the account that SQL Server is running as have access to the path?
0
 
chapmandewCommented:
so, move the trace file to the sql server (or somewhere sql server can get to) and try it again.

0
 
BrandonGalderisiCommented:
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
 
treehouse2008Author Commented:
I cannot move the trace file into the machine with sql server. I do not have that authorization.
0
 
treehouse2008Author Commented:
I got it. Thank you both.
0
 
treehouse2008Author Commented:
Thanks
0
 
BrandonGalderisiCommented:
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
 
chapmandewCommented:
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
 
treehouse2008Author Commented:
I want to accept both of you as "Accepted Solution", but it seems I cannot accept two. I will try
0
 
chapmandewCommented:
You can accept to....I hate to, but I have to object.
0
 
treehouse2008Author Commented:
Please tell me how I can accpet two solutions if it can.
0
 
chapmandewCommented:
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
 
BrandonGalderisiCommented:
That wasn't supposed to be an administrative comment.  Oops.
0
 
treehouse2008Author Commented:
I will do it today.

Thank you two again,.
0
 
chapmandewCommented:
thank you.
0

Featured Post

Industry Leaders: 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!

  • 10
  • 7
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now