RE: Why isn't my script running?

From: Xu, Roger <Roger.Xu_at_dpsg.com>
Date: Tue, 24 Feb 2009 11:25:42 -0700
Message-ID: <C7F02F80BA89DB47AA7345919AF9F72C015CAB7B_at_bcxoemb02.dpsg.net>



Make sure you export all the environment variables: ORACLE_SID ORACLE_HOME .. etc.  

From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Eugene Pipko Sent: Tuesday, February 24, 2009 12:15 PM To: 'oracle-l_at_freelists.org'
Subject: Why isn't my script running?  

Hi all,

I am new to shell. I need to calculate stats for a schema using cron (oracle linux 4).

For some reason my script is not running.


#!/bin/ksh

USER=SYSTEM PASSWORD=pwd

sqlplus -s $USER/$PASSWORD <<EOF

set feed off

set head off

set pagesize 0

exec
dbms_stats.gather_schema_stats('TEST',ESTIMATE_PERCENT=>30,CASCADE=>TRUE );

/

exit 0;

EOF


 

Then in Linux:

00 01 * * 7 /home/oraprd/scripts/test_schema_stats.sh 1&2 >>
/home/oraprd/scripts/logs/test_schema_stats.log
 

Thanks,

Eugene Pipko

P Please consider the environment before printing this e-mail.    

http://www.drpeppersnapplegroup.com/about/corporate to learn more about Dr Pepper Snapple Group’s commitment to corporate social responsibility.

Please be conscious of the environment and print this email only if absolutely necessary. This e-mail (including any attachments) is confidential and may contain privileged information of Dr Pepper Snapple Group, Inc. and/or its subsidiaries ("Dr Pepper Snapple Group"). If you are not the intended recipient or receive it in error, you may not use, distribute, disclose or copy any of the information contained within it and it may be unlawful to do so. If you are not the intended recipient, please notify us immediately by returning this e-mail to us at mailto:mailerror_at_dpsg.com and destroy all copies. Any views expressed by individuals within this e-mail do not necessarily reflect the views of Dr Pepper Snapple Group. This e-mail does not constitute a binding offer, acceptance, amendment, waiver or other agreement, unless the intent that an e-mail will constitute such is clearly stated in the body of the email. Recipients are advised to subject this e-mail and attachments to their own virus checking, in keeping with good computing practice. Please note that e-mail received by Dr Pepper Snapple Group may be monitored in accordance with applicable law.

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Feb 24 2009 - 12:25:42 CST

Original text of this message