[1356] in Moira
Re: perl dbi install problem
daemon@ATHENA.MIT.EDU (Garry Zacheiss)
Wed Feb 16 02:08:31 2000
Message-Id: <200002160708.CAA25530@e40-spare-ss20.mit.edu>
To: Matt Braun <matt@MIT.EDU>
cc: bug-moira@MIT.EDU
In-Reply-To: Your message of "Sun, 13 Feb 2000 20:29:49 EST."
<200002140129.UAA15978@forever.mit.edu>
Date: Wed, 16 Feb 2000 02:08:27 -0500
From: Garry Zacheiss <zacheiss@MIT.EDU>
>> On ttsp:
>>
>> this-too-shall-pass.mit.edu# /moira/bin/dcm sapprint
>> dcm: running /moira/bin/sapprint.gen
>> DBI->connect failed: ORA-12203: TNS:unable to connect to destination (DBD:
>> login failed) at /moira/bin/sapprint.gen line 14
>> dcm: DBMS system error occurred in /moira/bin/sapprint.gen
>> dcm: DCM building config files for sapprint: DBMS system error occurred
>>
>> Starting SQL manually works fine...and other perl DBI stuff fail as well.
The sapprint dcm gets as far as it should on ttsp now, although it
looks like my initial guess about what the problem was was wrong. It
looks more like perl DBI suddenly started doing things differently. The
patch below makes it work;; It's now getting the first "moira" from
$ORACLE_SID, and was apparently interpreting the deleted one as a
hostname; It was clearly trying to connect to a tcp port somewhere using
sqlnet.
Go ahead and play with ttsp; connecting with changed line below works
just fine. I'll sit down and think about this some more with Mike
before deciding if this should be checked in.
Garry
Index: sapprint.gen
===================================================================
RCS file: /afs/athena.mit.edu/astaff/project/moiradev/repository//moira/gen/sapprint.gen,v
retrieving revision 1.1
diff -c -r1.1 sapprint.gen
*** sapprint.gen 1999/09/17 21:25:24 1.1
--- sapprint.gen 2000/02/16 07:00:04
***************
*** 11,17 ****
use DBI;
! $dbh = DBI->connect("dbi:Oracle:moira", "moira", "moira")
|| exit $MR_DBMS_ERR;
$sth = $dbh->prepare("SELECT p.name, p.hwtype, p.location, p.duplexname, p.rp, m.name ".
--- 11,17 ----
use DBI;
! $dbh = DBI->connect("dbi:Oracle:", "moira", "moira")
|| exit $MR_DBMS_ERR;
$sth = $dbh->prepare("SELECT p.name, p.hwtype, p.location, p.duplexname, p.rp, m.name ".