Posted by Erland Sommarskog on 01/10/07 15:02
Trevor Bishop (trevorbishop@viper.com) writes:
> Sorry, my second proc does not receive values (input or output) from the
> first proc - it jut needs to fire after the first one completes. The
> second proc is just an update statement that pulls its select list from
> a couple views.
>
> Is there a reason with this structure that the 2nd proc would not fire?
I can only think of two reasons why the second procedure would not be
called:
1) There is a batch-aborting error.
2) The table you update has a trigger which rollbacks or commits the
transaction. If a trigger terminates with a different trancount than
it started with, the batch is aborted.
How have you certified that the second stored procedure is never invoked?
Did you use Profiler to see what was actually executed? Or do you just
"feel" that it was never called?
Which version of SQL Server are you using?
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
[Back to original message]
|