0

I installed the oci driver and was able to use oracle as the database after reading from this link:

https://docs.joomla.org/How_to_connect_to_an_external_database

    $options['host'] = '192.168.3.78:1521'; 
    $options['username'] = 'bdesws_usr';
    $options['password'] = 'abc123';
    $options['schema'] = 'bdesws_usr';
    $options['service_name'] = 'orcl.bdes';

    $db = new JDatabaseDriverOracle($options);   

However, this error occurs:

ORA-12545: Connect failed because target host or object does not exist

the host actually exists because I am using the host '192.168.3.78' and also the port '1521' in connecting to Sql Developer.

0
1

Oracle will default set the port to 1521. So try removing your port from the $host option. If you want to explicitly set it then place it in the $options array.

https://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/database/driver/pdo.php#L215

So with that in mind try this (note untested):

$options['host'] = '192.168.3.78';
$options['port'] = 1521;
$options['username'] = 'bdesws_usr';
$options['password'] = 'abc123';
$options['schema'] = 'bdesws_usr';
$options['service_name'] = 'orcl.bdes';

$db = new JDatabaseDriverOracle($options);   
2
1

If you are using an external database (database installed outside of hosting domain.), then you have to make sure that you are allowed to connect to database remotely (Even on intranet).

Hopefully this will help you:

https://stackoverflow.com/a/8108500/3260012

https://dba.stackexchange.com/questions/13227/how-can-i-allow-an-oracle-database-to-be-accessed-remotely

http://docs.oracle.com/cd/B25329_01/doc/admin.102/b25107/network.htm

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.