I need to constantly nag a different team to rerun a failure job.
So I am thinking creating a shell script that can run by us and do the job.
Can I do this in a Unix script? Which Utility should I use? When I call the command, are there special environmental variable that I have to set first?
Appreciated for any help.
Rerun a job from Unix script
Thanks for the reply.
I did have a read and paste here the variables that are required for easy reference:
CONTROLM_SERVER
CONTROLM_USER
CONTROLM_DATABASE
CONTROLM_MIRROR_USER
CONTROLM_MIRROR_DATABASE
CTM_DATABASE_TYPE
MIRROR_DB_SERVER
machine=Solaris
LIBPATH, or LD_LIBRARY_PATH, or SHLIB_PATH
Sybase: LD_LIBRARY_PATH ~<controlm_owner>/ctm_server/exe_Solaris:~<controlm_owner>/sybase/OCS-12_5/lib
Oracle: LD_LIBRARY_PATH ~<controlm_owner>/oracle/product/<DB_ver>/lib:~<controlm_owner>/ctm_server/exe_Solaris
set path=($path ${ORACLE_HOME}/bin ~<controlm_owner>/ctm_server/exe_<OS_ID>)
~<controlm_owner> : The default full path name of the UNIX user account home directory under which CONTROL-M/Server is installed.
<DB_ver> : Version of the Oracle database. Valid value: Oracle 10.1.0.2
The executable directory of CONTROL-M/Server must be added to the path of the
user. This path must include: ~<controlm_owner>/ctm_server/scripts
-- For Oracle
ORACLE_BASE
ORACLE_HOME
ORACLE_SID
NLS_LANG
-- For Sybase
SYBASE
DSLISTEN
DSQUERY
DSCONSOLE
MIRROR_DSLISTEN
MIRROR_DSQUERY
SYBASE_OCS, with the value OCS-12_5
The user must have the following read/write permissions:
Read permission for file : <controlm>/.controlm
Read and Write permission for all files in directory : <controlm_owner>/ctm_server/prflag
If mirroring is enabled, Read permission for file : <controlm>/.controlm_mirror
You must provide security access to these files as follows:
- Give group controlm read permission for the files.
- All users who require access to CONTROL-M utilities should belong to group controlm.
csh/tcsh example:
setenv CONTROLM_SERVER /home/ora_ctm/ctm_server
setenv ORACLE_HOME /home/ora_ctm/oracle/product/10.1.0.2
setenv ORACLE_SID ctrlm
setenv ORACLE_BASE /home/ora_ctm/oracle
setenv NLS_LANG AMERICAN_AMERICA.WE8ISO8859P1
setenv CONTROLM_USER ctrlm
setenv CONTROLM_DATABASE ctrlm
setenv MIRROR_DB_SERVER ctrlm_mirror
setenv CTM_DATABASE_TYPE ORACLE
setenv LD_LIBRARY_PATH /home/ora_ctm/ctm_server/exe_SuSE:
/home/ora_ctm/oracle/product/10.1.0.2/lib
I did have a read and paste here the variables that are required for easy reference:
CONTROLM_SERVER
CONTROLM_USER
CONTROLM_DATABASE
CONTROLM_MIRROR_USER
CONTROLM_MIRROR_DATABASE
CTM_DATABASE_TYPE
MIRROR_DB_SERVER
machine=Solaris
LIBPATH, or LD_LIBRARY_PATH, or SHLIB_PATH
Sybase: LD_LIBRARY_PATH ~<controlm_owner>/ctm_server/exe_Solaris:~<controlm_owner>/sybase/OCS-12_5/lib
Oracle: LD_LIBRARY_PATH ~<controlm_owner>/oracle/product/<DB_ver>/lib:~<controlm_owner>/ctm_server/exe_Solaris
set path=($path ${ORACLE_HOME}/bin ~<controlm_owner>/ctm_server/exe_<OS_ID>)
~<controlm_owner> : The default full path name of the UNIX user account home directory under which CONTROL-M/Server is installed.
<DB_ver> : Version of the Oracle database. Valid value: Oracle 10.1.0.2
The executable directory of CONTROL-M/Server must be added to the path of the
user. This path must include: ~<controlm_owner>/ctm_server/scripts
-- For Oracle
ORACLE_BASE
ORACLE_HOME
ORACLE_SID
NLS_LANG
-- For Sybase
SYBASE
DSLISTEN
DSQUERY
DSCONSOLE
MIRROR_DSLISTEN
MIRROR_DSQUERY
SYBASE_OCS, with the value OCS-12_5
The user must have the following read/write permissions:
Read permission for file : <controlm>/.controlm
Read and Write permission for all files in directory : <controlm_owner>/ctm_server/prflag
If mirroring is enabled, Read permission for file : <controlm>/.controlm_mirror
You must provide security access to these files as follows:
- Give group controlm read permission for the files.
- All users who require access to CONTROL-M utilities should belong to group controlm.
csh/tcsh example:
setenv CONTROLM_SERVER /home/ora_ctm/ctm_server
setenv ORACLE_HOME /home/ora_ctm/oracle/product/10.1.0.2
setenv ORACLE_SID ctrlm
setenv ORACLE_BASE /home/ora_ctm/oracle
setenv NLS_LANG AMERICAN_AMERICA.WE8ISO8859P1
setenv CONTROLM_USER ctrlm
setenv CONTROLM_DATABASE ctrlm
setenv MIRROR_DB_SERVER ctrlm_mirror
setenv CTM_DATABASE_TYPE ORACLE
setenv LD_LIBRARY_PATH /home/ora_ctm/ctm_server/exe_SuSE:
/home/ora_ctm/oracle/product/10.1.0.2/lib