SugarCRM 7.9.0.1 unable to connect to SQL Server 2014 database!

Hi Guys,

I am unable to connect SQL Server 2014 database from SugarCRM.

I have sugarCRM installed on one instance (Web Server) and database is present on another instance (Database server). When I try to open the login page i.e. http://localhost/sugarcrm/index.php, I am getting the following error :

Here is my config.php  file:

Here is the sugarcrm.log :

But, I was able to successfully connect database using a simple php script. Please help!!

  • Hi ,

    I would suggest you open a support ticket with sugar. Other than that, make sure you made your changes in you config.php

    with the appropriate values.

    You obviously need to change the values in config.php for

    db_host_name

    db_host_instance

    db_user_name

    db_password
    db_name

    db_port * (make sure you are using correct port value)

    Also, are you using the proper php drivers for your instance see (Microsoft Drivers for PHP for SQL Server)?
    https://www.microsoft.com/en-ca/download/details.aspx?id=20098 

    Can you ping the machine from 1 server to another?

    Good luck,

  • Hi Peter Chimienti,

    I have purposely put dummy hostname and credentials to post this question.. I am actually using the correct credentials in config.php.

    Yes, I am using PHP 5.6 drivers with SQL Server 2014 and I can also ping/telnet between the servers.

    I have written a simple php program which successfully connects to database and fetches records but sugarcrm is unable to do the same..

  • Hi Shardul,

    Yes, that is what I had figured. Unfortunately, I have no other ideas. Did you open case with SugarCRM?

  • Finally I got this resolved.. The issue was with the permission of account which I was using to access the database. Changing the permission to 'db_owner' in SQLServer solved the problem