ORA-00942: table or view does not exist for v$session.

From: trub3101 <trub3101_at_sky.com>
Date: Thu, 8 Jul 2010 06:12:11 -0700 (PDT)
Message-ID: <8a604fd7-8ed9-4f93-b242-a5fda52caa98_at_e5g2000yqn.googlegroups.com>



Hi all,

Not as dramatic as the subject heading suggests fortunately!

I have a function within a shell script 'kill_session' (below) which queries the v$session table. However, when I run the script I get this error message:

Connected.
select 'ALTER SYSTEM KILL SESSION '''||sid||','||serial#||''';' from v where schemaname = upper('film')  

*
ERROR at line 1:
ORA-00942: table or view does not exist

function kill_session
{
/opt/ora/oracle/product/9.2.0/db_1/bin/sqlplus -s /nolog<<EOF _at_/home/oracle/system_conn.sql
set head off
set feed off
set verify off
set define off
set scan off
set serveroutput on
spool ${WK_DIR}kill_${schema}_sessions.sql select 'ALTER SYSTEM KILL SESSION '''||sid||','||serial#||''';' from v $session where schemaname = upper('${schema}'); spool off
exit
EOF
}

I would be ever so grateful if someone could help me out with this one please.

Many thanks
tb3101 Received on Thu Jul 08 2010 - 08:12:11 CDT

Original text of this message