$active_group = “default”; $active_record = TRUE; $dbhost = “172.18.3.226”; //host $dbport= “1521”; //port default is 1521 $dbname = “testing”; //name of database $dbuser = “testuser”; //db user with all priviliges $dbpassword = “testuser”; // 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”;
Outra forma que deu certo:
$active_group = 'default'; $active_record = TRUE; $tnsname = '(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE)))'; $db['default']['hostname'] = $tnsname; $db['default']['username'] = 'XXXXXX'; $db['default']['password'] = 'XXXXX'; $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'; $db['default']['swap_pre'] = ''; $db['default']['autoinit'] = TRUE; $db['default']['stricton'] = FALSE;
Nenhum comentário:
Postar um comentário