开发者

dml error logging for SQL Server

I am looking for dml error logging similar to o开发者_Go百科racle in Sql Server, Can something like this possible in SQL Server.

Thanks


I think the problem here is the writer doesn't know about Oracle's awesome error logging DML feature so I will basically outline it here... it is not pulling the statement from a ring buffer... Error Logging DML allow one to use SET logic SQL like inserting a million rows or and number for that fact and if one record produces an error it goes into an error bucket while the rest of the records are inserted into the database. It does this with 90% of the performance of a straight insert statement. Oracle's ODI tool is based on Error Logging DML. In other words in a data warehousing situation one could insert a million or more rows and it one record fails, instead of rolling back the entire record set ( like all other databases out there ) all the records would succeed except for the one that produced an error and it would go into an error bucket. I was really hoping that when Microsoft announced that they were going to introduce the Merge statement that of course they would copy Oracle and have an error bucket ( the most powerful part of the merge statement which is a glorified upsert ) alas no they did not implement this in SQL server a SET logic database that sorely needs Error logging DML!


The only practical way that I can think of to do this in SQL Server is through SSIS (Integration Services). However, it's nothing as simple or easy as a SET option on a SQL INSERT command, though believe me, I sure wish that it were.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