Wednesday, 18 June 2008

RSOR - MoM Rules/Alerts targeted to a particular agent

RSOR - Resultant Set of Rules is an excellent utility to get the set of MoM rules/alerts targeted to a specific client. Thanks to Tom Keane from Microsoft who is the author of this utility. We use this utility more often in our development servers where we frequently add rules/alerts. In development, this utility can help us to ensure the newly added rules/alerts have been reflected in the MoM database or in production this can help us to identify the list the rules/alerts targeted for a specific agent without using the admin-console.

Syntax:
RSOR.exe <MOMDBServer[\instance]> <TargetAgent>

Ensure that you have enough permission to read the MoM database or use a login which has got at least read access to the MoM database to execute this utility.

After executing the above command, check for “ResultantSetOfRules” folder in the root directory where you have copied this utility.

Reference:
http://technet.microsoft.com/en-us/library/cc180050(TechNet.10).aspx

Read the following article for essential tool for MoM:
http://technet.microsoft.com/en-us/magazine/cc160922.aspx
Reference:
http://technet.microsoft.com/en-us/library/cc180050(TechNet.10).aspx

Read the following article for essential tool for MoM:
http://technet.microsoft.com/en-us/magazine/cc160922.aspx

Tuesday, 17 June 2008

Remove a BizTalk server from BizTalk server 2004 group

You must have SQL 2000 Server system administrator rights or BizTalk Server 2004 administrator rights to follow these steps. These steps would only be performed on the BizTalk Processing server has failed as is being replaced.

1. Start the BizTalk Server 2004 Administration snap-in.
2. Expand Servers.
3. Click the computer that is not working.
A list of the host instances that are associated with the computer that is not working appears in the results pane.
4. Right-click each host instance and then click Delete. Repeat this step until all the host instances that are associated with the computer are deleted.

Note: You receive the following error message when you try to delete a host instance that is isolated;

Failed while deleting the Windows NT service BTSSvc {F46166EC-B4B8-4129-AB86-F3BB212CEC50}

You receive the following error message when you try to delete a host instance that is in process;

The network path was not found

If you receive one of these error messages click OK. After you click OK you receive the following error message;

You can forcefully delete this host instance. This may leave orphan orchestrations and prevent cleanup of COM+ applications and NT services on machine ‘computer name’. Do you want to proceed with forceful host instance deletion?

If you receive this error message click Yes.
5. Click Start and then click Run and type wbemtest.exe and then click OK. Hope wbemtest.exe should have already installed in your server.
6. In the Windows Management Instrumentation Tester dialog box click Connect.
7. In the Namespace text box type root\microsoftbiztalkserver and click Connect and the click Enum Instances.
8. In the Class Info dialog box type MSBTS_ServerSetting under Enter superclass name and click to select Immediate only and then click OK.
9. In the Query Result dialog box click the computer that is not working and then click Delete.

Note: You cannot delete the server instance if the server is associated with any host instances.

Problems faced while installing BizTalk Server 2004 – Service Pack 2 (SP2)

It always had been a tough time when we installed BizTalk Server 2004 – SP2 on our servers. Thank god we have a good pre-production environment similar to the production server to try our hands. The lessons learnt are really a good experience.

* Before you apply the SP2, make sure that you have backup for all, off-course this should be the norm for any service pack installation. In BizTalk 2004 SP2, for some reason if you want to uninstall the SP2, it uninstalls the SP2 binaries and restores the BizTalk Server binaries to their SP1 state. SP2 contains major database schema changes and uninstalling SP2 does not restore BizTalk Server databases to their SP1 state. So you must restore the BizTalk Server databases from your backup.

* One at a time. If you have farm based set-up for your BizTalk Processing servers and all access a single cluster for the BizTalk database, ensure that you install the SP2 at one BizTalk server at a time. As said, SP2 contains major database schema changes and if you do the installation of SP2 on more than one server at a time (just to save sometime) there are high chances for your BizTalk databases to crash.

