[rt-users] Desperately ned Oracle help

Baytalskiy, Sal Sal.Baytalskiy at AIG.com
Thu May 17 19:41:34 EDT 2007


Hey guys!
A little update:
i've been looking at the rt-setup-database script trying to figure out how
to get around the issues i'm having.
So the very first error mentioned this: at
//usr/local/rt3_ora/sbin/rt-setup-database line 103 which is this
$dbh = DBI->connect( get_system_dsn(), $args{'dba'}, $args{'dba-password'} )
So i replaced that with: $dbh = DBI->connect( "DBI:Oracle:", $args{'dba'},
$args{'dba-password'} )
 
That seemed to get me a bit farther as i got this output:
Now creating a database for RT.
...skipped as mwpoc is not mwpoc or we're working with Oracle.
DSN component 'CLORAD1' is not in 'name=value' format at
/usr/perl5/site_perl/5.8.4/sun4-solaris-64int/DBI.pm line 627
DBI connect('CLORAD1;port=1521','mwpoc',...) failed: Can't connect using
this syntax without specifying a HOST and one of SID INSTANCE_NAME SERVER
SERVICE_NAME at //usr/local/rt3_ora/sbin/rt-setup-database line 138
Can't connect using this syntax without specifying a HOST and one of SID
INSTANCE_NAME SERVER SERVICE_NAME at
//usr/local/rt3_ora/sbin/rt-setup-database line 138, <STDIN> line 1.
make: *** [initialize-database] Error 255
 
So next, naturally, i looked at line 138 and replaced 
$dbh = DBI->connect( $Handle->DSN, ${RT::DatabaseUser},
${RT::DatabasePassword} ) || die $DBI::errstr;
with
$dbh = DBI->connect( "DBI:Oracle:CLORAD1", ${RT::DatabaseUser},
${RT::DatabasePassword} ) || die $DBI::errstr;
 
That got me a little farther again:
Now creating a database for RT.
...skipped as mwpoc is not mwpoc or we're working with Oracle.
Now populating database schema.
Now inserting database ACLs
Now inserting RT core system objects
[Thu May 17 23:25:02 2007] [crit]: Connect Failed Can't connect using this
syntax without specifying a HOST and one of SID INSTANCE_NAME SERVER
SERVICE_NAME
 at //usr/local/rt3_ora/sbin/rt-setup-database line 390
(/usr/local/rt3_ora/lib/RT.pm:346)
 
Stack trace:
        RT::__ANON__() called at /usr/perl5/5.8.4/lib/Carp.pm:191
        Carp::croak() called at
/usr/perl5/site_perl/5.8.4/DBIx/SearchBuilder/Handle.pm:106
        DBIx::SearchBuilder::Handle::Connect() called at
/usr/perl5/site_perl/5.8.4/DBIx/SearchBuilder/Handle/Oracle.pm:46
        DBIx::SearchBuilder::Handle::Oracle::Connect() called at
/usr/local/rt3_ora/lib/RT/Handle.pm:98
        RT::Handle::Connect() called at
//usr/local/rt3_ora/sbin/rt-setup-database:390
        main::insert_initial_data() called at
//usr/local/rt3_ora/sbin/rt-setup-database:149
Connect Failed Can't connect using this syntax without specifying a HOST and
one of SID INSTANCE_NAME SERVER SERVICE_NAME
 at //usr/local/rt3_ora/sbin/rt-setup-database line 390
make: *** [initialize-database] Error 29
 
I am stuck again though as line 390 is this:
    require RT::Handle;
    $RT::Handle = RT::Handle->new();
    $RT::Handle->Connect();

Since i no nothing about Perl - i have no idea what i have to hardcode here
to get past this.
 
Any ideas, anyone? I'm just trying to hack this script to populate the DB so
i can finally move on to trying to configure the web interface...


  _____  

