Debugging BizTalk instances – which one to attach to?
A good hint from Michael.
Determine the Process Id of a specific BTNTSVC.exe instance using the following command line:
tasklist /svc /fi "imagename eq btsntsvc.exe"
Adding a Sql user that already exists
Occasionally I’ll need to copy a database over to my dev machine in order to be able to work offline.
USE <Target_Database> EXEC sp_change_users_login 'Update_One', '<Server_User>', '<Database_User>'
This will re-associate the Server Login with the specified Database Login.
Unlocking a file from TFS
Inevitably somebody on the team goes away on holidays and forgets to check everything into TFS (guilty, as charged!)
There’s no facility to unlock somebody else’s files through TFS Explorer, so we have to resort to the command line. Firstly, get the list of the user’s workspaces:
tf workspaces /server:tfsserver /owner:DOMAIN\offender /computer:*
This will list the workspaces “owned” by the offending little tyke absent user, which we will feed into the next command:
tf undo /server:tfsserver /workspace:workspacename;DOMAIN\offender $/path/to/file/to/unlock
Now you’re free to change the file at will, and reprimand your teammate when he gets back from his holiday, all tanned and relaxed.
Another FYI: just type in tf on the command line, and it will open up the appropriate help file. Sweet!
Calling custom stored procedures using CodeSmith
Calling a custom stored procedure using the .NetTiers template in CodeSmith couldn’t be easier. You just make sure your procedure uses the standard naming convention of _{TableName}_{CustomMethodName} and Bam!, your accessor is available on the appropriate Table related class.
However (there’s always a “however”) there is one thing to make sure everything returns nicely. Make sure the fields returned in your custom stored procedure match up with those in your table, otherwise your custom method will return a generic DataSet. By returning all the fields from your base table, .NetTiers is smart enough to provide you with a nice, enumerable, TList<myTableEntity> return value. Handy!
“Filtering” a document
Just a quick lesson learnt from a recent project, as I know I’m going to need to do this again.
Filtering down an Xml document in a map based on the existance or value of an element or attribute. For example, say we want to return a copy of a existing document, but only where the optional Status field has a value:
- Use a map with a Scripting Functoid, using Inline XSLT
- Use the Xslt copy-of function to make a copy of the source based on a critera selection:
<xsl:copy-of select="/*[local-name()='RootNodeName']/*[local-name()='Summary'][*[local-name()='Header']/@Status='Active']" />
- Wire the output of the functoid to the relevant element on the destination schema
Yay, we’re still relevant
Just incase you haven’t read this amongst the other 7394 blog posts today, Microsoft have confirmed the next version of BizTalk Server 2006 R3 2009.
Here’s the official Roadmap page. Looks like there’s still a lot of life in the old girl yet!
Unable to refresh the BizTalk Group Hub
I have occasionally gotten either of the following errors in my BizTalk Administration console, and am then unable to refresh the BizTalk Group Hub:
"An instance of the FreeThreadedDOMDocument class cannot be created" "Failed to create a CLSID_BizTalkPropertyBagFactory"
I still don’t know why it happens, but the solution is simple: Restart the Windows WMI Service.
With thanks to this blog article.
-
Archives
- November 2009 (1)
- September 2009 (1)
- August 2009 (2)
- July 2009 (2)
- June 2009 (1)
- April 2009 (2)
- March 2009 (2)
- February 2009 (1)
- January 2009 (1)
- September 2008 (3)
- August 2008 (4)
-
Categories
-
RSS
Entries RSS
Comments RSS


