HOW PERL CONNECT 10G RAC DATABASE WITHOUT 'SYSDBA' PRIVILEGE? [message #352665] |
Wed, 08 October 2008 21:01 |
abudabud
Messages: 3 Registered: October 2008
|
Junior Member |
|
|
have Perl 5.8 and Oracle 10g RAC database installed, I can write Perl program to connect 10g RAC database successfully, but the database user must be granted with 'sysdba' privilege to connect. If I only grant 'create session' but no 'sysdba' to a db user, and try to connect with the perl program (Entry 'DBNAME' already added in tnsnames.ora, with 2 node hostname included):
my $dbh=DBI->connect('DBI:Oracle:DBNAME','dbuser1','dbpwd');
It will throw error: ORA-01031: insufficient privileges (DBD ERROR:
OCISessionBegin)
So, may I know how can I connect 10g RAC with Perl without 'sysdba' privilege granted to db user?
Thank you very much for your help
|
|
|
|
Re: HOW PERL CONNECT 10G RAC DATABASE WITHOUT 'SYSDBA' PRIVILEGE? [message #352670 is a reply to message #352668] |
Wed, 08 October 2008 21:49 |
abudabud
Messages: 3 Registered: October 2008
|
Junior Member |
|
|
Thank you for your reply.
Acutally, we do not want to grant 'sysdba' to normal db user, my test steps are:
1) create user zzz identified by zzz;
grant create session,connect to zzz;
2) perl perl-rac.pl
Result: DBI connect('ZZZ','zzz',...) failed: ORA-01031: insufficient privileges (DBD ERROR: OCISessionBegin) at tperl-rac.pl line 8
3) To test, we grant additional 'sysdba' to zzz;
Test again, it can return result of the sql query inside my test perl script without error.
|
|
|
|
Re: HOW PERL CONNECT 10G RAC DATABASE WITHOUT 'SYSDBA' PRIVILEGE? [message #352673 is a reply to message #352672] |
Wed, 08 October 2008 22:30 |
abudabud
Messages: 3 Registered: October 2008
|
Junior Member |
|
|
Thank you.
Yes, I can login normally without error using sqlplus, I have added tns name 'ZZZ' with 2 node hostname in tnsnames.ora :
$ sqlplus zzz@ZZZ
SQL*Plus: Release 10.2.0.3.0 - Production on Thu Oct 9 11:22:43 2008
Enter password:
SQL> show user;
USER is "ZZZ"
SELECT a from zzz.tbl1; (2 rows return)
And using this normal db user (without 'sysdba'), I can connect it successfully through Perl to any one of the single node (specify SID instance name in perl) within the RAC, without error.
The only problem occurs is try to connect both node in RAC using perl. I have created a table 'tbl1' under user schema 'zzz', with 2 rows in it.
[Updated on: Thu, 09 October 2008 04:09] Report message to a moderator
|
|
|