Search code examples
.netbiztalksaprfcnetweaver

Testing BizTalk SAP Installation


I am installing a new BizTalk Server 2016 to an existent BizTalk cluster.

I have installed all the software, but prior to configure the BizTalk Server I want to test if the SAP Software is installed correctly, because we have several problems in the past.

How I can develop a single piece of .NET code, to test that the SAP connector is installed correctly?

Obviously we can test after configure the BizTalk Server and add this server to the BizTalk cluster, but we want to check before.

We are using RFC SDK 7.20 and ClassicRfc connection.


Solution

  • Obvisously, replace the parameters in "<...>" below with your actual server information.

    using Microsoft.Data.SAPClient;
    using (SAPConnection conn = new SAPConnection("TYPE = A; ASHOST=<server>; SYSNR=<sysnum>; LANG=EN; CLIENT=<client>; USER=<user>; PASSWD=<password>"))
    {
        conn.Open();
        SAPCommand cmd = conn.CreateCommand();
        cmd.CommandText = "exec RFC_PING";
        cmd.ExecuteNonQuery();
    }