Welcome Guest, Not a member yet? Register   Sign In
CI And Oracle (Unable to connect to your database server using the provided settings.)
#1

[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 .....
#2

[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.
#3

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

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




Theme © iAndrew 2016 - Forum software by © MyBB