BizTalk Orchestrations vs Content Based Routing

When you create a new application, sometimes you have a choice between doing it in an orchestration vs doing the whole thing with send and receive ports and no orchestrations.  The later is called “content based routing,” where messages are routed based on the Filters in the Send Ports. I’m more or lesson assuming you […]

Archive Directory Slow to Open – Powershell Moves Files to Dated Subdirectories

With BizTalk, we often archive files in a sub directory. Personally, I would rather archive to a SQL database with a database column, but that takes a little more architecture and sales. So in the meantime, many clients continue to write files to disk. There are frequently clean-up jobs that delete files over x days […]

BizTalk EDI Error – Number of included segments do not match

Error Error encountered during parsing. The X12 transaction set with id '0001' contained in functional group with id '850009661', in interchange with id '850009661', with sender id '9333516114     ', receiver id '956837686      ' is being suspended with following errors: Error: 1 (Miscellaneous error)   4: Number of included segments do not match Below is an the last […]

Error: “Invalid queue path name” Exception using MSMQ Remote Queue

If you are getting the error “Invalid queue path name” from C# or other language, it could be that when reference a remote queue, you need to add the “FormatName:DIRECT:OS:” on the front, Instead of: MyServer\private$\MyQueue Prefix it as shown below FormatName:DIRECT=OS:MyServer\private$\MyQueue For more details, see “Manabu Tokunaga blog” or “Stack Overflow”

C# Format Date for Oracle

Short blog today, below is working C# code I ran today to format and update a date in an Oracle database. My first attempt using just DateTime.Now resulted in error “ORA-01861: literal does not match format string”. <code> commSQL.CommandText = "UPDATE PollingTable " + " SET DATE_POLLED = '" + DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss") + "'" + […]

Quick Summary and List of BizTalk Databases

BizTalk Core Databases BizTalkMgmtDB Most entities from BizTalk Admin Console are stored in this database (applications, orchestrations, assemblies, sendports, receive ports and locations, etc…)Most updates in BizTalk Admin Console are stored in this database (applications, orchestrations, assemblies, sendports, receive ports and locations, etc…). Thus BizTalk Admin Console is basically an update program to this database. […]

BizTalk Mapper and Altova MapForce Compared

BizTalk Mapper and Altova MapForce are both tools used to data from one schema to another. A schema internally is treated as XML, but may represent a flat file, CSV, a SQL table to stored proc, or a web service request/response message. Typically the job of a B2B developer is to map data from one […]

PowerShell – Mass replace text strings for all files in a directory

Sometimes you need to mass replace all the text string for all files in a directory, or at least all files matching some file mask. Here’s a quick sample that I put together. As a BizTalk consultant, I deal with data coming in from customers or trading partners. Sometimes, that data needs to be scrubbed. […]

Accessing SQL Entities in Powershell with SQLPS

I was playing with SQLPS for the first time and wanted to save my samples for future use. Code cls Write-Host "Start" Import-Module SQLPS –DisableNameChecking Write-Host "Done with Import-Module" cd SQLSERVER:\ DIR Write-Host "`n`nList of Instances (not working?)" cd SQLSERVER:\SQL\localhost Get-ChildItem | Select instancename   Write-Host "`n`nList of Databases on Local Server default instance" cd SQLSERVER:\sql\localhost\DEFAULT\Databases   […]

Building Large SQL In List – Using RegEx and NotePad++

Suppose you have a large list of items that you want to put into a SQL in list statement, like this: where firstname in ( 'Aaron', 'Abbey', 'Abe' ) But the data you have in is Excel or a text file, and doesn’t have the quotes and commas around it. You can quickly modify the […]