PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: "Ashish Gupta" <ashish dot gupta at mizuho-sc dot com>
Subject: sybperl, cron and environment variables
Date: Apr 6 2006 6:06AM

Hi,

Please can you help me with a problem probably regarding environment
variables.

I had written some scripts in perl and sybperl and put them in the cron.
examples:

----------------------------------------------------------------
01 20 * * * /home/sybase/dbalib/bin/run_dbcc     -s SYB_DBA61_TKD 
01 21 * * * /home/sybase/dbalib/bin/update_stats -s SYB_DBA61_TKD 
01 22 * * * /home/sybase/dbalib/bin/dump_db      -s SYB_DBA61_TKD
-syb_zip
#
01  6 * * * /home/sybase/dbalib/bin/check_space  -s SYB_DBA61_TKD
----------------------------------------------------------------

They were working fine.

Then, I think I installed Replication Server.
And these scripts stopped working!

I get an error of the following type:

----------------------------------------------------------------
Your "cron" job on tktecwsd20
/home/sybase/dbalib/bin/run_dbcc     -s SYB_DBA61_TKD 

produced the following output:

Sybase::CTlib initialize: ct_init(12500) failed at
/home/sybase/perl/lib/5.8.6/sun4-solaris-thread-multi/DynaLoader.pm line
253.
Compilation failed in require at
/home/sybase/dbalib/bin/../lib/DBAlib.pm line 86.
BEGIN failed--compilation aborted at
/home/sybase/dbalib/bin/../lib/DBAlib.pm line 86.
Compilation failed in require at /home/sybase/dbalib/bin/run_dbcc line
11.
BEGIN failed--compilation aborted at /home/sybase/dbalib/bin/run_dbcc
line 11.
----------------------------------------------------------------

When I run the script interactively, by default I get this error.
But if I set the environment variables related to sybase correctly - via
SYBASE.csh - then the scripts work fine.

What I do not understand is: why were the cron jobs working fine earlier
on? and why do they fail now.


Thanks for your kind help.

Best regards,
Ashish


Note: This e-mail contains privileged and confidential information and is for the sole use of the intended recipient(s).  If you are not an intended recipient, you are hereby kindly requested to refrain from printing, copying, or distributing the information contained herein.  Furthermore, any other use of the information contained herein is strictly prohibited.  If you have received this transmission in error, please kindly notify the sender immediately and destroy all copies of the original message.