Running SQLPLUS - A simple example...
dmann — Sat, 10/11/2008 - 20:40
The following script runs a simple query and appends the result to a file.
Query.sql:
SET FEEDBACK OFF SET HEADING OFF SET PAGESIZE 0 SET SERVEROUTPUT ON SELECT COUNT(*) FROM v$SESSION; EXITrunQuery.sh:
#!/bin/sh if [ -f ~/.bashrc ]; then . ~/.bashrc fi sqlplus -S perfstat/perfstat @query.sql > output.txt
