I'm trying to connect to our database in our production environment. I am getting the 107 ISAM error: record is locked . I have checked various articles on what it could be, but no luck. I double checked the database details with our DBA and the information is correct.
FYI - Also the first error previous to the "record is locked" error I received was SQL: -931: Cannot locate web1_tcp service/tcp service in /etc/services. at test_db_connectivity.pl line 13. . I worked with our SA to get that entered and that is no longer appearing. Can anyone offer any guidance on the ISAM 107 error? Is my connection string wrong? There shouldn't be a lock because I am not even opening a connection to the database.
test_db_connectivity.pl:
#/usr/bin/perl -w
use DBI;
use strict;
use DBI qw(:sql_types);
use DBD::Informix qw(:ix_types);
my $driver = "Informix";
my $database = "web1";
my $dsn = "DBI:$driver:dbname=$database";
my $userid = "user";
my $password = "password";
print "I got this far!\n";
my $dbh = DBI->connect($dsn, $userid, $password, {RaiseError => 1}) or die $DBI::errstr;
print "Opened db successfully\n";
$dbh->disconnect();
Some of the variables set:
export INFORMIXDIR=/opt/informix
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INFORMIXDIR/lib:$INFORMIXDIR/lib/cli:$INFORMIXDIR/lib/esql:$INFORMIXDIR/lib/tools
export INFORMIXSERVER=web1
INFORMIX SQLHOSTS FILE:
#dbservername nettype hostname servicename options
web1 onsoctcp 10.199.***.* web1dev1_tcp
etc/services FILE:
web1dev1_tcp 1533/tcp # Port assigned to database
virtual-places 1533/tcp # Virtual Places Software
web1dev1_tcp 1533/udp # Port assigned to database