If the installation fails with some error, the SP2 executable package is expected to roll-back all the changes it had done till the failure. It doesn’t seem to be proper always. I have seen scenarios where the host instances were disturbed and all the in-process instance will appear as isolated host instance. In this case to recreate the host instance, you have to delete the instance from both the admin console and also from the services tray (services.msc). To delete the services from the service tray use the following command:


SC delete <<BizTalk Service Name>>

* "bts_CleanupMsgbox" is empty (or just with stored procedure structure without and process code in it) by default. Microsoft doesn't suggest by default to use this SP because of its seriousness in purging the "live" data, but for our operational reasons we decide to go ahead in using this SP, this has to be created explicitly. Microsoft provides the SQL-script to create this SP which can be located at

<BizTalk installation directory>\Schema\msgbox_cleanup_logic.sql

from the BizTalk processing servers.

So when we install BizTalk-SP2, this stored procedure is brought back to default which is empty.

The above are just the few of the issues we faced. And its always advisable to plan properly for restore while installing the BizTalk Server 2004 – Service Pack 2.

Read the following Microsft KB article on issue in BizTalk Server 2004 Service Pack 2 that are not documented in the Readme file:
<<http://support.microsoft.com/kb/940519>>

Tuesday, 10 June 2008

Debugging is not supported under current trust level settings

When you try to open any web service/web-application from Visual Studio, you may get the following error:

Debugging is not supported under current trust level settings.

The problem is with the trust level setting of your application. Modifying the web.config file of your application would solve this problem:

Solution:
Locate the <system.web> section.
Insert the tag: <trust level="Full" />

Monday, 12 May 2008

Cleared Microsoft certification on BizTalk Server 2006 - 70-235

Hi All,

Yesterday I have cleared the Microsoft certification on BizTalk Server 2006 (70-235). It’s a great relief after some good hard work.



Cheers
M.R.ASHWINPRABHU

Sunday, 4 May 2008

MoM - Consolidation and Timer based rule

I have a requirement to create a MoM rule which would automate a task based on some specific eventlog entires in production servers. The automatic task is to recycle some of the COM+ components based on the eventlog. So the eventlog entry is the evidence for me to identify that the issue has occurred. I am going not going to talk about the scripts which I have used to restart the COM+ componet but how I have configured the MoM rule for the same.

So I have to create a MoM rule which would monitor the production server and perform the resolution activity. But the crux is to perform the resolution activity only when the continuous 5 entries of the eventlog are identified in the span of 30 seconds in the production server. So I have to create MoM rule which should act based on the number of the entries of an event in the given time window.

I have achieved this by creating an event-rule which would monitor the specified eventlog for the “Repeat Count” of 5 and I have created another consolidation rule which would maintain a counter for event-rule in 30 seconds. This counter will be reset to zero, if the specified count of logs doesn’t met in specified period (30 seconds). i.e. if the application logs 4 event entries for the specified criteria in 30 seconds. The event-rule’s repeat count would be set back to 1. But if the application logs event entry for 5 times in 30 seconds (or in lesser than 30 seconds), the event-rule’s response entries would trigger.

Following are the snapshot of the MoM rules:

clip_image002

Figure 1: Event-rule for the event entry of 5 entries.

clip_image004

Figure 2: Consolidation rule for 30 seconds.

Monday, 28 April 2008

MoM (Microsoft Operations Manager) Design

We have been using MoM (Microsoft Operations Manager) in our BizTalk projects for operational support purposes. I am already very much impressed with the advantages it provides for any Wintel applications in its production support arena. Few months back I got an opportunity to design another MoM package for a messaging product based out of Java for Windows environments. The messaging product has been in use for nearly a year in our customer’s production environment.

When I mean by messaging product, we can’t not compare its capabilities with BizTalk, as it doesn’t perform any business processing upon the messages while transferring the messages. But its intended objective is to just transfer very large files in very high frequency to different platform like UNIX, Mainframe etc. This product is yet to evolve in many ways for an enterprise usage as we all know no application is complete in this universe.

