Wednesday, July 11, 2012

# brconnect # brconnect crontab

brconnect with cronjob

Getting brconnect to work for oraSID was proving to be a problem on SLES 11 VM Enterprise SP2 so after much cracking and with help from SAP team they managed to get the brconnect work with crontab!

And here's how you do it, you have to add the environment path because the user itself has its account setup by default as /bin/csh and you know crontab calls /bin/sh which also links to /bin/bash so whatever attempts I did by adding /bin/csh to /etc/crontab didn't work

~ # crontab -u orajpd -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.XXXX9uwKMZ installed on Tue Jul 10 17:35:48 2012)
# (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $)
SHELL=/bin/csh
PATH=/usr/bin:/usr/sbin

00 05 * * * /oracle/JPD/script

Nicely bundled in the script is the brconnect command:

export ORACLE_SID=JPD
export ORACLE_BASE=/oracle
export ORACLE_HOME=/oracle/JPD/112_64

/sapmnt/JPD/exe/brconnect -u / -c -f stats -t all -f collect -p 1

No comments:

Post a Comment