| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-07217, environment variables
ok ..
Try this...
add another entry into your tnsnames.ora for the database with the service name "dba". Only this time tns alias it "myass".
Then try your script. 'dbi:Oracle:myass'
Perl DBI has so many ways of connecting to the database that I just made a safer bet. Here is what shows up as the different ways of connecting (see documentation by typing "perldoc DBD::Oracle")
$dbh = DBI->connect('dbi:Oracle:T:Machine:SID','username','password')
$dbh = DBI->connect('dbi:Oracle:','username_at_T:Machine:SID','password')
$dbh = DBI->connect('dbi:Oracle:','username_at_DB','password')
$dbh = DBI->connect('dbi:Oracle:DB','username','password')
$dbh = DBI->connect('dbi:Oracle:DB','username/password','')
$dbh = DBI->connect('dbi:Oracle:host=foobar;sid=ORCL;port=1521', 'scott/tiger', '')
$dbh = DBI->connect('dbi:Oracle:', q{scott/tiger@(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST= foobar)(PORT=1521))
(CONNECT_DATA=(SID=ORCL)))}, "")
.... where DB is the tnsalias.
Anurag
"srivenu" <srivenu_at_hotmail.com> wrote in message news:1a68177.0208260510.174f68b_at_posting.google.com...
> DBI:ORACLE:xxx
> xxx is a service name which we had defined in TNSNAMES.ORA
>
> for ex: This is from one of my programs
>
> my $dbh = DBI->connect( 'dbi:Oracle:dba',
> 'xxx',
> 'xxx',
> {
> RaiseError => 1,
> AutoCommit => 0
> }
> ) || die "Database connection not made: $DBI::errstr";
>
> Here dba is a service name that i had defined in my TNSNAMES.ORA
Received on Tue Aug 27 2002 - 01:02:51 CDT
![]() |
![]() |