Bug #20417
closedCannot connect to non-local Oracle database with SID
0%
Description
When accessing an external Oracle database (ie not on localhost), we have either to use
$typo_db_username = 'username';
$typo_db_password = 'password';
$typo_db_host = 'somehost.domain';
$typo_db = 'servicename';
or
$typo_db_username = 'username';
$typo_db_password = 'password';
$typo_db_host = '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=somehost.domain)(PORT=1521))(CONNECT_DATA=(SID=somesid)))';
$typo_db = '';
But then TYPO3 complains that no database was selected although it works!
To connect to an external with a SID, the trick is to use
$typo_db_username = 'username';
$typo_db_password = 'password';
$typo_db_host = 'somehost.domain';
$typo_db = 'somesid';
AND modify file 'typo3/sysext/adodb/adodb/driversadodb-oci8.inc.php' to set
var $connectSID = true;
instead of
var $connectSID = false;
What would be great is to be able to set this variable without modifying the ADOdb source from within localconf.php.
(issue imported from #M11076)
Files
Updated by Karsten Dambekalns over 15 years ago
Something like the attached code might solve this "universally"
Updated by Xavier Perseguers over 15 years ago
Patch 11076.diff (based on driverOptions.php from Karsten) allows to connect to Oracle using a SID:
$TYPO3_CONF_VARS['EXTCONF']['dbal']['handlerCfg'] = array(
'_DEFAULT' => array(
'type' => 'adodb',
'config' => array(
'driver' => 'oci8',
'driverOptions' => array(
'connectSID' => true,
),
),
),
);