|
|
|
|
Browse by Tags
All Tags » Error Handling (RSS)
-
After timeouts we need to make sure that active transactions, if any, are rolled back. All timeout handling must be done on the client. This post provides the implementation and unit tests.
Implementation
The following class extends SqlCommand and rolls back active transactions after timeouts:
public static class ...
-
After the timeout, we may sometimes, but not always, end up with an outstanding transaction. If this is the case, we need to rollback the transaction ourselves. Otherwise the consequent commands which use the same connection might not work as expected.
Let us debug through some client code and see what is happening in more ...
-
Maria Zakourdaev has just demonstrated that if our T-SQL throws multiple exceptions,
ERROR_MESSAGE() in TRY..CATCH block will only expose one.
When we handle errors in C#, we have a very easy access to all errors.
The following procedure throws two exceptions:
CREATE PROCEDURE dbo.ThrowsTwoExceptionsAS BEGIN ...
-
Sadly, THROW is not mentioned on the Programmability Enhancements (Database Engine) topic of Denali's ''What's New'' section. So, unless you were at PASS or have been reading the various blogs from the keynotes and other Denali sessions, the presence of this keyword may be news to you. I wanted to touch briefly on what THROW can do ...
-
Transact-SQL is a great language for data manipulation, but it has its weaknesses. Unlike “real programming languages” T-SQL is confined to procedural code. Sure, you can build “modules” by using stored procedures and functions, but for the most part, all of the work will be procedural. It has in the past also lacked error handling syntax leaving ...
-
Give us easier to read execution plansMichelle Ufford (@SQLFool) recently asked for help pinpointing the most expensive node(s) in a complicated execution plan. Mladen Prajdic (@MladenPrajdic) has a useful workaround; he coded up a quick query to parse the showplan XML and order results by cost descending. The Connect item that would ...
-
Light helping this week. I am busy closing out a few projects (or at least chapters within projects) in preparation for PASS next week.
========================================
#506453 : Lock escalation no longer kicks in for INSERTs in SQL Server 2008
Adam
found a nasty lock escalation bug in SQL Server 2008. This one ...
-
I've been fairly distracted this past week with my ''Bad habits to kick'' series, so apologies for being so late with the Connect digest. I stumbled upon a few pretty interesting items from the past two weeks; I hope you find them interesting as well.
#498082 : Allow direct usage of scalar functions in RAISERROR()
It has bugged me that in ...
-
I am sure that there is already some blog or article about this. But, I encountered this today and decided to go ahead and blog anyway. I had a situation, where I expected at certain times (the first of every month), a task to fail, but regardless, I wanted the package to continue to run with success. One other issue, I had, was that I did not ...
|
|
|
|
|