Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA: Howto connect to a SQL Server 2000 database

Howto connect to a SQL Server 2000 database 10 Monate 2 Wochen her #100719

  • Carlitros
  • Carlitross Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 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.
Letzte Änderung: 10 Monate 2 Wochen her von Carlitros.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Howto connect to a SQL Server 2000 database 10 Monate 2 Wochen her #100722

  • c_schmitz
  • c_schmitzs Avatar
  • ONLINE
  • LimeSurvey Team
  • Beiträge: 755
  • Dank erhalten: 104
  • Karma: 88
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!
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Howto connect to a SQL Server 2000 database 10 Monate 2 Wochen her #100724

  • Carlitros
  • Carlitross Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 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.
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Moderatoren: ITEd
Ladezeit der Seite: 0.128 Sekunden
Donation Image