BizTalk2010 restart Receive location every hour

北城余情 提交于 2020-01-06 06:45:00

问题


BizTalk2010 restart Receive location every 3 hour

we have a issue with third party sftp codeplex adapter 1.4 (receive location 'freeze' issue). There may be a fix in version 1.5 but for a short term solution is there a way to schedule a restart of one Receive location (Disable\enable)


回答1:


You can use Task Scheduler to schedule a PowerShell that enables/disables your Receive Location.

Here https://biztalklive.blogspot.com.es/2017/10/powershell-script-to-enable-biztalk.html?m=1 you have a Script example and here how to schedule https://social.technet.microsoft.com/wiki/contents/articles/26747.windows-server-how-to-schedule-a-powershell-script-to-auto-run.aspx.




回答2:


You can create a powershell with the following script :

    #Get Receive locations
    [ARRAY]$ReceiveLocations = get-wmiobject MSBTS_ReceiveLocation -namespace 'root\MicrosoftBizTalkServer' -filter {IsDisabled = "True" and (Name="Receive Location Name1" or Name="Receive Location Name2")}

    Foreach ($ReceiveLocation in $ReceiveLocations)
    {
        #EnableReceive locations
        $ReceiveLocation.InvokeMethod("Enable",$null)
    }

and create a windows task scheduler to execute the script




回答3:


For a temporary solution, you can put that Receive Location in it's own Host Instance and use the Windows Scheduler to Stop and Start the Service periodically.

You don't need any scripts or other complications, just the NET STOP/START commands.

The setup is described in this other SO thread: How to restart a windows service using Task Scheduler

You can find the Service name in the Properties Services Control Panel.



来源:https://stackoverflow.com/questions/48747822/biztalk2010-restart-receive-location-every-hour

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!