CodeIgniter Forums
CI And Oracle (Unable to connect to your database server using the provided settings.) - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: CI And Oracle (Unable to connect to your database server using the provided settings.) (/showthread.php?tid=35597)



CI And Oracle (Unable to connect to your database server using the provided settings.) - El Forum - 11-04-2010

[eluser]Atik[/eluser]
Dear all,
i got a problem with CI and Oracle..
My Database Configuration file is
I use Xamp and Oracle 10G
Code:
/////////////////////////////////////

$active_group = "default";
$active_record = TRUE;
$dbhost = "localhost";    //host
$dbport= "1521";          //port default is 1521
$dbname = "ORCL";        //name of database  
$dbuser = "JBC";      //db user with all priviliges
$dbpassword = "Asdf1234";    // password of user
$dbConnString = "(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = ".$dbhost.")(PORT = ".$dbport."))
  )(CONNECT_DATA =(SERVICE_NAME = ".$dbname.")))";    // connection string for this we must create TNS entry for Oracle
  
$db['default']['hostname'] = $dbConnString;
$db['default']['username'] = $dbuser;
$db['default']['password'] = $dbpassword;
$db['default']['database'] = "";
$db['default']['dbdriver'] = "oci8";
$db['default']['dbprefix'] = "";
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = "";
$db['default']['char_set'] = "utf8";
$db['default']['dbcollat'] = "utf8_general_ci";

Error is Unable to connect to your database server using the provided settings
Can Any One Solve this problem .....


CI And Oracle (Unable to connect to your database server using the provided settings.) - El Forum - 11-04-2010

[eluser]jrtashjian[/eluser]
Although I've never use Oracle the only problem I see in this code is that
Code:
$db['default']['database']
is left blank. Should it be
Code:
$db['default']['database'] = $dbname;
?

Just a thought.


CI And Oracle (Unable to connect to your database server using the provided settings.) - El Forum - 11-11-2010

[eluser]Atik[/eluser]
Yeaaa. i solve it.
its a matter of TNS


CI And Oracle (Unable to connect to your database server using the provided settings.) - El Forum - 11-18-2010

[eluser]auximage[/eluser]
What was the TNS you ended up using?