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

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Thu, 8 Jul 2010 15:40:46 +0200
Message-ID: <4c35d55f$0$4665$426a34cc_at_news.free.fr>


"trub3101" <trub3101_at_sky.com> a écrit dans le message de news: 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
|

v\$session

Regards
Michel Received on Thu Jul 08 2010 - 08:40:46 CDT

Original text of this message