Determine which ports are not bound to orchestrations

6. October 2011

We have multiple versions of our BizTalk applications running simultaneously and when constantly upgrading, you end up with a bunch of receive- and sendports that are no longer used by any orchestrations and should be cleaned up.

As a help to determine which ports that are candidates for deletion, you can use the SQL below.

Note: Any direct bound ports and ports that only rely on a filter will also show up here.

/******                 

******  Script to determine which send- and receiveports are not bound
******  to any orchestrations

******/

 

select 'Sendport: ' + nvcName as [ ]

from BizTalkMgmtDb..bts_sendport SP

left outer join BizTalkMgmtDb..bts_orchestration_port_binding OPB

            on SP.nID = OPB.nSendPortID

where OPB.nSendPortID is null

 

union

 

select 'ReceivePort: ' + nvcName

from BizTalkMgmtDb..bts_receiveport RP

left outer join BizTalkMgmtDb..bts_orchestration_port_binding OPB

            on RP.nID = OPB.nReceivePortID

where OPB.nReceivePortID is null

 

order by 1


Christian Staerk  

BizTalk Server

Comments are closed