Home: Perl Programming Help: Beginner:
ORA 12560-connectivity error



steve798
Novice

Nov 15, 2017, 9:08 AM


Views: 4902
ORA 12560-connectivity error

I am getting a connectivity error on the line from code below. Not sure if the error is syntax or a connectivity to the Oracle DB


Code
my $dbh = DBI->connect("dbi:Oracle:$db", $user, $pw) or die("Cannot connect to '$db' " . DBI->errstr());



Error message from the line of code above..

Code
Use of uninitialized value in concatenation (.) or string on line 29. 
DBI connect('','',...) failed: ORA-12560: TNS:protocol adapter error (DBD ERROR: OCIServerAttach)



FishMonger
Veteran / Moderator

Nov 15, 2017, 2:49 PM


Views: 4897
Re: [steve798] ORA 12560-connectivity error

One or more of your vars are undefined. User the Data::Dumper (or similar) module to dump your vars to see what the contain.


steve798
Novice

Nov 16, 2017, 2:43 PM


Views: 4882
Re: [FishMonger] ORA 12560-connectivity error

Thank you, was missing a parameter when executing a script