m_pant0808 has asked for the wisdom of the Perl Monks concerning the following question:

Hi All,

Want to connect to the SQL Server DB available in the Azure from the perl installed in CentOS 7.

I wan using The CentOS 7 from Oracle VirtualBox. This VirtualBox I have installed in Windows 8.1.

When I was trying to connect same from perl installed in the master OS, i.e.: Windows 8.1, it was working fine. But, then why it is failing in when I was trying to connect the same from the Oracle VirtualBox?

Do, I need to add trusted IP to Azure for Oracle VirtualBox (value of inet)?

I was receiving the following error:
---------------------------------------------------------------------------------------------------------------------
DBI connect('Driver={SQL Server Native Client 11.0};Server=tcp:<server>.database.windows.net,1433;Database=<database>;Uid=<u_name>@<server>;Pwd=<pswrd>;Encrypt=yes;TrustServerCertificate=no;Connection Timeout=30;','',...) failed: [unixODBC][Microsoft][SQL Server Native Client 11.0]Login timeout expired (SQL-HYT00) [state was HYT00 now 08001]
[unixODBC][Microsoft][SQL Server Native Client 11.0]TCP Provider: Error code 0x2726 (SQL-08001)
[unixODBC][Microsoft][SQL Server Native Client 11.0]A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online. (SQL-08001) [state was 08001 now 01S00]
[unixODBC][Microsoft][SQL Server Native Client 11.0]Invalid connection string attribute (SQL-01S00) at odbc_perl.pl line 9.
  • Comment on Connection issue to the SQL Server in Azure from perl installed in CentOS

Replies are listed 'Best First'.
Re: Connection issue to the SQL Server in Azure from perl installed in CentOS
by Discipulus (Canon) on Jul 30, 2015 at 11:15 UTC
    hello, if the code runs fine the problem must not be Perl..
    check for reachbility of port 1433 of the destination server from your virtual machine. If the virtual machine is configured with a different public IP address, then you need to allow it in the remote server.

    In brief: troubleshut your connectivity.

    L*
    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.