alter system kill session

Hello

While killing a session, I get a message like

QL > alter system kill session '802,30515' immediate;
alter system kill session '802,30515' immediate
*
ERROR on line 1:
ORA-00031: session marked for kill

I checked after a few hours again, I get the sid and the n serial form v$ session


but the status of the user of the user is as 'dead '.

SQL > select user name, session status $ v where sid = 802;

STATUS OF USER NAME
------------------------------ --------
APPS KILLED


If the session was killed or not?

Thank you
Vijay

887400 wrote:
Its Linux X 86 64-bit

But for some sessions, they will be killed immediately after alter system kill session command.,.

but in this case it is not end immediately?

What could be the cause?

Internal Oracle session remains as long as the remains of operating system processes.

Kill - 9

Since you have already issued ALTER SYSTEM KILL SESSION
You can't get the process ID of the Oracle's OS.

You can associate up to the session Oracle with OS time as evidenced by time of CONNECTION
ps - ef | LOCAL grep

Tags: Database

Similar Questions

  • Can't kill session 11g WINDOWS 2008

    Hoping someone can tell me how to kill a job that won't die :)

    We had network maintenance during the weekend that interrupted the connection between our server and the database. It caused a lot of jobs to get stuck. I could kill all but a job. The last task seems to be busy reading, but the session info does not appear any sql.

    BOTH OF THE COMMANDS RETURN ERROR below: "ora-00030: user session id does not exist ' and info session continues to say"active">
    ALTER SYSTEM KILL SESSION '8,46534' immediate;
    change the session disconnect system '008,46534' post_transaction;



    Any idea what I can do to kill this work? Startup of the database is not a possibilities.

    Thank you!
    Kathie

    you try to kill a job, not a session, right?

    Check this box:
    http://levicorp.com/2009/05/22/how-to-kill-the-running-job/
    http://www.Pythian.com/blog/killing-an-Oracle-job-dead/

  • How to kill session

    Hello

    I used Toad 7.6 earlier. Now, I installed 9.5.0.31 Toad. I am not able to kill the user session by clicking on the session to kill as in my earlier version.
    Please tell me there at - it another way to do this or something?

    Thanks in advance

    Ashish Sharma

    Hello

    This is a useful article to kill oracle sessions: [http://www.oracle-base.com/articles/misc/KillingOracleSessions.php]

    You can use these instructions:

    SQL> ALTER SYSTEM KILL SESSION 'sid,serial#';
    

    11 g:

    SQL> ALTER SYSTEM DISCONNECT SESSION 'sid,serial#' IMMEDIATE;
    

    Kind regards
    Csaba solution

    Published by: Paintek_HU on 2010.07.22. 01:42

  • grant to kill session

    Hi all
    What is the concession that allows me to kill a session?
    Would it ALTER SESSION?
    Or do I grant DBA?

    Thanks in advance

    Sappo

    The command is
    alter system kill session
    If you need
    change the system privileges
    If you don't want this, make sure that you write a procedure in an account that already has the privilege, and grant execute rights to unprivileged users.

    --------
    Sybrand Bakker
    Senior Oracle DBA

  • S/n kill sessions. Why?

    After reading session$ v, I recorded in several sessions and questioned session $ v and find details of all the sessions that I had opened. During my research, I read that the DBA sometimes kill sessions.

    1. why a dba should kill a session database, where the user can disconnect session? What are the different reasons why a dba should kill the database sessions?

    2. what command is used to kill a session of database?

    Thank you
    Gueye

    Hello

    DBA should kill session for several reason.

    (1) even after a user presses Ctrl + C, it is possible that the session is not to disconnects and the application keep getting executed

    (2) user has lost the window where he was the execution of the query (perhaps because of the power outage)

    (3) the ADMINISTRATOR wants to do some maintaiance and he does not know, or it is difficult to find from which the query is executed

    (4) if the session is created by a process of batch processing, this batch is finished but the session does not work.

    2. what command is used to kill a session of database?

    Rep. : alter system kill session ',';

    Concerning
    Anurag Tibrewal

  • Problem with kill session

    Hello

    I want to kill one of my session and I can't :/ I paste this query:
    SELECT sid, serial #, osuser, program, server, machine FROM v$ session;

    Find the sid and serial # my process and carry out this change the command:
    alter system kill session '544 793';

    So, I can see this output:
    change kill system succeeded.

    But once retype selected first, I still have a trial '544 793'?
    Might explain my why?

    Tutu wrote:
    I don't have the privileges to kill the process level OS :/ That from database. But what this process is KILLED? She still exists in the database, is not it.

    Yes, the process is still in the database, using the amount of space between the sessions and processes and other resources of the system as well.
    There may be several reasons for this:
    1 session remains in this status as asociated process is not killed, for example session expected SQLNet client message. Customer at the moment would be an activity that he would receive the error and the session would leave.
    2 PMON can do sometihng with this session. Doing little cleaning, then kill is issued and this session remains for some time.

    In order to get rid of this session - ID opsystem kill command. If do not have rights - you ask someone who has.

  • kill session vs kill session immediate/post_transactional

    A DBA, I sometimes kill sessions in SQL * more by entering the command ' ALTER SYSTEM KILL SESSION ' xxx, xxxx '; The session ends quickly, sometimes it takes sometimes minutes for the killed session to go.

    When to use Enterprise Manager Grid Control to kill a session that I have to choose between a 'kill immediately' or 'transactional Message. When I kill a session by entering a command from SQL * more I do not use one of these options.

    I'm trying to understand the consequences of the use of the two options available via the grid control. Clause of some forum posts suggest you use IMMEDIATELY"as a last resort. According to them, he couldn't prevent a session from filling out a cancellation of the updates because the operating system process stops immediately. Read that a description of the clause POST_TRANSACTION makes me think of issueing what the command against a long query term will allow him continue to run and end the session only after the end of the SQL query. For now I avoid using one of the options of the grid control and stick to my original format in SQL * more.

    Could someone shed some light on the difference between killing a session with or without KILL it IMMEDIATELY or POST_TRANSACTIONAL' options?

    Thank you
    Bill

    Hello

    If I order, "the ALTER SYSTEM KILL SESSION ' xxx, xxxx ';

    allows you to mark a session as null and void, restore the ongoing transactions, releases all session locks and partially recovery of resources from the session. If the session is running an activity that must be completed, as the wait for a response from a remote database or rolling back a transaction, then Oracle Database expects this activity complete, mark the session as being finished and then returns control to you.

    If I order, "ALTER SYSTEM KILL SESSION ' xxx, xxxx" IMMEDIATE. "

    Specify IMMEDIATE to load the Oracle database to ongoing transactions, releases all session locks, recover session state full and immediately returns control to you. You wrote end immediately with no cancellation of updates?. This is not so, it will rollback all not updated.

    If I execute the command ' ALTER SYSTEM KILL SESSION ' xxx, xxxx "POST_TRANSACTION;"

    The POST_TRANSACTION parameter allows operations to be completed before the session is disconnected. If the session has no current transaction, then this clause has the same effect as to KILL SESSION.

    Reference:-[http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_2013.htm#SQLRF00902]

    HTH
    Anand

  • Killing sessions.

    Please

    Why after sending:

    ALTER SYSTEM KILL SESSION '155,54173' IMMEDIATE;
    ALTER SYSTEM KILL SESSION '190,65416' IMMEDIATE;
    ALTER SYSTEM KILL SESSION '215,49199' IMMEDIATE;
    ALTER SYSTEM KILL SESSION '232,38533' IMMEDIATE;

    Sessions do not die immediately?, how can I remove the sessions? I asked the user to close all applications but the sessions always there.

    Thank you
    You can try to killing the operating system process or thread:
    
    1. Killing sessions in WINDOWS 2000/NT
    issue in a DOS command window:
    orakill sid thread
    
    where sid    = the Oracle instance to target
            thread = the thread id of the thread to kill
       The thread id should be retrieved from the spid column of a query such as:
             select spid, osuser, s.program from
            v$process p, v$session s where p.addr=s.paddr
     You can find ORAKILL.exe in $ORACLE_HOME\bin
    
    2. Killing sessions in UNIX:
    
    select vs.sid, vs.username, vs.osuser, vs.process fg_pid, vp.spid bg_pid
    from v$session vs, v$process vp
    where vs.paddr = vp.addr
    
    SID  USERNAME        OSUSER     FG_PID    BG_PID
    ---- --------------- ---------- --------- ---------
    14   QZBHS1          QZBHS1     2924:3744 1948
    29   QZBHS1          QZBHS1     3632:3844 15452
    51   QZBHS1          QZBHS1     4644:3892 5438
    
    Issued in unix (as the oracle unix user, the user thats owns the database) :
    
    kill -9 1948
    kill -9 15452
    kill -9 5438
    
    Hope this can help you.
    

    The link
    [http://www.experts-exchange.com/Database/Oracle/Q_20821840.html]

  • alter system switch logfile crashes

    Hi Experts,

    Please help me determine the above error.

    Recently, I was told to take one of our EBS environment in archivelog mode. While doing this activity, I coped 'ORA-16014.

    The steps that I follow are listed below:

    SQL > alter system set log_archive_dest_1 = ' location = / mnt/DEVarchive/trcdev ' scope = spfile;

    Modified system.

    SQL > alter system set log_archive_format='TRCDEV_%s_%t_%r.arc' scope = spfile;

    Modified system.

    SQL > shutdown immediate;

    The database is closed.

    The database is dismounted.

    ORACLE instance stops.

    SQL > startup mount

    ORACLE instance started.

    Total System Global Area 4275781632 bytes

    Bytes of size 2235208 fixed

    989856952 variable size bytes

    3271557120 of database buffers bytes

    Redo buffers 12132352 bytes

    Mounted database.

    SQL > alter archivelog database;

    Database altered.

    SQL > list of archive logs

    Database log mode Archive Mode

    Active AutoArchive

    Archives/mnt/DEVarchive/trcdev of destination

    More old sequence of journal online 9

    Log sequence archive 11

    Current log sequence 11

    SQL > alter database open;

    Database altered.

    SQL > alter system switch logfile;

    Modified system.

    SQL > /.

    Modified system.

    SQL > /.

    Now, the session hangs then I checked my alert log file and found the details below

    ARCH: Stopped archiving, error occurred. Will continue to retry

    TRCDEV ORACLE instance - error check-in

    ORA-16014: connect 2 sequence # 11 not archived, not available destinations

    ORA-00312: wire 2 1 online journal: ' / mnt/DEVdata/trcdev/redo02a.log'

    ORA-00312: wire 2 1 online journal: ' / mnt/DEVdata/trcdev/redo02b.log'

    After reading the newspaper to alert carefully, it is clear that it is not able to archive the logs and archiving is hung.

    The reason could be my destination Archive got filled, but in my case, my destination archive has a free space of about 24 G.


    Please tell me how to troubleshoot further, a quick response will be highly appreciated.


    -Thank you

    @John

    I checked log_archive_dest_2 and it is set to null. And I think it would be better if I leave it in its default state.

    @Mustafa

    Db_recovery_file_dest is also set to null.

    Further, I disabled the archivelog mode and erase all the settings that I did for archiving logs (parameter as log_archive_dest_1 log_archive_format).

    I have another session close immediately and started the database in editing mode. After that, I activated all the setting again and activated the archivelog mode for my database.

    SQL > alter database open;

    Did bounce my DB once again, and then manually change logfiles 2 - 3 times and BOOM everything seems to work fine now. No more no hung sessions and archives are generated too.

    A big thanks to everyone in this thread.

  • When ALTER SYSTEM ARCHIVE LOG happens implicitly...

    Hello

    When you scan the v$ archived_log SIDE primary SCHOOL, I saw below output

    NAME OF CREATOR REGISTR SEQUENCE # FAL
    -------------------------- ------- ------------ ----------------- ---
    /U05/prod/archivelogs/ARC_816992406_1_22885.dbf ARCH ARCH 22885 No.
    /U05/prod/archivelogs/ARC_816992406_1_22886.dbf FGRD FGRD 22886 No.


    Then I went to the alert log file and search for the sequence #, I found that

    When the newspaper switch happens through * ALTER SYSTEM ARCHIVE LOG *, then this sequence archive log CREATOR and REGISTRAR will be FGRD.
    What command of newspaper happens automatically (90% complete log file), then this sequence archive log CREATOR and REGISTRAR will be ARCH.


    If * ALTER SYSTEM ARCHIVE LOG * happens synchronously means control will not return to the process unless and until the underlying log file has been
    archived completely, so the CREATOR and the REGISTRAR is FGRD.

    My question is, under what circumstances * ALTER SYSTEM ARCHIVE LOG * happen implicitly.


    Thank you

    Hello

    user9085814 wrote:
    Thanks for the reply...

    I agree with you.

    The environment that I take abt is DATAGUARD Enviornment.

    I have not published ALTER SYSTEM ARCHIVE LOG CURRENT of any session (foreground process) of the primary DB.
    But I can still see ALTER SYSTEM ARCHIVE LOG in the log to alter.

    When you call the command ALTER SYSTEM ARCHIVE LOG CURRENT , then oracle write in the journal of the alerts as:

    On primary

    
     Wed May 15 09:16:56 2013
     Archived Log entry 789 added for thread 1 sequence 396 ID 0xf23a6e3f dest 1:
     *ALTER SYSTEM ARCHIVE LOG*
     Thread 1 cannot allocate new log, sequence 398
    

    >

    So my question on what scenario ALTER SYSTEM ARCHIVE LOG will be captured in the log of alerts.
    because it's a mistake to run foreground process ALTER SYSTEM ARCHIVE LOG .

    Have you had a logs archived backup RMAN script which is called ALTER SYSTEM ARCHIVE LOG CURRENT

     RMAN> run
               {
                  sql 'ALTER SYSTEM ARCHIVE LOG CURRENT';
                  backup  archivelog all delete all input;
               }
    

    If you try the command ALTER SYSTEM ARCHIVE LOG CURRENT on stanby, you get error ORA-01109: database is not open. This means database is not open READ/WRITE mode.
    Then we can use ALTER SYSTEM ARCHIVE LOG CURRENT on the standby database.

    Thanks for the interesting thread
    Mr. Mahir Quluzade
    http://www.Mahir-quluzade.com

  • Method to identify the user isuing ALTER SYSTEM

    Hi all
    We have a database of test in which APPS (a power user) access is given to all developers. We had kept TIMED_STATISTIC to false in this case, so that the load is reduced to the minimum. From these last days, we change this value at the level of the system, and we are unable to identify the person.

    Is there a way I can write a database trigger to capture this specific ALTER SYSTEM event? Any help in this regard is highly appreciated.

    Kind regards
    Lucette

    Lucette wrote:
    Hi Keita,
    My mistake, I do not pay attention on behalf of the author. Forgive me for my doubts; they may be stupid - I'm not a DBA, but I'm a preparer SQL.

    If I use audit_sys_operations - he will capture all ALTER SYSTEM orders by any user. Then narrow it down us to the test user by issuing ALTER AUDIT test SYSTEM. Please correct me if I'm wrong.

    In my PB, there are at least 300 developers work at the moment - is possible to limit this information to a specific event to ALTER SYSTEM? In addition, we are in a WINDOWs environment. If cron does not work. It would be much better if I could device a method to write the details of the session incriminated at a table.

    Do you think below would work?

    create or replace TRIGGER UNI. USYSTEM_B_ALTER_SYS_AUDIT_TRIG
    FRONT
    CREATE OR CHANGE OR DROP OR TRUNCATE
    ON THE SYSTEM. SCHEMA
    declare
    ......

    Kind regards
    Lucette

    Published by: lollipop on October 12, 2009 12:18

    You don't need to set the parameter audit_sys_operations . What you need is that one specific user to AUDIT

  • Alter system switch logfile

    Hi all

    9i

    RHEL5

    We make the standby database as our report server. It comes to unload part of the Production workload to improve performance.

    To get the latest data, or before you run reports on the standby server, I'll first > alter system switch logfile;

    So that the backup database will be updated the last transactions to date.

    How often should I run the command? Is this enough to run it only once? or I'll run it n times according to the number of newspapers of recovery?

    Thank you very much.

    JC

    In 9i to run queries on the standby database, you must open the database in read-only mode standby. In this case there is therefore no question of switching logfile or so. Before opening the database in standby mode ReadOnly, you make sure that all the archiving of primary logs are applied to the standby database in managed recovery mode. Once this Eve is open for requests.

    I suggest you read below. It erases the concepts and is specific for 9i

    Log apply Services

    concerning

    Pravin

  • Edit-Kill sessions on SEEP

    Hi all

    Do you know if it is possible to put an end to certain processes or sessions on the PCB?, like the old days on essbase (rigth clik-> edit-> kill sessions)

    Concerning

    Coronel Robert

    Reading the following support doc - ' planning and budgeting Cloud Service (SEEP): how to kill the calculation process? (Doc ID 1934661.1) »

    It is similar to on site

    See you soon

    John

  • Query on ALTER SYSTEM SET


    Hello

    I was under the impression that

    "PFILE has limitation to change settings for initialization of dynamically. If any initialization parameter must be changed, we can edit the pfile parameter changes take effect with the next restart of the system

    To work around this limitation, Oracle has created the concept of the SPFILE initialization parameter can be changed dynamically using ALTER SYSTEM SET statement. »

    But, today, I started my test using PFILE database and run the following command to change the setting of the memory_target from 300 to 290 M.

    ALTER SYSTEM SET memory_target = 290 M;

    And to my surprise, this statement executed correctly without errors and memory_target parameter has been set to the new value (of course, in memory).

    Isn't it change the init dynamically using PFILE itself?

    Please clarify my doubt and correct my understanding.

    Kind regards

    Bharath

    bharathDBA wrote:

    Hello

    I was under the impression that

    "PFILE has limitation to change settings for initialization of dynamically. If any initialization parameter must be changed, we can edit the pfile parameter changes take effect with the next restart of the system

    To work around this limitation, Oracle has created the concept of the SPFILE initialization parameter can be changed dynamically using ALTER SYSTEM SET statement. »

    But, today, I started my test using PFILE database and run the following command to change the setting of the memory_target from 300 to 290 M.

    ALTER SYSTEM SET memory_target = 290 M;

    And to my surprise, this statement executed correctly without errors and memory_target parameter has been set to the new value (of course, in memory).

    Isn't it change the init dynamically using PFILE itself?

    Please clarify my doubt and correct my understanding.

    Kind regards

    Bharath

    You have a bad mixing on the genesis of the SPFILE. Yes, it is a binary file and all this but remember, isn't the SPFILE which makes a dynamic parameter or a PFILE that makes static, but it is the nature of the setting itself which allows to happen. Yes, the difference in the PFILE and SPFILE parameter would be obvious when you change a dynamic parameter, and would give a rebound to the db. Since the PFILE file has not been updated (it's a text file must be updated manually), with the next restart, the setting would take the same value as it has in the PFILE file. But with the SPFILE, depending on what you have set in SCOPE, the parameter should behave accordingly.

    HTH

    Aman...

  • Do we need apostrophes when you set values with ALTER SYSTEM?

    DB version: 11.2, 10.2
    Version: AIX

    What logs the values of character with ALTER SYSTEM, do I have to enclose the value within single quotes.


    Both the below worked. So I'm a bit confused.
    SQL> ALTER system set audit_trail=NONE scope=spfile;
    
    System altered.
    
    -- Tested with single quotes on another DB
    SQL> ALTER system set audit_trail='NONE' scope=spfile;
    
    System altered.

    What logs the values of character with ALTER SYSTEM, do I have to enclose the value within single quotes.

    When you pass several parameters, you can use single quotes, in other cases sound option.

    If you have multiple databases on hold, you must configure by separating with single quotes.
    For example,.
    (1) fal_client = "STBY1", "STBY2", "STBY3" and so on.
    (2) log_archive_dest_2 = "service = stby lgwr async... '

    If you see under SPFILE settings, here, some are mentioned with single quotes & SEC_CASE_SESITIVE_LOGIN is not in quotes. But the value is always the same.

    From SPFILE;

    *.remote_login_passwordfile='EXCLUSIVE'
    *.sec_case_sensitive_logon=FALSE                                       "used NO QUOTES"
    *.sga_max_size=16106127360
    *.star_transformation_enabled='TRUE'                                        "QUOTES"
    
    SQL> show parameter remote_login
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    remote_login_passwordfile            string      EXCLUSIVE
    SQL> show parameter sec_case
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    sec_case_sensitive_logon             boolean     FALSE                                     "used NO QUOTES"
    SQL> show parameter sga_max_
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    sga_max_size                         big integer 15G
    SQL> show parameter star_tran
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    star_transformation_enabled          string      TRUE                                         "QUOTES"
    SQL>
    

Maybe you are looking for