DreamFactory error 'CDbConnection failed to open the DB connection.' in SQLServer DB


#1

Hi.

I recently installed a DreamFactory stack to turn my DB into a Rest API. Everything is good, and I went to services to add my SQL Server DB. This is the connection string:

sqlsrv:Server=127.0.0.1;Database=LSFSevices

I already googled and found several answers and implemented them, including the native SQL Server drivers inside EXT (C:\Bitnami\dreamfactory-1.8.2-0\php\ext) and these are the drivers:

php_pdo_sqlsrv_54_nts.dll
php_pdo_sqlsrv_54_ts.dll

And I went into PHP.INI and added the following:

;sqlserver connection driver
extension=php_pdo_sqlsrv_54_nts.dll
extension=php_pdo_sqlsrv_54_ts.dll

I am also able to Telnet to 127.0.0.1 1433 without issue. At this point I don’t know what else to do so some help would be fantastic


#2

I also installed the ODBC driver and it seems to work, but now I am getting an error that ODBC cannot login to the server. I have mixed auth, I tested with the username and password I know that worked and Windows Auth… no go either way.


#3

I’m also facing the same issue, got all steps right but still can’t connect to database.


#4

I have the same issue and have been in contact with the support team, but they do not have a solution yet. I am using MS SQL Express 2008 R2.

If anyone out there has successfully used DSP with MS SQL Express, please reply with the connection string you used and any other changes you made to create a valid database connection.


#5

I isolated the issue using the Log file. Initially there were DB connecting issues and I installed a ODBC Windows Driver, actually the log file tells you what to download. It was a trial but I did, and I even found some Logging issues that I wouldn’t have seen had I not checked the log file. I take it this only happens in the Windows Installation; a Linux installation proved to be simple and I got it working in mere minutes.