Rt-setup-database - TNS:listener does not currently know of SID given in connect descriptor

Hi all,

I’m fighting some issues with the database upgrade utility (on a new install) it’s not playing nice with Oracle Instant client.

In depth: I have a new host with 5.0 install, and I’m pointing it to a 3.8.7 database to upgrade it, thus running the upgrade script.

[root@310cdac4fe32 rt5]# echo $ORACLE_HOME
[root@310cdac4fe32 rt5]# echo $TNS_ADMIN

tnsnames.ora is configured with the SID entry.

Database params are configured in RT_SiteConfig.pm

I cannot get past:

DBI connect('sid=SOMETHING;host=myhost.mydomain;port=1521','RT',...) failed: ORA-12505: TNS:listener does not currently know of SID given in connect descriptor (DBD ERROR: OCIServerAttach)

Now, running the following test script is working successfully:


use strict;
use DBI;

my $machine = 'someserver.example.com';
my $port = 1521;
my $sid = 'BLAH.eample.com';
my $user = 'rt';
my $pass = 'somepass';
my $dbh = DBI->connect("dbi:Oracle://$machine:$port/$sid", $user, $pass) ||
  die "Failed to connect: $DBI::errstr\n";

However, as mentioned the RT db utility ./sbin/rt-setup-database is giving me the SID error.

Is it looking in a particular place for the tnsnames.ora???

Any help would be really appreciated!


Seems like there is a great deal of disparity here between SID and ServiceName.

For my database the SID is say “foo” and the ServiceName is “bar” - which is kind of also an SID… but the database exists under “bar” not the root “foo” if that makes sense.

Please note, this is 12c (old setup is pointed to 10g, which is working)…
So, maybe this is an issue with incompatibility with the way 12c handles SID’s and RT?

This spilled over into another thread, which is now solved, in-turn solving the issue here.