Our customer was already using an in-house operational tool to handle transfer failures (and also to handle the products open issues). This product has very minimal capability in throwing/publishing the exceptions (file transfer failures). Any transfer failures from this product would be simply logged in the event log with same Event ID, Event Category, Event Source and the only difference is the description of the error. Our customer is using an alert monitor tool, which provides the dashboard sort of view to the 1st line support. So, all the operation tools should provide their output to dashboard tool. They call that tool as Mangers of Manger.

Current system architecture

Exceptions in this messaging scenario can be like:

· File not found at source.

· Configured pattern of files are not available for transfer.

· Configured file path / server unavailability.

· File has been occupied by another process

· Server disk space full

· Staging folders maintenance issues

· Many product related issue

· Unknown.

Currently used operational tool doesn’t have the intelligence to classify the exception and act accordingly/show the classified alerts to the Monitoring tool. So the challenge is to create an efficient MoM-package which would identify the different categories of the alerts and give the output accordingly to the Managers of manager tool.

I have classified the exception as below:

Exception Classifications

The exceptions are classified into different category since each category requires different actions:

  • Subscriber issues require Call-out to the Subscriber production-support team.
  • Messaging service issue requires Call-out to our production team.
  • Product issue requires some workarounds which can be automated again using MoM.
  • Off course we can’t always capture all the exceptions, so a generic catch to capture these exceptions also and throw them with lower severity to the monitoring tool.

In MoM with its ability to use custom scripts, I have configured the categories of the exceptions, by throwing them with Custom Exception Number and Custom event description lets say exception category appended at the starting of the every event description. So I have configured a generic alert called “Event-Filter” which swallows all events from the application. In the event-filter I have used a script which would read the event description and in turn throws another alert with different event ID(specific to category) and the event category append in the event description. For example: if the exception is “File not found”

The messaging product would throw the exception as following in the event log:

Event Type : Error

Event Source : ABCD

Event Category : None

Event ID : 123 (Always same for all error)

Date : 28/04/2008

Time : 15:21:48

User :

Computer : DummyMach123

Description : Files not found at the configured path \\mshsrmsappp0008\P1102747\TestFile.txt>

This event log would be swallowed by the Event-Filter script to throw a MoM event:

Event-ID: 1001 (Custom defined)

Event Category: Subscriber

Event-Decription: Event_Category [Subscriber]: Files not found at the configured path file:////mshsrmsappp0008/P1102747/TestFile.txt

And for the alerts which came out of the event-filter I have configured a rule to action the category related actions. So the new MoM-package would enable the application to behave something like the following:

New MoM package

Following is the part of the event-filter script which is in if-condition, checks the event description and calls another function (CreateEvent) to throw the event with different event criteria’s.

If InStr(strParentEvtDesc,strSCNoMatchPattern) Then

'match the pattern

strParentEvtDesc= strECSubscriber & objContextEvent.Message

CreateEvent EVENT_ID_NoMatchPattern,EVENT_TYPE_ERROR,SCRIPT_EVENTSOURCE,strParentEvtDesc

Elseif…

Following is the method used to throw the event from event-filter:

Sub CreateEvent(intEventNumber,intEventType,strEventSource,strEventMessage)

Set objEvent = ScriptContext.CreateEvent()

objEvent.EventSource = strEventSource

objEvent.EventNumber = intEventNumber

objEvent.EventType = intEventType

objEvent.Message = strEventMessage

ScriptContext.Submit objEvent

End Sub

Following is the event rule in MoM for the subscriber related issue and marked is the criteria for the rule:

clip_image002

As you would have noticed, in the new-MoM package design diagram (showed above) I have showed a XML- file next to the subscriber issues box. Okay I am able to classify the exceptions and now what I am going to do with it? If it’s a subscriber related issue, as I mentioned earlier we want throw a MoM alter which would contain the details of the specific subscriber. I am going to maintain the subscriber contacts in the XML file which can be used a configuration file for the alert for my subscriber related issues. How I am going to accomplish this requirement? We will see it in another day.

Special Thanks to Mr.Lee Nichol for whatsoever little knowledge I have in MoM