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
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.