I moved the documentation from: http://biztalkarchiving.codeplex.com/documentation, since it’s unreadable on the site.
BizTalk Archiving SQL and File Documentation
Installation
- Run MSI installer
- Install it on
\BizTalk Server 2010\PipelineComponents. - Go to
\BizTalk Server 2010\PipelineComponents\BizTalkMsgArchiveScripts folder, execute RegisterSource.cmd (As administrator), this will register the source so that the pipeline can log to the event log.
Usage – Design Time – VS2010
- Open VS2010 -> Create new BizTalk Project -> Add Receive Pipeline
- Right Click ToolBox -> Choose Items
- Go to BizTalk Pipeline Components -> Check BizTalk Message Archiving Component
- New Pipepline Added to the toolbox.
- Drag & Drop the BizTalk Message Archiving Component to Decode Stage.
- Configure Properties (see Configuration)
Note: You can also configure the Properties using BizTalk Administration Console.
Setup – SQL Archiving
Since the archiving will use an SQL Database, you’ll need to create the database and table.
- Go to
\BizTalk Server 2010\PipelineComponents\BizTalkMsgArchiveScripts folder. - Execute the CreateDatabase.sql on the target database server. This will create the database named: BizTalkArchiveDb, table named: Messages and stored procedure named: InsMessages
Configuration
- Deploy the pipeline that uses the BizTalk Message Archiving Component (See Usage – Design Time – VS2010)
- Using BizTalk Administration Console, create a new Receive Location and use the pipeline on previous number, on the pipeline click the Elipsis .. to display properties.
Property Name | Description | Use In | Sample Values | Notes |
---|---|---|---|---|
CompressionPassword | Password that will be used in zip file | File & SQL Archiving | P@ssw0rd | |
DbConnProvider | Connection Provider | SQL Archiving | System.Data.SqlClient | |
DbConnStr | Database connection string | SQL Archiving | Data Source=localhost;Initial Catalog=BizTalkArchiveDb;Integrated Security=SSPI; | Using integrated security you need to grant the identity of the host wherein the receive/send port is binded permission to BizTalkArchiveDb with ff roles: dbdatareaderdatawriter, db and execute permission on the stored procedure InsMessages |
DbFileExtensions | File extension to be used | SQL Archiving | .xml | |
DbPropList | This is a set of delimited values of name & namespace of message context properties that will be passed to the stored procedure to be used for custom logging. | SQL Archiving | ReceivedFileName;http://schemas.microsoft.com/BizTalk/2003/file-properties|ReceivedPortName;http://schemas.microsoft.com/BizTalk/2003/system-properties | Format is Property Name;Namespace and for multiple values the delimiter is ‘|’ pipe symbol. |
DbSPName | Stored procedure name | SQL Archiving | Built-In: InsMessages | The stored procedure can be customized as long as it has the same signature with the default one. For instance, there can be additional logic to parse the Message Properties and insert it into the new custom table |
FileArchiveBackFolder | Folder / Shared Location / Network location wherein the files will be archived | File Archiving | \\RPaulo2011\Test\Archive | If it’s a shared folder the pipeline will try to use first the identity of the host, if it failed it will use the credentials supplied (see FileArchive UserName, Password, Domain) |
FileArchiveFileName | Name of the archive file | File Archiving | %SourceFileName%_%datetime% | Supported macros are: – %SourceFileName%, %MessageID%,%datetime%, %time% |
FileArchiveIsOverwriteFiles | Overwrite Flag | File Archiving | True | |
FileArchiveUserDomain | Domain name of user credentials | File Archiving | PAULOR | This values will be used if the identity of the host instance doesn’t have permission on the backup folder. |
FileArchiveUserName | User name | File Archiving | BizTalkUser | This values will be used if the identity of the host instance doesn’t have permission on the backup folder. |
FileArchiveUserPwd | Password | File Archiving | P@ssword | This values will be used if the identity of the host instance doesn’t have permission on the backup folder. |
IsArchiveToDb | Archive to database flag | SQL Archiving | True | True = Archive to database, False = Disabled |
IsArchiveToFile | Archive to file flag | File Archiving | True | True = Archive to file, False = Disabled |
IsCompressFile | compress file flag | SQL & File Archiving | True | True = Compress the file, False = No compression, It uses DotNetZip |
Usage – Downloading Archive Files using ASP.NET
https://randypaulo.wordpress.com/2011/06/21/storing-files-to-database-and-downloading-using-asp-net/