Link to home
Start Free TrialLog in
Avatar of tupac1979
tupac1979

asked on

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
Avatar of David Todd
David Todd
Flag of New Zealand image

Hi,

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

Cheers
  David
Avatar of tupac1979
tupac1979

ASKER

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
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
I was using a blank template name and just using filter on the object id of the sp but that doesnt seem to work.
Hi,

Try the "SQL Profiler TSQL_SPs" template.

Cheers
  David
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
ASKER CERTIFIED SOLUTION
Avatar of David Todd
David Todd
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial