My question was unfortunately not about cron and all unix
stuff but
about the behavior of svrmgrl when using it batch. Indeed
when you run
i.e. a normal "select username,program from v$session;"
it runs right
online but sends messages in batch mode that it is not
ok.
Have you any clue how it should be done?
The last site I worked at had full Oracle7 v7.3.4 on Digital
UNIX v4.0d to
DLT tape drives automated, including the shutdown of
the Oracle database
and other applications.
We used CRON to initiate the exercise at 01:00 calling
a number of SHELL
and Oracle scripts.
Rgds
Andrew
We spooled all required output to a working file (.WK1)
and then we had to
use a big egrep to remove the rubbish that SVRMGR generated,
and
redirected this to another file (.LOG). However, you
must run this
multiple times to ensure that you get rid of only the
wrong information.
Rgds
Andrew
Look at "dbshut" and "dbstart"
Oracle supplied scripts. They show good
examples on how to use svrmgrl in batch mode.
Regards,
Marc Mazerolle
Try ...
SELECT username, osuser, program
FROM v$session
WHERE username IS NOT NULL;