Knowledge Base

You are trying to kill a background session in Oracle

ORA-00029: session is not a user session

You are trying to kill a session with the alter system command and you did specify a correct sid and serial number.
The session however is not a user session, but probably will be a background session:

SQL> alter system kill session '1, 1';
alter system kill session '1, 1'
*
ERROR at line 1:
ORA-00029: session is not a user session

When you check the TYPE column in v$session, you will see that the given sid, serial# is a BACKGROUND type:

SQL> select sid, serial#, process,  type from v$session;

       SID    SERIAL# PROCESS                  TYPE
---------- ---------- ------------------------ ----------
         1          1 1308                     BACKGROUND
         2          1 4660                     BACKGROUND
         3          1 5344                     BACKGROUND
         4          1 2976                     BACKGROUND
         5          1 5724                     BACKGROUND
         6          1 3568                     BACKGROUND
         7          1 4532                     BACKGROUND
         8          1 4992                     BACKGROUND
        10          1 3480                     BACKGROUND
        13          2 2432                     BACKGROUND
        15          2 4604                     BACKGROUND
       126          1 656                      BACKGROUND
       127          1 5444                     BACKGROUND
       128          1 4292                     BACKGROUND
       129          1 1436                     BACKGROUND
       130          1 4248                     BACKGROUND
       131          1 3056                     BACKGROUND
       132          1 5372                     BACKGROUND
       135         18 3584                     BACKGROUND
       136         73 3920                     BACKGROUND
       137        220 6124:3196                USER
       138          1 5756                     BACKGROUND

If you really have a need to kill a background session – which is strongly discouraged – you need to kill the process on operating system level.

Oracle Gold Partner DbMotive is an Oracle Gold Partner