Welcome, Guest
Username: Password: Remember me

TOPIC: Howto connect to a SQL Server 2000 database

Howto connect to a SQL Server 2000 database 1 year 1 month ago #100719

  • Carlitros
  • Carlitros's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 2
  • Karma: 0
I am having trouble connecting a LimeSurvey instance to a SQL Server database 2000. The LimeSurvey instance was formerly working fine with MySQL, after recompiling my PHP with tha PDO driver library for MySQL.

The LimeSurvey v2.00+ is installed on a machine with Linux CentOS 5.8, PHP 5.3.2 and FreeTDS v1.12. The FreeTDS connection successfully connects to the SQL Server instance.

The error message that I get from LimeSurvey is:
"DbConnection failed to open the DB connection: could not find driver"

My connection line at file application/config/config.php is as follows:

'connectionString' => 'dblib:host=<FreeTDS_connection_name>;dbname=<database_name>',
'username' => '<SQL username>',
'password' => '<password>',

I've discarded using the PDO_SQLSRV driver, as it starts working with SQL Server 2005 (www.php.net/manual/en/ref.pdo-sqlsrv.php), and doubt using PDO_DBLIB because of its old and experimental status (www.php.net/manual/en/ref.pdo-dblib.php).

1. Can I get LimeSurvey to work directly with my FreeTDS connection?

If not,

2. What is the correct PHP library I should add?

Thank you.
Last Edit: 1 year 1 month ago by Carlitros.
The administrator has disabled public write access.

Howto connect to a SQL Server 2000 database 1 year 1 month ago #100722

  • c_schmitz
  • c_schmitz's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 819
  • Thank you received: 116
  • Karma: 93
Hello,

Using the pdo_dblib driver is the right choice. Afaik pdo_sqlsrv is not available on Linux, anyway.
During installation just using the IP-address of your MSSQL server as hostname should be fine - no TDS connection name is needed if your TDS version is a pretty much recent one. YOu will need to make sure that your MSSQL server is able to connect on TCP/IP.
Support us, too. Donate to the LimeSurvey project and help keep us going!
The administrator has disabled public write access.

Howto connect to a SQL Server 2000 database 1 year 1 month ago #100724

  • Carlitros
  • Carlitros's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 2
  • Karma: 0
Thank you very much. After recompiling PHP, adding '--with-pdo-dblib=<freeTDS_home_directory>' and modifying the connection file as instructed, LimeSurvey reached the MSSQL 2000 database.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.105 seconds
Donation Image