Re: Try Catch to Pinpoint Set-Based Error?



SnapDive (SnapDive@xxxxxxxxxxxxxxxx) writes:
Since SQL Server failed the action, it has to know what and where
things failed.

Yeah, but that does not mean that it will tell us!

I was thinking that something akin to an OUTPUT clause
would tell me what blew up.

Alas, SQL Server is a bit pedantic, so all rows inserted sofar
in a failing INSERT statement will be rolled back. The one exception
is with INSERT EXEC. But that is only if the called procedure produces
several result sets.



--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

.



Relevant Pages

  • Re: Forcing a Trigger after a insert of several records
    ... Yeah, yeah, yeah:) Of course there is an order to the set once it has ... Pro SQL Server 2000 Database Design ... "Aaron Bertrand - MVP" wrote in message ... > SQL Server MVP ...
    (microsoft.public.sqlserver.programming)
  • Re: query help
    ... just not a create table script. ... Yeah, you did. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (comp.databases.ms-sqlserver)
  • Re: top 10 reasons for 8Gb FC?
    ... Uh, yeah. ... This put a smile on my face ... ... How come MS SQL Server 2008 isn't up there as well? ... what init.ora parameter do I set to fix that?" ...
    (comp.databases.oracle.server)
  • Re: Tips on finding memory leaks
    ... Oh, yeah, I also meant to mention, Access is primarily a front-end in this ... though with convenient access to the full set of SQL Server ... OLEDB issues definitely AREN'T the problem here. ...
    (microsoft.public.vb.general.discussion)
  • Re: Peer to Peer question.
    ... Yeah - the article just says "an application can be programmed to route ... traffic" without giving details. ... because it is outside the scope of SQL Server documentation. ...
    (microsoft.public.sqlserver.replication)