trooney/mssql-bundle

There is no license information available for the latest version (dev-master) of this package.

Driver for work with Microsoft SQL Server using PDO_DBLIB

Installs: 779

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 62

Type:symfony-bundle

dev-master 2012-12-21 15:03 UTC

This package is not auto-updated.

Last update: 2024-04-13 12:12:02 UTC


README

This bundle implements a pdo_dblib based Microsft SQL Server. The original bundle was forked from https://github.com/intellectsoft-uk/MssqlBundle.

Symfony Install

Add the trooney/mssql-bundle into composer.json

"require": {
    ....
    "trooney/mssql-bundle": "master-dev"
},

Symfony Configuration

Update the doctrine section of your config.yml to include the option driver_class

doctrine:
    dbal:
        driver:         %database_driver%
        driver_class:   \NRC\MssqlBundle\Driver\PDODblib\Driver

FreeTDS Configuration

DBLib requires FreeTDS. Your freetds.conf connection configured should look something like following:

[mssql_freetds]
    host = 172.30.252.25
    port = 1433
    tds version = 8.0
    client charset = UTF-8
    text size = 20971520

Putting everything together

Getting everything together wasn't easy. You need to complete the following steps, checking each installation is successful by connecting with the appropriate tools:

  • Install FreeTDS and configure a server connection
    • Verify with ./tsql -S mssql_freetds -U yourusername -P yourpassword
  • Install the PHP DBLib extension -- verify with PHP script containing
    • Verify $pdo = new PDO('dblib:host=mssql_freetds;dbname=yourdb', 'yourusername', 'yourpassword');
  • Install and configure the PDODblibBundle
    • Verify Some kind of SQL against your database

Notes