Operating System - HP-UX
1834915 Members
2427 Online
110071 Solutions
New Discussion

Database SPI question (couldn't open /dev/tty)

 
Kenny Lee_8
Frequent Advisor

Database SPI question (couldn't open /dev/tty)

I am trying to test the Oracle agent at the tools on the OVOW oracle DB monitoring.


Command: dbspi_mw_int -osm

Tool Output:
ttytype: couldn't open /dev/tty for reading
stty: : not a typewriter

Thanks and Regards,

Kenny.
1 REPLY 1
RAC_1
Honored Contributor

Re: Database SPI question (couldn't open /dev/tty)

Are you doing this through cron or something??
Such errors arise because commands expects that it is being executed from a terminal, but it might not be.

At the start of the scipt, do as follows.

if tty -s
then
INTERACTIVE=/sbin/true
else
INTERACTIVE=/sbin/false
fi
There is no substitute to HARDWORK