From: rt-users-bounces at lists.bestpractical.com
[mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Baytalskiy,
Sal
Sent: Thursday, May 17, 2007 5:02 PM
To: Vonnahme, Nathan; Justin Brodley; rt-users at lists.bestpractical.com
Subject: RE: [rt-users] Desperately ned Oracle help


Thanks for your responses !!!
 
Nathan, i ran the script you provided and here's the output:
hello
Oracle
DBD::Oracle::db selectrow_array failed: ORA-00942: table or view does not
exist (DBD ERROR: error possibly near <*> indicator at char 17 in 'select
name from <*>v$database') [for Statement "select name from v$database"] at
testOracle.pl line 20.
10.02.0300
name from v$database: 
 
It seems to be connecting to the DB just fine.
 
I also went through this post:
http://www.zorranlabs.com/articles/step-by-step-installation-dbd-oracle-1.16
-on-solaris-9-and-oracle-9-client.htm
<http://www.zorranlabs.com/articles/step-by-step-installation-dbd-oracle-1.1
6-on-solaris-9-and-oracle-9-client.htm> 
 
And performed the modifications mentioned there. Rebuilt the DBD::Oracle
using only the 32 bit libraries.
And ran the test script at the end of that article. It worked fine. Here's
the outpu:
 
Running testDBDOracle.pl...
  (*) Attempting Oracle Login ...
      OK
  (*) Creating table TEST_DBI ...
      OK
  (*) Insert into TEST_DBI ...
      1 rows inserted.
      1 rows inserted.
      1 rows inserted.
      OK
  (*) Select from TEST_DBI ...
        --> TEST_DBI_INTR_NO :  1000
        --> TEST_DBI_NAME    :  Jeff Hunter
        --> TEST_DBI_INTR_NO :  1001
        --> TEST_DBI_NAME    :  Melody Hunter
        --> TEST_DBI_INTR_NO :  1002
        --> TEST_DBI_NAME    :  Alex Hunter
      OK
  (*) Delete from TEST_DBI ...
      3 rows deleted.
      OK
  (*) Drop table TEST_DBI ...
      OK
  (*) Select USER and SYSTEM ...
        --> USER             :  MWPOC
        --> SYSDATE          :  17-MAY-2007 16:45:59
      OK
  (*) Attempting Oracle Logoff ...
      OK
Ending testDBDOracle.pl...
 
Judging by that output i think my setup is working fine. But the problem
still persists: i'm still unable to run the 'make initialize-database' part
of the install.
 
Still getting the same old error:
DSN component 'CLORAD1' is not in 'name=value' format at
/usr/perl5/site_perl/5.8.4/sun4-solaris-64int/DBI.pm line 627
DBI connect('CLORAD1;port=1521','mwpoc',...) failed: Can't connect using
this syntax without specifying a HOST and one of SID INSTANCE_NAME SERVER
SERVICE_NAME at //usr/local/rt3_ora/sbin/rt-setup-database line 103
Failed to connect to dbi:Oracle:CLORAD1;port=1521 as mwpoc: Can't connect
using this syntax without specifying a HOST and one of SID INSTANCE_NAME
SERVER SERVICE_NAME at //usr/local/rt3_ora/sbin/rt-setup-database line 103,
<STDIN> line 1.
make: *** [initialize-database] Error 255
 
 
Something tells me that it may be an issue with the 'rt-setup-database'
script itself? Is that a possibility?
 


  _____  

From: Vonnahme, Nathan [mailto:nathan.vonnahme at bannerhealth.com] 
Sent: Thursday, May 17, 2007 3:29 PM
To: Baytalskiy, Sal; Justin Brodley; rt-users at lists.bestpractical.com
Subject: RE: [rt-users] Desperately ned Oracle help




  _____  

From: rt-users-bounces at lists.bestpractical.com
[mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Baytalskiy,
Sal
Sent: Thursday, May 17, 2007 9:47 AM
To: Justin Brodley; rt-users at lists.bestpractical.com
Subject: RE: [rt-users] Desperately ned Oracle help


The Oracle readme said that the DB needs to be prepared.
So i ran the schema.Oracle file via the SQLPlus and it inserted all the
tables and indexes.
So i now have the database setup, just empty. No data.
Then, while running the 'make initialize-database' there's a step in that
script to insert the schema. Since i already did that - i commented it out,
just like the Wiki suggests.
So that step should be skipped and it should just try to insert the required
data into the DB.
And that's where i'm stuck at this point.
 
After some googling i found that i might have a problem with the
DBD::Oracle. Apparently it tried installing that module as a 64-bit.
But my Perl is 32-bit. This seems to be a common occurence.
 

 
 
It may help to narrow the problem by testing DBD::Oracle first.  Try using
the 'dbish' utility installed with DBI, or with a test script like this
(copied and pasted from one I used a while back-- I had to mess with
manually setting $ORACLE_HOME and $LIBPATH in some cases):
 
#!/usr/local/bin/perl -w
 
print "hello\n";
 
use DBI;
#use DBD::Oracle;
 
#print "ENV:\n", map {"  $_:  $ENV{$_}\n"} sort keys %ENV;
 
if ($^O =~ m/aix/i) {
        $ENV{ORACLE_HOME} = '/usr/local/oracle/instantclient';
        $ENV{LIBPATH} = $ENV{ORACLE_HOME};
}
 
my $dbh = DBI->connect('dbi:Oracle:host=clorad1.aig.com;sid=clorad1',
'user', 'password');
 
print join "\n", $dbh->get_info(17),
        $dbh->get_info(18);
 
print "\nname from v\$database:  ", $dbh->selectrow_array("select name from
v\$database");
 
print "\n\n";

 
I had trouble in the past with 64 / 32 bit perl and Oracle client libs, so
if you do this and still think that may be the issue I can send you my notes
on that, or you can probably google them up somewhere.
 
-n
 
 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20070517/7bb8255d/attachment.htm>


More information about the rt-users mailing list