Reputation: 33914
I have two different receive ports and two receive locations - one location assigned to each port. The ports are set to receive the exact same type of file - I ended up with both because I consolidated two different applications that did the same thing.
I want to combine both locations into a single receive port, but I don't seem to be able to change the location that either belongs to - there's no option to do this that I can find. Essentially, I just want to take one location (either - I don't care), and assign it to the other port, so that one port has two locations and the other has none.
Does somebody know of a way to change the receive port of an existing location?
Upvotes: 1
Views: 1818
Reputation: 33914
I resorted to the dark side, and updated the SQL table manually. I'd still welcome anybody who has a legitimate, supported way to do this, but to any others who need an answer, here's the script I wrote to fix this problem (no side-effects so far, though it's only been a day):
DECLARE @AppName VARCHAR(255),
@ReceiveLocationName VARCHAR(255),
@NewReceivePortName VARCHAR(255)
SET @AppName = 'Your application name'
SET @ReceiveLocationName = 'Name of your existing receive location'
SET @NewReceivePortName = 'Name of receive port to move location to'
DECLARE @NewPortID INT
DECLARE @ReceiveLocationID INT
SELECT @NewPortID = rp.[nID]
FROM [BizTalkMgmtDb].[dbo].[bts_application] a
JOIN [BizTalkMgmtDb].[dbo].[bts_receiveport] rp
ON a.nID = rp.nApplicationID
WHERE a.nvcName = @AppName
AND rp.nvcName = @NewReceivePortName
SELECT @ReceiveLocationID = Id
FROM [BizTalkMgmtDb].[dbo].[adm_receivelocation]
WHERE Name = @ReceiveLocationName
UPDATE [BizTalkMgmtDb].[dbo].[adm_receivelocation]
SET ReceivePortId = @NewPortID,
IsPrimary = 0
WHERE Id = @ReceiveLocationID
Upvotes: 1
Reputation: 596
Please do not attempt such direct SQL changes in BizTalk system databases. You always use the API's provided by Microsoft.
Try either the ExplorerOM or WMI to do any such configuration changes. http://msdn.microsoft.com/en-us/library/microsoft.biztalk.explorerom.receiveport_members(v=bts.10) http://msdn.microsoft.com/en-us/library/ee277482(v=bts.10).aspx
If in case you make direct DB changes and raise Microsoft support, they won't support it.
Upvotes: 0