yeru1 has asked for the wisdom of the Perl Monks concerning the following question:

Help me if you can. I have the following code which works perfectly when i run from Unix command line. But doesn't work when executed via AutoSys.
#!/tools/perl-5.8.0/bin/perl -w use strict; use warnings; use DBI; $ENV{SYBASE}='/tools/sybase'; my $db = DBI->connect("DBI:Sybase:dbname=booty","j","lo", {RaiseError => 1, AutoCommit => 0 } ) || die "Unable to connect to database: $DBI::errstr"; print "\n All is well that ends well! \n"; $db->disconnect(); exit;
When i place the script in a job scheduler (AutoSys)and execute it, i get the following error:

install_driver(Sybase) failed: DBD::Sybase initialize: ct_init(1100) failed at /tools/perl-5.8.0/lib/5.8.0/sun4-solaris/DynaLoader.pm line 249. Compilation failed in require at (_eval 1) line 3. #

I am using the same account to run the script on the command line as well as AutoSys. I double checked the environment variables for sybase and they are the same.

Any help is truely appreciated

Edit by castaway - added formatting tags

Replies are listed 'Best First'.
Re: DBI Sybase AutoSys (env. var)
by mpeppler (Vicar) on Mar 04, 2005 at 20:05 UTC
    You may have a different LD_LIBRARY_PATH value, or some other environment variable that isn't set correctly when running the script under the scheduler. The ct_init() failure is usually caused by not finding the appropriate configuration files (locale files, for example).

    Michael