BizTalk ESB: Cleaning/Purge ESBExceptionDb for Fault Messages

Good to know!

Kelology

This is a handy SQL script created to clean up/purge ESBExceptionDb database for fault messages for particular days. This has been created only for development & testing purpose and is suggested not to run in Production environment unless you understand the use and circumstances. You can also schedule this as job once tested and verified the behavior of the script.

USE [EsbExceptionDb]
GO

IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[x_Delete_ESB_Faults]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[x_Delete_ESB_Faults]
GO

USE [EsbExceptionDb]
GO

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE [dbo].[x_Delete_ESB_Faults]
    @DaysToKeep    INT = 7
AS
BEGIN
/*
=============================================
Example:
EXEC [dbo].[x_Delete_ESB_Faults] @DaysToKeep = 1
=============================================
*/
    DECLARE @currentDateTime DATETIME, @deleteFromDateTime DATETIME;

    SET @currentDateTime = GETUTCDATE();
    SET @deleteFromDateTime = @currentDateTime - @DaysToKeep;
    SET NOCOUNT ON;

    /*Deleting…

View original post 334 more words

Advertisements

SubVersion Clean up Failed — Run ‘cleanup’ REALLY?!

I was having a “forehead to keyboard” sort of issue with SVN at a client. Something in the repository got jacked up, so I couldn’t run a cleanup operation. The frustrating thing was that when I ran the cleanup operation, it would give me an error message telling me the clean up failed, and instructed me to run the cleanup operation! Really?! 🙂

I found this blog post, and that fixed my issue…

http://www.anujvarma.com/svn-cleanup-failedprevious-operation-has-not-finished-run-cleanup-if-it-was-interrupted/

Solution:
Somehow, svn is stuck on the previous operation. We need to remove this operation from it’s ‘work queue’.

The data is stored in the wc.db sqllite database in the offending folder.
1. Install sqllite (32 bit binary for windows) from here
2. sqlite .svn/wc.db “select * from work_queue”

The SELECT should show you your offending folder/file as part of the work queue. What you need to do is delete this item from the work queue.

3. sqlite .svn/wc.db “delete from work_queue”

That’s it. Now, you can run cleanup again – and it should work. Or you can proceed directly to the task you were doing before being prompted to run cleanup (adding a new file etc.)