Commit 6d4e5d4a authored by Steve Müller's avatar Steve Müller Committed by Benjamin Eberlei

fix oci8 TNS connect descriptor

parent df00bd4b
...@@ -64,15 +64,18 @@ class Driver implements \Doctrine\DBAL\Driver ...@@ -64,15 +64,18 @@ class Driver implements \Doctrine\DBAL\Driver
$dsn .= '(PORT=1521)'; $dsn .= '(PORT=1521)';
} }
$database = 'SID=' . $params['dbname'];
$pooled = '';
if (isset($params['service']) && $params['service'] == true) { if (isset($params['service']) && $params['service'] == true) {
$dsn .= '))(CONNECT_DATA=(SERVICE_NAME=' . $params['dbname'] . '))'; $database = 'SERVICE_NAME=' . $params['dbname'];
} else {
$dsn .= '))(CONNECT_DATA=(SID=' . $params['dbname'] . '))';
} }
if (isset($params['pooled']) && $params['pooled'] == true) { if (isset($params['pooled']) && $params['pooled'] == true) {
$dsn .= '(SERVER=POOLED)'; $pooled = '(SERVER=POOLED)';
} }
$dsn .= ')';
$dsn .= '))(CONNECT_DATA=(' . $database . ')' . $pooled . '))';
} else { } else {
$dsn .= $params['dbname']; $dsn .= $params['dbname'];
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment