Commit ca566a13 authored by facupanizza's avatar facupanizza

ORACLE, (INSTANCE_NAME = XXXXX)

Hello, first sorry for my English. 
I need to put in the ORACLE Connection string to the parameter: (INSTANCE_NAME = XXXXX) 

I was reading the source code at github and the latest version does not include this possibility in the method getEasyConnectString. 

Could add to the next version an element in the array of parameters, eg $params['instance_name'] and concatenating that value to the Connection string? 

Thank you, greetings 
Facundo Panizza
parent c61361d8
......@@ -124,10 +124,15 @@ abstract class AbstractOracleDriver implements Driver, ExceptionConverterDriver
$service = 'SID=' . $serviceName;
$pooled = '';
$instance = '';
if (isset($params['service']) && $params['service'] == true) {
$service = 'SERVICE_NAME=' . $serviceName;
}
if (isset($params['instance_name']) && ! empty($params['instance_name'])) {
$instance = '(INSTANCE_NAME = ' . $params['instance_name'] . ')';
}
if (isset($params['pooled']) && $params['pooled'] == true) {
$pooled = '(SERVER=POOLED)';
......@@ -135,7 +140,7 @@ abstract class AbstractOracleDriver implements Driver, ExceptionConverterDriver
return '(DESCRIPTION=' .
'(ADDRESS=(PROTOCOL=TCP)(HOST=' . $params['host'] . ')(PORT=' . $params['port'] . '))' .
'(CONNECT_DATA=(' . $service . ')' . $pooled . '))';
'(CONNECT_DATA=(' . $service . ')' . $instance . $pooled . '))';
}
......
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