Skip to content


DBAL-35: PDO_Sqlsrv bug in _constructPdoDsn() #1537

doctrinebot opened this Issue · 3 comments

2 participants


Jira issue originally created by user bostjan:

When connection to mssql server with pdo_sqlsrv driver you get:

SQLSTATE[IMSSP]: The DSN string ended unexpectedly.

Sample $connectionOptions:

$connectionOptions = array(
    'dbname' => 'AdventureWorks',
    'user' => 'sa',
    'password' => 'sa_password',
    'host' => 'local',
    'driver' => 'pdo_sqlsrv'

Error is in Doctrine\DBAL\Driver\PDOSqlsrv\Driver* in function *_constructPdoDsn(array $params).
On line 53 dsn starts with

$dsn = 'sqlsrv:(';

instead of

$dsn = 'sqlsrv:server=(';

as written in offical Microsoft help which come with SQL Server Driver For PHP v2.


Comment created by @beberlei:

@Juozas can you evaluate this and possibly apply a fix?


Comment created by @beberlei:



Issue was closed with resolution "Fixed"

@doctrinebot doctrinebot added the Bug label
@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.0.0-BETA4 milestone
@doctrinebot doctrinebot closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.