Welcome Guest, Not a member yet? Register   Sign In
Oracle SYS as SYSDBA Connection
#1

[eluser]Unknown[/eluser]
Hi CI experts,
I have a project using CodeIgniter (version 2.1.0) and Oracle as its database.
The problem is it has to connect using SYS account as SYSDBA.
Here is the code:
Code:
function ora_conn()
{
$oradb=array();
$oradb['hostname']= "<listener identifier, I'm not using TNS input>";
$oradb['username']= "SYS AS SYSDBA";
$oradb['password']= "oracle";
$oradb['dbdriver']= "oci8";
$oradb['pconnect']= FALSE;
$oradb['db_debug']= FALSE;
$oradb['cache_on']= FALSE;
$oradb['charset'] = 'utf8';
$oradb['dbcollat']= 'utf8_general_ci';

$odb=$this->load->database($oradb,TRUE);
return $odb;
};
I gave 3 different possibilities for variable $oradb['username']:
1. "SYS"
Result: "ORA-28009: connection as SYS should be as SYSDBA or SYSOPER"
2. "SYS AS SYSDBA"
Result: "ORA-01017: invalid username/password; logon denied"
3. some users apart from SYSDBA
Result: connected.

for point 2, I'm pretty sure about the password for SYS account, I think the problem is how to declare "AS SYSDBA" in the connection configuration.

any idea ?

Thanks in advance,
yusata.
#2

[eluser]weboap[/eluser]
check this
http://ellislab.com/forums/viewthread/68453/

http://codeigniter.com/wiki/Oracle:Known_Issues/


hope it help!




Theme © iAndrew 2016 - Forum software by © MyBB