| | | | | disconnect session" command. This command kills and |
| | | | | terminate existing session immediately and roll back if |
| In various critical situations Oracle DBA has to decide | | | | any active transaction. This syntax is same as |
| to kill existing session or kill the background process of | | | | previous command "alter system kill session" with |
| Oracle 11g database. At this moment remote Oracle | | | | immediate syntax as given following example. |
| DBA should need to terminate session/process called | | | | |
| as murder of session of any instance. From Oracle | | | | SQL> alter system disconnect session '9,171' |
| 11g database there is new feature introduced to kill | | | | immediate; |
| session from sqlplus. Alter system disconnect session | | | | System altered. |
| command is introduced in Oracle 11g database with | | | | But when we are executing command "alter |
| some extra new scope. | | | | system disconnect session" without above both |
| New feature in Oracle 11g database to kill session: | | | | clauses (means POST_TRANSACTION & |
| Using SQL*Plus (alter system with disconnect session | | | | IMMEDIATE), error is being generated called ORA- |
| command): Now we can kill session after finishing | | | | 02000: missing POST_TRANSACTION or |
| existing transaction to be finished. Means in previous | | | | IMMEDIATE keyword. |
| release there was no scope to finish on going | | | | |
| transaction. Instead of "alter system kill session" here | | | | SQL>alter system disconnect session '9,171'; |
| we can use "alter system disconnect session". Using | | | | ORA- 02000: missing POST_TRANSACTION or |
| syntax "POST_TRANSACTION" we can kill session | | | | IMMEDIATE |
| for active transaction has to be completed first and | | | | Means we can't execute "alter system disconnect |
| after that it will be automatically killed. Example of | | | | session" without specific keywords like |
| same syntax is given below. | | | | post_transaction or immediate. In contrast we can |
| | | | | execute "alter system kill session" syntax without any |
| SQL> alter system disconnect session '9,171' | | | | specific more syntax like immediate in prior release of |
| post_transaction; | | | | Oracle 11g database. Actually this feature "alter |
| System altered. | | | | system disconnect session" was introduced in Oracle |
| Session can be kill without finishing active transaction | | | | 10g. In Oracle 10g database this feature and syntax |
| using "IMMEDIATE" syntax with "alter system | | | | was as new feature of Oracle 10g database. |