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

Create a sql trace for a stored procedure

I have stored procedure that runs as a job and it has started failing giving me an error of "String or binary data would be truncated. [SQL STATE 22001] [Error 8152] The statement has been terminated [SQLSTATE 01000] [Error 3621]. The step failed. I am trying to run a trace on the stored procedure because when I execute the sp in query analyzer it works fine. When I run a trace I do not get any results I would appreciate any help on setting me up a trace to troubleshoot this error. Thanks
0
tupac1979
Asked:
tupac1979
  • 4
  • 3
1 Solution
 
David ToddSenior DBACommented:
Hi,

What template for the trace are you using? What version of SQL?

Cheers
  David
0
 
tupac1979Author Commented:
Thanks I dont have a template I have been trying to run the trace by object ID or so forth but apparently I am using the wrong object ID. Also I am using sql server 2000 enterprise edition. Thanks
0
 
David ToddSenior DBACommented:
Hi,

In Profiler, when you create a trace, the first text box has Trace Name, below that is a selection for which server. In the next division is the combo box titled Template Name.

Which Templage are you using?

Cheers
  David
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
tupac1979Author Commented:
I was using a blank template name and just using filter on the object id of the sp but that doesnt seem to work.
0
 
David ToddSenior DBACommented:
Hi,

Try the "SQL Profiler TSQL_SPs" template.

Cheers
  David
0
 
tupac1979Author Commented:
Thanks dtodd,
I have tried that it gives a bunch of information about all of the stored procedures since I have 10 databases how do I focus on the one database. Thanks
0
 
David ToddSenior DBACommented:
Hi,

On the filters table, expand DatabaseName, expand like, and enter the name of the database.

HTH
  David
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now