Wednesday, October 16, 2013

A safe way to delete things from BizTalkMgmtDb ?

On occasion I see something like this;

Schema referenced by Map '<Namespace>.<MappName>' has been deleted. The local, cached version of the BizTalk Server group configuration is out of date. You must refresh the BizTalk Server group configuration before making further changes. (Microsoft.BizTalk.Administration.SnapIn)

When it doesnt go away by refreshing the Server group I tend to try restarting, etc. If that doesnt work it usually means something in the biztalk database is out of date or messed up. I have gone in a few times to bts_item table in BizTalkMgmtDb to look for whatever the offending item is and from there you can delete it out of MapSpec or wherever else. I found a great link online covering this specific case here . The sql code used was (once youre connected to the BizTalkMgmtDb);

SELECT itemid FROM [BizTalkMgmtDb].[dbo].[bts_item] where FullName ='<whatever the map is>'
Delete from BizTalkMgmtDb.dbo.bt_MapSpec where itemid ='<whatever the map itemid was>'.

Tuesday, October 8, 2013

xpath and biztalk; really?

stringTmp = "string(/*[local-name()='SXPTaskUpdate' and namespace-uri()='SXPTaskUpdateTN']/*[local-name()='Task']/*[local-name()='Customer']/text())";
stringTmp3 = xpath(Message_1 , stringTmp);


stringTmp = "string(/*[local-name()='SXPTaskUpdate' and namespace-uri()='SXPTaskUpdateTN']/*[local-name()='Task']/*[local-name()='Customer'])";
stringTmp3 = xpath(Message_1 , stringTmp);

returns: Customer_0

stringTmp2 = System.Convert.ToString(xpath(Message_1 , "/*[local-name()='SXPTaskUpdate' and namespace-uri()='SXPTaskUpdateTN']/*[local-name()='Task']/*[local-name()='Customer']"));


stringTmp2 = System.Convert.ToString(xpath(Message_1 , "/*[local-name()='SXPTaskUpdate' and namespace-uri()='SXPTaskUpdateTN']/*[local-name()='Task']/*[local-name()='Customer']/text()"));

returns: Microsoft.XLANGs.Core.Part+ArrayBasedXmlNodeList

One good source I've found is this: