Wednesday, November 13, 2013

BizTalk 2013 and configuring the Oracle Adapter in a 64 bit environment

At my current company, I was on a recent project that needed to query master data housed in our PeopleSoft  Enterprise Resource Planning (ERP) System.  Generally, we have leveraged the Request/Reponse message pattern via web services when querying ERP master data.  However, on this project, we needed multiple succinct request messages to get the required data.

These smaller high volume messages were a definite limitation for PeopleSoft.  PeopleSoft uses Integration Broker (IB) for messaging, and we discovered early on that it's ability to respond in a timely manner to a high volume of requests was sub par.  Luckily we have BizTalk, which is interoperable, and provides an Oracle adapter that could be used to access the PeopleSoft Oracle database.  Having never used the Oracle Adapter before, I started Googling around for help.

I found two blog posts that got me rolling.   The first is installing the BizTalk LOB Adapter by Sandro Pereira which can be found here:
This is a step-by-step guide with screen shots for installing the BizTalk Line of Business Adapter Pack. Although I was more interested in the Oracle adapter, I went ahead and installed the other adapters as well (SAP, Siebel, Oracle E-Business Suite, etc.).  In addition, this blog post also guides the user on how to add the adapter to the BizTalk Administration Console.

The second article, written by Jason Agostini, was around configuring the BizTalk Oracle adapter which can be found here:
The only problem I had with the second article was that it was geared to a 32 bit development environment and an earlier version of the Oracle Database.  So using the above article as a guideline, here are the steps I took to get the Oracle adapter configured in a 64-bit environment:
  • First I contacted our PeopleSoft Admin to get the current version of the PeopleSoft Oracle Database (  I then went to the Oracle website and downloaded the appropriate 32-bit and 64-bit ODAC zip files (ODAC112021XCopy).  Why not just the 64-bit?  For design time development, you will need the 32-bit version to create a connection to the database.
  • From the readme.txt included in the ODAC zip files, I installed the assemblies by running the "install.bat" file from the command prompt.  Again, I had to do this twice, once for the 32-bit version and once for the 64-bit version.
  • I then navigated to the directory where the BizTalk Adapter Pack was installed (In my case, C:\Program Files (x86)\Microsoft BizTalk Adapter Pack\bin) and opened the file "Microsoft.Adapters.OracleDB.config".  I then added an entry to reference the new version of the Oracle DataAccess assembly:

  • Having completed the installation, I opened Visual Studio 2012 and brought up my BizTalk solution. In my schemas project, I right clicked the project and selected "Add Generated Items" selection:
  • From the "Add Generated Schema" window, I selected the "ConsumeAdapterService" option:

  • The next step is to select your binding, in my case "OracleDBBinding", and click the "Configure" button.  This is where I entered database information like ServerName and ServerAddress in the "URI Properties" tab.  Enter any credentials needed for access in the "Security" tab:
  • Once the database information is entered, click the "OK" button.  From the "Configure a URI" text box, copy the text and paste into an application like notepad for later (you will need this information when setting up your send port in BizTalk Administrator).  
  • Click the "Connect" button.  Once connected to the database, I selected the "Client (Outbound operations)" from the "Select Contract type" pull down list (which will allow me to pull data from the database).  Select the appropriate database object and operation from the menu panes.  Click the "Add" button so that your operation is added to the "Added categories and operations" menu pane.  Click the "OK" button :
  • From this, a schema of the database object is created in the BizTalk project that can be used to retrieve data.  In my case, this was a table. Included in the schema's "Select" record is a filter element which acts as a "WHERE" clause to narrow your return set.  Below is a screenshot of a sample table schema with the "Select" and the "SelectResponse" records:

  • After completing development (in my case an orchestration), building, and deploying my project, it was time to configure the send port in BizTalk Administrator.  The first step is to create a new Send Port for the application.  Right click the "Send Ports" and add new "Static Solicit-Response Send Port"
  • When selecting the type of adapter to use, I have two choices.  I  can either select the "WCF-Custom" or the "Oracle" adapter:
  • Since I selected the "WCF-Custom", under the "Binding" tab of the adapter I needed to select "oracleDBBinding":

  • When configuring the adapter, under the "General" tab, there are two important steps.  First, I entered the Address (URI) by copying and pasting the text saved in notepad from my previous step of connecting to the Oracle database.  Second, the Soap Action should come from the "Target Namespace" of the database object schema created with the Adapter service.

  • To ensure I was using the 64-bit version of the adapter, I made sure the BizTalk Host associated with the adapter was configured with the check box for "32-bit only" not selected:
  • Running a test message, I was able to confirm that the send port was sending and receiving messages with the Oracle database successfully.  One thing to note, directly accessing an ERP database table is not a recommended approach, and I only used a table to get a working example up and running.  

Thursday, November 7, 2013

BizTalk 2010 Moving the Master Secret to a Windows Server Cluster

My company recently went through a Microsoft audit of our production BizTalk 2010 environment. The main area of improvement Microsoft recommended was where the Master Secret Server should reside. Instead of having the Master Secret Server on one of the BizTalk Servers, it was recommended to move this to the clustered SQL Server.  Having not done this in my past, there were two main articles I followed to move the Master Secret Server:
  1. How to Move the Master Secret Server
  2. How to Cluster the Master Secret Server
Following the guidelines set within the above two articles, here are the steps I followed:
  • I started with the first link above and navigated to the section of the article titled "To move the master secret from one server to a Windows Server Cluster".  This guided me to the second posted article above under the section "To install and configure Enterprise SSO on the cluster nodes (Windows Server 2008)".  As instructed, I ran the BizTalk install bits on both SQL Server boxes in the cluster and installed the required components for Enterprise SSO:
  • When configuring BizTalk in custom configuration, instead of creating a new SSO system, I selected "Join an existing SSO system":
  • After the installation and configuration of SSO, I followed the section entitled "To update the master secret server name in the SSO database".  Following the instructions  I created the xml file and ran the command "ssomanage -updatedb" from a command prompt with elevated permissions.  After updating the master secret server name, I ran the command "ssoconfig.exe -status" to ensure the name had been changed

  • I then followed the section entitled "To create the clustered Enterprise SSO resource (Windows Server 2008)".  The directions are pretty self explanatory, but here are a couple of screenshots of adding the new resource and setting it's properties:

  • After accomplishing this, I switched back to the article ""To move the master secret from one server to a Windows Server Cluster".  I copied the Master Secret backup file to each server in the cluster.  I brought the new "Enterprise Single Sign-On Service" (ESSO) on-line:

  • After bringing ESSO online for the cluster, I restarted the Enterprise Single Sign-On Service on each of the BizTalk Servers.  
  • Last step is to restore the Master Secret on the active node of the cluster.  Those directions can be found here: How to Restore the Master Secret Server.  Essentially, running the command "ssoconfig -restoreSecret [filename]" will restore the master secret on that server.  One thing to note is that you will need the password originally set-up when backing up the Master Secret to restore successfully.
  • One last talking point to this whole process.  I'm fortunate to work in a company with the foresight to invest in multiple environments.   Before implementing this in our production environment, I was able to test this process in our quality assurance environment.  I would highly recommend going that route to identify potential problematic areas.
  • One other talking point, if your looking to cluster your BizTalk hosts, check out this article by Kent Weare Clustering BizTalk Hosts.  A great article on not only the "how to" but why you would want to.

Monday, November 4, 2013

BizTalk360 Proactive Monitoring beyond just BizTalk

We currently leverage BizTalk360 to help maintain our Enterprise Service Bus (ESB) implemented with BizTalk Server.  One of the things I especially like about BizTalk360 is it's proactive monitoring.  With the flexibility of BizTalk360, our production environment has been set-up with monitoring of:
  • BizTalk Applications - Receive Ports, Send Ports, Orchestrations, and Suspended Messages are all areas we are alerted to when there is a problem.
  • BizTalk WCF Services -  WCF Services for BizTalk Receive Locations hosted in Internet Information Services (IIS).
  • BizTalk Host Instances - Our BizTalk host instances are monitored to ensure they are in a started state.
  • SQL Server jobs related to BizTalk - monitoring the success of jobs like DTA Purge and Archive that help maintain the health of BizTalk.
  • Message Box Viewer (MBV) - a tool that can help identify problematic areas in your BizTalk environment, it is verified that the tool runs successfully every night.
Recently we came into an issue where the proactive monitoring alerted us to a number of applications with a high number of suspended messages.  After troubleshooting this for a while, it was determined that one of the subscribing systems (we use the publish/subscribe message pattern a lot) web services server had become overloaded and couldn't process any more incoming messages.  After the issue was resolved, we had a follow up meeting to discuss what we could do better in the future.  BizTalk360 came to the rescue!

BizTalk360 can be configured for not only BizTalk but other systems as well, especially if they have implemented web services.  How do you do this?  First open BizTalk360 and navigate to the "Monitor and Notify" tab and select the "BizTalk Environment" from the left menu pane:

Select the alarm that you want to set-up the alert for from the right hand pane "Choose Alarm" pull down option (You need to have already created an alarm in order to configure it).  Click the "Add new Web Endpoint" button:

The next step is to fill out the "Add new Web Endpoint for monitoring" form with the appropriate information like the "URL" field and the "Expected Return Code" field:

Once created, the alarm will trigger every time the expected return code isn't received.  In our case, the alarm is set-up to email not only the BizTalk team but the team responsible for the subscribing web service server.  This has also been enabled for all subscribing applications where web services are the main mode of transportation.  Kudos to the BizTalk360 team for their forward thinking on monitoring beyond the BizTalk environment!