How to Debug BizTalk custom Pipeline component,Simple way

When i did a Google of  “how to debug a custom pipeline” and i found following top 3 results

http://www.biztalkgurus.com/blogs/biztalksyn/archive/2007/03/06/Custom-pipeline-component-debugging.aspx

http://blogs.msdn.com/b/gzunino/archive/2004/07/01/171281.aspx

http://blogs.msdn.com/b/skaufman/archive/2004/06/22/162421.aspx

 

All the above link says common approach of using pipeline.exe or attaching BTSNTSCv.exe with visual studio.

I have found a better and simple way of debugging custom BizTalk Pipeline component in Visual Studio.

  • Insert System.Diagnostics.Debugger.Break(); in the method where you want to break the debugger.
  • Build the solution in “Debug Mode”.
  • Copy the DLL of the component and paste it in %program files%Microsoft BizTalk Server 2006\Pipeline Components
  • Restart the BizTalk host
  • give the input to the receive location and it will launch the code in debug mode.
Advertisements

Installing BizTalk 2010 On A Development Box-1

For building a BizTalk 2010 Development machine following components will be required

  1. Windows 7 ultimate
  2. Visual Studio 2010 professional Edition Trial
  3. http://www.microsoft.com/downloads/en/details.aspx?FamilyID=26bae65f-b0df-4081-ae6e-1d828993d4d0&displaylang=en

  4. SQL Server 2008 Enterprise Edition Trial
  5. http://www.microsoft.com/downloads/en/details.aspx?FamilyID=265f08bc-1874-4c81-83d8-0d48dbce6297&displaylang=en

  6. SQL Server 2008 SP1
  7. http://www.microsoft.com/downloads/en/details.aspx?FamilyID=66ab3dbb-bf3e-4f46-9559-ccc6a4f9dc19&displaylang=en

  8. BizTalk Server 2010 Developer Edition
  9. http://www.microsoft.com/downloads/en/details.aspx?FamilyID=938102b8-a677-4c20-906d-f6ae472b3a6a

ISO Image from Folder In Mac

Launch Terminal

Go to the Folder where your “nputFolderName” is type following command

hdiutil makehybrid -o .iso

Where InputFolderName is the folder which you want to create as ISO Image on MAC. This will create a new ISO file of the folder.

BizTalk SQL Server Job does not delets backup files

Introduction

BizTalk SQL server backup jobs does not deletes the old backup files (which keeps on using the space unless manually delete them) from the backup location.

However it does deletes the backup history from the table, which is configured in the “Clear Backup History” step of “Backup BizTalk Server (BizTalkMgmtDb)” job. To delete the old backup files following solution can be used which creates a new database job and modifies the “Clear Backup History”step of the BizTalk Job. I have modified the Stored procedure to delete all the files which are less then given hour. This keeps my backup location clean and tidy. Since we are using log shipping for our BizTalk recovery process, so I would not like to keep any backup file which is older than 14 hours.

Following steps were performed to implement this solution.

  • Connect to the SQL Server instance using Management studio. Launch a new SQL Query window and write following SQL,

USE [BizTalkMgmtDb]

GO

/****** Object:  StoredProcedure [dbo].[sp_DeleteBackupHistoryAndFiles]    Script Date: 10/26/2010 16:40:18 ******/

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

ALTER PROCEDURE [dbo].[sp_DeleteBackupHistoryAndFiles] @DaysToKeep smallint = null

AS

BEGIN

set nocount on

IF @DaysToKeep IS NULL OR @DaysToKeep <= 0

RETURN

/*

Only delete full sets

If a set spans a day in such a way that some items fall into the deleted group and the other does not, do not delete the set

*/

DECLARE DeleteBackupFiles CURSOR

FOR SELECT ‘del “‘ + [BackupFileLocation] + ‘\’ + [BackupFileName] + ‘”‘ FROM [adm_BackupHistory]

WHERE  datediff( hh, [BackupDateTime], getdate() ) >= @DaysToKeep

AND [BackupSetId] NOT IN ( SELECT [BackupSetId] FROM [dbo].[adm_BackupHistory] [h2] WHERE [h2].[BackupSetId] = [BackupSetId] AND datediff( hh, [h2].[BackupDateTime], getdate() ) < @DaysToKeep )

DECLARE @cmd varchar(400)

OPEN DeleteBackupFiles

FETCH NEXT FROM DeleteBackupFiles INTO @cmd

WHILE (@@fetch_status <> -1)

BEGIN

IF (@@fetch_status <> -2)

BEGIN

EXEC master.dbo.xp_cmdshell @cmd, NO_OUTPUT

delete from [adm_BackupHistory] WHERE CURRENT OF DeleteBackupFiles

print @cmd

END

FETCH NEXT FROM DeleteBackupFiles INTO @cmd

END

CLOSE DeleteBackupFiles

DEALLOCATE DeleteBackupFiles

END

After execution of above SQL script a new stored procedure gets created in “BizTalkMgmtDB”

  • Connect to SQL Server agent on the instance and modify properties of the “Clear Backup History” step of “Backup BizTalk Server” SQL Job as follows.

 

 

This will call the stored procedure which will delete all the backup files which are older than 15 Hours and also deletes the entries from “adm_BackupHistory” table of BizTalkMgmtDb database.

This keeps my backup location clean and does not require any failure in the backup job if the location is full.

Please see the following article for more details.

http://support.microsoft.com/kb/982546

Winner of Contest on www.biztalkgurus.com

I won it. 🙂

Congratulations – you were the winner of the Best BizTalk 2010 Missing Feature from BizTalkGurus.com.

http://www.biztalkgurus.com/blogs/biztalk/archive/2010/11/30/what-is-missing-in-biztalk-2010-best-idea-wins-a-signed-copy-of-applied-architecture-patterns-on-the-microsoft-platform.aspx

Changes for Low Latency in BizTalk SQL Server

Following are few changes which are recommended by Microsoft.

Google’s E Books Store

Google has launched Ebooks store for US,

http://books.google.com/ebooks

 

Basic changes to achieve Low Latency-1

I have been working since last 2 months to Build a new BizTalk Farm. We are targeting low latency applications for this farm. Followings are few basic parameters which needs to be changed at very first level.

Value of “MaxreceiveInterval”  from 500 (default) to 150 ms if your solution is using isolatedhost. for more information , Please check following article

http://msdn.microsoft.com/en-us/library/cc594552(BTS.10).aspx

Will post more details in next series…