Getting error while getting status of active and inactive sessions from ORACLE DB
Hi All,
I have a written a test script which retrieves the status of active and inactive sessions from oracle DB, but i am receiving error while executing. My script is Code:
filepath="/home/ocsg/scripts/db_session_report/current_session_report.txt" Code:
db_session_alert ERROR at line 1: ORA-04044: procedure, function, package, or type is not allowed here |
Quote:
|
That test script looks like it should be typed into a console (especially the EOFSQL stuff). Put the bold part below on one line in your script and see if it works
filepath="/home/ocsg/scripts/db_session_report/current_session_report.txt" /home/ocsg/client10g/bin/sqlplus -s abc/abc@'(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP(HOST=10.0.0.1)(PORT=1521)))(CONNECT_DATA=(SID =test)))' set head off select count(*) from V$SESSION; exit; > $filepath echo DB SESSION REPORT : $INACTIVE_SESSIONS |
All times are GMT -5. The time now is 12:25 PM. |