0

I have an Oracle Database on a remote server. I need to check the status of the database (i.e. select status from v$instance). I login using the ssh utility..ssh username@server << EOF, now I need to run the above sql query and grep the output. Need help on it, thanks in advance..!!

1 Answers1

1

you need an Oracle database client for command line. For example, the client for MySQL is /usr/bin/mysql and you can run queries on command line as

/usr/bin/mysql yourdb -e "SELECT ...."
LMC
  • 10,453
  • 2
  • 27
  • 52
  • here's something to start with http://stackoverflow.com/questions/1639704/sqlplus-statement-from-command-line – LMC Nov 07 '13 at 15:57