On Tue, 10 Sep 2002 14:25:57 -0700 John Gedeon <[EMAIL PROTECTED]> wrote:

>     I am installing a bug reporting tool called Resource Tracker (RT for 
> short). I finially got all the modules installed however when I try to 
> install this tool it fails when it tries to connect to the oracle
> database. 
> I have a short script that can connect to the database but not the big make 
> file.
> 
>      the make file returns:
> 
> DBI->connect(dbname=kdqctdev;host=winchester) failed: Can't connect using 
> this syntax without specifying a HOST and a SID at 
> /local/mnt/workspace/jgedeon/local/lib/perl5/site_perl/5.8.0/DBIx/SearchB
> uilder/Handle.pm line 117
> Connect Failed Can't connect using this syntax without specifying a HOST 
> and a SID
>   at //local/mnt/workspace/jgedeon/local/rt2/etc/insertdata line 27

Please cut and paste the exact text of section in insertdata that
includes the DBI connnect().

Setting environment variable DBI_TRACE will let you see what connect()
thinks is happening without having to change the script.  Look in the fine
manual (perldoc DBI) and search for DEBUGGING to see some useful values. 
Level 2 tracing should get you started.

>     my short script uses  the following lines to login.
> use DBI;
> use DBD::Oracle;

You don't need to 'use' DBD::Oracle; connect() determines the driver
automagically.

I don't see '#! .../perl -w' or 'use strict;'.  Both would be a very good
idea.

> $dbh = DBI->connect("KDQCTDEV","restrack","res4now","Oracle");

That connect syntax is a bit old-fashioned, but it should still work. 
Nowadays, most use something like this:

   my $dbh = DBI -> connect( "dbi:Oracle:$instance", $uid, $pwd,
      { AutoCommit => 0, PrintError => 0, RaiseError => 1} );
   # Add 'or die $DBI::errstr' if RaiseError => 0

>    the oracle database is on a different machine,
>    perl and apache are installed on a solaris 2.8 os

-- 
Mac :})
** I normally forward private questions to the appropriate mail list. **
Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.

  • Lost John Gedeon
    • Michael A Chase

Reply via email to