unable to connect to database server with provided setting

#1
[eluser]Pramod[/eluser]
I am using codeIgnitor and oracle 10g for application development. I am using linux server. message "Unable to connect database server ....." is seen. Can anybody help me??

Thnaks in advance.

#2
[eluser]kikz4life[/eluser]
post your code and did you check your connection setting in database.php?

#3
[eluser]Pramod[/eluser]
I have centOS version 5.1 server and database is 10g 2.0 oracle version. I have set the sid and username and password correctly. It was formerly working in another server. But now it give the error "Unable to connect database server using provided setting". Apache version is 2.2.4. and php version is 5.1.2.

#4
[eluser]rogierb[/eluser]
Your connection settings are wrong. It's that simple. Check your settings, not only in database.php but at your database server aswell. The fact it was working at a previous server should give you a hint at where to start.

#5
[eluser]Pramod[/eluser]
Problem is solved now. I have kept the connection string for sid. I replaced it with database hostname. Now it works.

#6
[eluser]alejandronanez[/eluser]
Hey I have a problem with my Oracle 10g XE data base

Code:
$db['default']['hostname'] = "//127.0.0.1/apex";
$db['default']['username'] = "sig";
$db['default']['password'] = "sig";
$db['default']['database'] = "";
$db['default']['dbdriver'] = "oci8";

is that right?

Ci says this:

Quote:A Database Error Occurred

Unable to connect to your database server using the provided settings.

Please! I need HELP!

Bye!

#7
[eluser]Pramod[/eluser]
Hello alejandronanez,
if you have your database installed in another server then you should assign hostname like this

Code:
$sid = "(DESCRIPTION =
                            (ADDRESS_LIST =
                            (ADDRESS = (PROTOCOL = TCP)(HOST = ".$dbhost.")(PORT = ".$dbport."))
                            )
                            (CONNECT_DATA =
                                (SERVICE_NAME = ".$dbname.")
                            )
                       ) ";
Code:
//$dbport=1521
//$dbhost=Database Server's IP Address
//$dbname=Database name

now you have connection setting as

Code:
$db['default']['hostname'] = $sid;
$db['default']['username'] = 'sig';
$db['default']['password'] = 'sig';
$db['default']['database'] = "";
$db['default']['dbdriver'] = "oci8";

If database server and apache server is in same machine you can directly use

Code:
$db['default']['hostname'] = 'sid';//only the database name
$db['default']['username'] = 'sig';
$db['default']['password'] = 'sig';
$db['default']['database'] = "";
$db['default']['dbdriver'] = "oci8";

#8
[eluser]alejandronanez[/eluser]
HEy, I;m using Oracle 10g XE , is the database called 'XE' ?

Thanks!!!

#9
[eluser]alejandronanez[/eluser]
Hey, here's my original POST, there's more information about the problem with the connection.

My post - Ci Forums

I really appreciate your help.

Bye Smile


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.