Wednesday, March 7, 2012

Problem creating stored procedures

I am getting the following error message every time I try to create a stored procedure - any stored procedure:

Msg 6354, Level 16, State 10, Procedure AuditOperations, Line 14

Target string size is too small to represent the XML instance

A search of books online and MSDN didn't return anything.

Thanks.

Please post some code.

Adamus

|||

OK, but the code doesn't appear to matter. I get the message for any view or stored proc I try to create. I've scripted some of AW views and stored procedures with the same result.

CREATE PROCEDURE ListEmployeesByDepartment

@.DepartmentName NVARCHAR(50)

AS

SELECT c.Lastname, c.FirstName

FROM Person.Contact c

INNER JOIN HumanResources.Employee e

ON c.ContactID = e.ContactID

INNER JOIN HumanResources.EmployeeDepartmentHistory h

ON e.EmployeeID = h.EmployeeID

INNER JOIN HumanResources.Department d

ON h.DepartmentID = d.DepartmentID

WHERE d.name = @.DepartmentName AND h.EndDate IS NULL

ORDER BY 1

|||

TennesseeSQL wrote:

OK, but the code doesn't appear to matter. I get the message for any view or stored proc I try to create. I've scripted some of AW views and stored procedures with the same result.

Do you have any triggers on the table?

If so, disable them temporarily.

Adamus

|||The message indicates the object in which the error happened. So check "AuditOperations" SP or trigger code.|||Geez! How stupid?! I'm working through examples preparing for the 70-441 test. That was it. Thanks so much!

No comments:

Post a Comment