5 Replies Latest reply on Apr 11, 2013 8:42 AM by Gregor

    PI OLEDB Connection String

    anshuman

      Hi,

       

      I tried to connect to the PI server using explicit login method using the following connection strings:-

       
      Provider=PIOLEDB; Data Source=simplyfeye; Integrated Security=false; User ID=piadmin; Password=piadmin
      Provider=PIOLEDB; Data Source=192.168.1.2,5450; Integrated Security=false; User ID=piadmin; Password=piadmin

      In the first instance it successfully connected to the PI server but in the second case  it fails displaying the error:--

       
      [PI SDK] The requested server was not found in the known servers table. Unable to resolve name to IP address. 192.168.1.2,5450 

      I also tried to remove the port no from the Data Source in the second connection string but again i see the same error.

      Any clues as to why it is so? Why cant it take the IP address instead of the server name?

      Regards,
      Lokesh
        • Re: PI OLEDB Connection String
          hanyong

          Hello,

           

          I can understand why you get the error when you specify the data source with IP and port because it is not being interpreted as IP and port as you are expecting. Instead PI SDK processed that as a hostname to a machine and tries to resolve it. Hence it explains why it is throws the error unable to resolve name to IP address.  

           

          Anyway in PI SDK, you actually can't have 2 server entries that points to the same server (like one with hostname another with IP), Once PI SDK tested the connection to the server and realize the server ID is the same, it will not add it to the known server's table. PI OLEDB uses PI SDK so if it sees that IP is used to identify the server and it is not already in the known servers table (KST) it will attempt to add it, and fail. If you are using older versions of PI SDK that does not attempt to add unknown servers to the KST, it will simply tell you it is not a known server.

           

          As an alternative, you can have a KST entry with the hostname and a server alias with the IP and matches to the server, once you have the server alias, you can have a OLEDB connection string that identifies the server using both the hostname and IP. You can configure the server alias using PI SDK Utility.

            • Re: PI OLEDB Connection String
              anshuman

              Hi Han,

               

              Thank you very much for your reply. I can now connect to the PI server using both hostname as well as ip address after creating alias as suggested by you.

                • Re: PI OLEDB Connection String

                  Hello Anshuman,

                   

                  I recall you've stated with another post already that you prefer using explicit login for authentication. However, at this point I have to remind that we consider explicit user login a security vulnerability. Please see Security Alert: PI Authentication Weakness for details.

                    • Re: PI OLEDB Connection String
                      anshuman

                      Hi Gregor,

                       

                      Thank you for reminding me of the vulnerability issue with explicit login. Actually we are no longer using explicit login. I just wanted to know why IP address was not working in the connectionString whereas hostname was working. The same behavior was also observed in trust based authentication as well as WIS.

                       

                      Regards,

                       

                      Anshuman

                        • Re: PI OLEDB Connection String

                          Hello Anshuman,

                           

                          Anshuman Bansal

                          Actually we are no longer using explicit login.

                           

                          That's good news as well as the information that your issue is resolved.

                           

                          Anshuman Bansal

                          I just wanted to know why IP address was not working in the connectionString whereas hostname was working. The same behavior was also observed in trust based authentication as well as WIS.

                           

                          Han Yong's reply related to the KST is valid independent from the authentication method.