on 12-13-2006 7:24 AM
Hi all,
I have a strange problem.
When executing script as root from crontab , brconnect end in error:
The script starts from crontab but it gives a strange error
If I execute it manually as ora-user, it works fine!
This is the result of a test (as root, in background)
at now
/home/ibmtools/scripts/Oracle/SapDbUtil.sh -t check -d et0 > /var/tmp/SapDbUtilChk.et0.log
warning: commands will be executed using /usr/bin/sh
job 1165993255.a at Wed Dec 13 08:00:55 2006
Starting /home/ibmtools/scripts/Oracle/SapDbUtil.sh -t check -a all at Wed Dec 13 08:01:07 MET 2006 ...
Environment
mailbox:
Parameters
max next size: 640m
Restart : N
no exlusions
Command executing: su - oraet0 -c brconnect -u / -c -f check
BR0801I BRCONNECT 6.40 (35)
BR0155E No value found for option '-f'
BR0280I BRCONNECT time stamp: 2006-12-13 08.01.07
BR0804I BRCONNECT terminated with errors
As ora-user:
s0005440:oraet0[/oracle/ET0]> brconnect -u / -c -f check
BR0801I BRCONNECT 6.40 (35)
BR0805I Start of BRCONNECT processing: cdudocof.chk 2006-12-13 08.06.01
BR0806I End of BRCONNECT processing: cdudocof.chk 2006-12-13 08.13.15
BR0280I BRCONNECT time stamp: 2006-12-13 08.13.15
BR0803I BRCONNECT completed successfully with warnings
Anyone an idea??
Thx,
Bert
Hello Hermans,
Can you please let me know how u fixed this by setting env .?
I too have the same requirement. when i schedule the same in crontab of orasid., it can't find the environment.
and what is notation used for the entries in the crontab as following after the 5 digits.
eg.
a b c d e . .profile ............
Thanks for the help.
Rgds
venkat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
take into account that when you login as ora<sid> normally you are using csh, but whe you use crontab only bash environment is loaded.
So please check your .sh environment profile of ora<sid>.
Regards
Ermanno
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
you need a change in the script,
one way to do this would be,
su - oraet0 <<**
brconnect -u / -c -f check
**
exit
Hope this should work for you.
Regards,
Afroz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vinod,
I checked PATH in env (as ora-user);To me it seems OK:
PATH=/oracle/ET0/920_64/bin:.:/oracle/ET0:/usr/sap/ET0/SYS/exe/run:/usr/bin:/usr/ccs/bin:/usr/contrib/bin:/opt/hparray/bin:/opt/nettladm/bin:/opt/upgrade/bin:/opt/fcms/bin:/opt/pd/bin:/opt/resmon/bin:/opt/gnome/bin:/opt/perf/bin:/usr/bin/X11:/usr/contrib/bin/X11:/opt/prm/bin:/opt/wbem/bin:/opt/wbem/sbin:/opt/graphics/common/bin:/usr/sbin/diag/contrib:/opt/ignite/bin
If I start brconnect as ora-user from prompt, no problem:
s0005440:oraet0[/var/adm]> brconnect -u / -c -f check
BR0801I BRCONNECT 6.40 (35)
BR0805I Start of BRCONNECT processing: cdudugib.chk 2006-12-14 14.06.01
It's only from the cron as root
the script use a command string without the correct quotes
wrong --> su - oraet0 -c brconnect -u / -c -f check
correct --> su - oraet0 -c "brconnect -u / -c -f check"
so, retry using the following command string
su - oraet0 -c "brconnect -u / -c -f check"
Regards
Ermanno
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Bert,
Can u confm me what are the permissions and any thing listed in cron.allow and cron.deny.
Regards
Vinod
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vinod,
FYI:
s0005440:oraet0[/oracle/ET0]> cd /var/adm/cron
s0005440:oraet0[/var/adm/cron]> ll
total 64
prw------- 1 root root 0 Dec 13 08:30 FIFO
-rw-rr 1 root sys 2435 Dec 13 08:00 OLDlog
-rrr-- 1 bin bin 60 Jul 18 14:56 at.allow
-rw-rr 1 root sys 0 Jul 18 14:57 cron.deny
-rw-rr 1 root sys 7245 Dec 13 10:15 log
-rrr-- 1 bin bin 17 Nov 14 2000 queuedefs
User is included in at.allow
s0005440:oraet0[/var/adm/cron]> more at.allow
root
sys
adm
uucp
rt0adm
orart0
et0adm
oraet0
bt0adm
orabt0
crontab -l oraet0
File is managed by the Configuration Framework
Manual modifications will be overwritten.
<b># Crontab entries for oraet0 from PAC or Application Registration
<b>30 06,11,17 * * * . .profile;/home/ibmtools/scripts/Oracle/SapDbUtil.sh -t</b> check -d et0 > /var/tmp/SapDbUtilChk.et0.log 2>&1</b>20 05,10,16 * * * . .profile;/home/ibmtools/scripts/Oracle/SapDbUtil.sh -t statsmissing -d et0 > /var/tmp/SapDbUtilStatsMissing.et0.log 2>&1
30 05 * * 5 . .profile;/home/ibmtools/scripts/Oracle/SapDbUtil.sh -t next -d et0 > /var/tmp/SapDbUtilNxt.et0.log 2>&1
30 19 * * 6 . .profile;/home/ibmtools/scripts/Oracle/SapDbUtil.sh -t analyze -d et0 > /var/tmp/SapDbUtilAnalyze.et0.log 2>&1
30 06 * * 0 . .profile;/home/ibmtools/scripts/Oracle/SapDbUtil.sh -t export -d et0 > /var/tmp/SapDbUtilExport.et0.log 2>&1
30 01 * * 0 . .profile;/home/ibmtools/scripts/Oracle/SapDbUtil.sh -t dbverify -d et0 > /var/tmp/SapDbUtilDbverify.et0.log 2>&1
30 00 * * 0 . .profile;/home/ibmtools/scripts/Oracle/SapDbUtil.sh -t cleanup -d et0 > /var/tmp/SapDbUtilCleanup.et0.log 2>&1
ll /home/ibmtools/scripts/Oracle/SapDbUtil.sh
-rwxrwxr-x 1 oraet0 users 9065 Jun 21 16:40 /home/ibmtools/scripts/Oracle/SapDbUtil.sh
-->start script as root in background (with at now)
at now
/home/ibmtools/scripts/Oracle/SapDbUtil.sh -t check -d et0 > /var/tmp/SapDbUtilChk.et0.log
warning: commands will be executed using /usr/bin/sh
job 1166008224.a at Wed Dec 13 12:10:24 2006
Log of script:
Starting /home/ibmtools/scripts/Oracle/SapDbUtil.sh -t check -a all at Wed Dec 13 12:10:33 MET 2006 ...
Environment
mailbox:
Parameters
max next size: 640m
Restart : N
no exlusions
Command executing: su - oraet0 -c brconnect -u / -c -f check
(c)Copyright 1983-2000 Hewlett-Packard Co., All Rights Reserved.
(c)Copyright 1979, 1980, 1983, 1985-1993 The Regents of the Univ. of California
(c)Copyright 1980, 1984, 1986 Novell, Inc.
(c)Copyright 1986-1992 Sun Microsystems, Inc.
(c)Copyright 1985, 1986, 1988 Massachusetts Institute of Technology
(c)Copyright 1989-1993 The Open Software Foundation, Inc.
(c)Copyright 1986 Digital Equipment Corp.
(c)Copyright 1990 Motorola, Inc.
(c)Copyright 1990, 1991, 1992 Cornell University
(c)Copyright 1989-1991 The University of Maryland
(c)Copyright 1988 Carnegie Mellon University
(c)Copyright 1991-2000 Mentat Inc.
(c)Copyright 1996 Morning Star Technologies, Inc.
(c)Copyright 1996 Progressive Systems, Inc.
(c)Copyright 1991-2000 Isogon Corporation, All Rights Reserved.
RESTRICTED RIGHTS LEGEND
Use, duplication, or disclosure by the U.S. Government is subject to
restrictions as set forth in sub-paragraph (c)(1)(ii) of the Rights in
Technical Data and Computer Software clause in DFARS 252.227-7013.
Hewlett-Packard Company
3000 Hanover Street
Palo Alto, CA 94304 U.S.A.
Rights for non-DOD U.S. Government Departments and Agencies are as set
forth in FAR 52.227-19(c)(1,2).
WARNING :
You must have prior authorization to access this system.
All connections are logged and monitored. By connecting to
this system you fully consent to all monitoring.
Unauthorized access or use will be prosecuted to the full
extent of the law. You have been warned.
#
You have mail.
START
END
BR0801I BRCONNECT 6.40 (35)
BR0155E No value found for option '-f'
BR0280I BRCONNECT time stamp: 2006-12-13 12.10.33
BR0804I BRCONNECT terminated with errors
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.