Suppose you are at a new clients, and you want to see quickly all the orchestrations are bound to send and receive ports.
Here’s some code to help you get started with that.

<pre>
select op.nvcName as 'OrchInternalPortName',
       o.nvcName as 'OrchName', 
     'SendPort' as 'SendOrReceive',
     sp.nvcName as 'PortName'
from bts_orchestration_port op 
inner join bts_orchestration o on o.nid = op.nOrchestrationID 
inner join bts_orchestration_port_binding opb on opb.nOrcPortID = op.nID 
inner join bts_sendport sp on sp.nid = opb.nSendPortID
--order by sp.nvcName 
union
select op.nvcName as 'OrchInternalPortName',
       o.nvcName as 'OrchName', 
     'ReceivePort' as 'SendOrReceive',
     rp.nvcName as 'PortName' 
from bts_orchestration_port op 
inner join bts_orchestration o on o.nid = op.nOrchestrationID 
inner join bts_orchestration_port_binding opb on opb.nOrcPortID = op.nID 
inner join bts_receiveport rp on rp.nid = opb.nReceivePortID
order by 'portname'
</pre>

Sorry, can’t show any actual results at this time.

This is similar but different from a prior SQL xref I posted that ties RecievePorts to SendPorts.

I actually forgot about this, and did the same code again on another day: Xref BizTalk Receive Ports to Orchestrations.