Connect without an entry in TNSNAMES.ORA
- From: "Eric P" <peterson_eric_d@xxxxxxxxxxx>
- Date: 7 Nov 2006 12:45:54 -0800
Is it possible to do a connect to a database when there is no entry in
the local machines TNSNAMES.ORA file?
I've tried the following, but to no avail.
....
my $conn = "dbi:Oracle:HOST=$host;SID=$sid;port=1521";
my $db_h = DBI->connect ( $conn,
$user,
$pwd,
{
AutoCommit => 0, # 0 = false
RaiseError => 0,
PrintError => 0,
ChopBlanks => 1 # CHAR chopped
}
) || BEGIN { print color 'red on_black';
warn "\n" . "x" x 70 . "\n" .
"\t--> Connecting to " .
uc ( $sid ) . " as " .
uc ( $user ) . " <--\n\n"
..
$DBI::errstr .
"\n" . "x" x 70 . "\n";
print color 'reset';
print "\n";
return undef;
};
....
I get the following errors
***********************************************************************
Fatal NI connect error 12541, connecting to:
(DESCRIPTION=(ADDRESS=(HOST=machineA.com)(PROTOCOL=tcp)(PORT=1521))(CONNECT_DATA=(SID=aaa)(CID=(PROGRAM=t2.pl@bbb)
(HOST=aaa)(USER=uuuuu))))
***********************************************************************
Fatal NI connect error 12535, connecting to:
(DESCRIPTION=(ADDRESS=(HOST=machineA.com)(PROTOCOL=tcp)(PORT=1521))(CONNECT_DATA=(SID=aaa)(CID=(PROGRAM=t2.pl@bbb)
(HOST=aaa)(USER=uuuuu))))
***********************************************************************
Fatal NI connect error 12505, connecting to:
(DESCRIPTION=(ADDRESS=(HOST=machineA.com)(PROTOCOL=tcp)(PORT=1521))(CONNECT_DATA=(SID=aaa)(CID=(PROGRAM=t2.pl@bbb)
(HOST=aaa)(USER=uuuuu))))
.
- Follow-Ups:
- Re: Connect without an entry in TNSNAMES.ORA
- From: Eric P
- Re: Connect without an entry in TNSNAMES.ORA
- Prev by Date: Re: The procedure entry point Perl_Glockhook_ptr could not be located in the dynamic link library perl58.dll
- Next by Date: Re: Connect without an entry in TNSNAMES.ORA
- Previous by thread: The procedure entry point Perl_Glockhook_ptr could not be located in the dynamic link library perl58.dll
- Next by thread: Re: Connect without an entry in TNSNAMES.ORA
- Index(es):
Relevant Pages
|
|