Home » SQL & PL/SQL » SQL & PL/SQL » Substitution Variables (AIX)
Substitution Variables [message #424116] Wed, 30 September 2009 04:59 Go to next message
Messages: 9
Registered: September 2009
Location: Bangalore
Junior Member
Hi All,

Simple script to kill session by passing sid , Automated blank spaces was taken while passing the values to kill session. Can some one help me to trim this . What should be the setting.

SQL> get kill_session.sql
  1  col sid new_value sd
  2  col serial# new_value srno
  3  select sid ,serial#  from v$session where sid=&sid;
  4* alter system kill session '&SD,&SRNO';
SQL> @kill_session.sql
Enter value for sid: 150

       SID    SERIAL#
---------- ----------
       150          3

alter system kill session '       150,         3'
ERROR at line 1:
ORA-00026: missing or invalid session ID



[Updated on: Wed, 30 September 2009 05:08]

Report message to a moderator

Re: Substitution Variables [message #424126 is a reply to message #424116] Wed, 30 September 2009 05:21 Go to previous message
Messages: 402
Registered: July 2005
Senior Member
select to_char(sid) sid ,to_char(serial#) serial#  from v$session where sid=&sid;

[Updated on: Wed, 30 September 2009 05:26]

Report message to a moderator

Previous Topic: drill down web report in oracle 9i using hyperlink
Next Topic: stored procedure required
Goto Forum:

Current Time: Sat Jul 22 06:06:11 CDT 2017

Total time taken to generate the page: 0.16231 seconds