I made an entry in the /etc/host file for the server and changed the connect
string to look like this:
$dbh = DBI->connect('dbi:Oracle:psysrp1@panorama',$username,$passwd);
Now I have another error: ORA-12154
The oracle dba reminded me that I can look up the error messages using oerr
[3 letter] [err number]. This one appears to be related to a TNS names
problem. In my case, a lack of that file all together. Once I create it, I
should be able to connect. Hopefully.
- Kirk
-----Original Message-----
From: Hardy Merrill [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 05, 2001 3:03 PM
To: Bruce W. Hoylman
Cc: DBI User List; Tarou, Kirk
Subject: Re: ORA-06401 error
Bruce W. Hoylman [[EMAIL PROTECTED]] wrote:
> >>>>> "Kirk" == Kirk Tarou <Tarou> writes:
>
> Kirk> When trying to connect to a remote Oracle server, I get the
> Kirk> following error:
> DBI-> connect(T:xxx.xxx.xxx.xxx:psysrp1) failed: Error while trying
> DBI-> to
> Kirk> retrieve text for error ORA-06401 (DBD ERROR: OCIServerAttach)
> Kirk> at test.pl line 10
I'm actually interested in this "Error while trying to retrieve text
for error" message - I'm getting the same message for any Oracle error
on an Oracle client machine. What more do I need, or what did I do
wrong on the Oracle client install?
>
> 06401, 00000, "NETCMN: invalid driver designator"
> // *Cause: The login (connect) string contains an invalid driver
designator.
> // *Action: Correct the string and re-submit.
>
>
> Kirk> my line ten looks like this:
>
> Kirk> $dbh = DBI->connect('dbi:oracle:T:xxx.xxx.xxx.xxx:psysrp1',
> Kirk> $username, $password, { RaiseError=> 1, AutoCommit});
>
> The DBI documentation (an invaluable resource) states:
>
> Examples of "$data_source" values are:
>
> dbi:DriverName:database_name
> dbi:DriverName:database_name@hostname:port
>
dbi:DriverName:database=database_name;host=hostname;port=port
>
Also, take a look at the DBD::Oracle perldoc documentation by doing
"perldoc DBD::Oracle" - there is some great info about using the
TWO_TASK environment variable to specify 'T:Machine:SID' and similar
things.
--
Hardy Merrill
Mission Critical Linux, Inc.
http://www.missioncriticallinux.com