Skip to content

Ozar.net Developer Blog

Programming in PHP, C, C#, ASP.NET, Java, Objective-C, SQL also for MS SQL Server, Oracle & MySQL Development

Menu
  • Home
  • About
  • Tutorials
  • Contact
  • Privacy
Menu

How To Kill Session In Oracle 11g Database With New Feature?

Posted on April 10, 2010April 21, 2010 by OD

In various critical situations Oracle DBA has to decide to kill existing session or kill the background process of Oracle 11g database. At this moment remote Oracle DBA should need to terminate session/process called as murder of session of any instance.   From Oracle 11g database there is new feature introduced to kill session from sqlplus. Alter system disconnect session command is introduced in Oracle 11g database with some extra new scope.

New feature in Oracle 11g database to kill session:

Using SQL*Plus (alter system with disconnect session command): Now we can kill session after finishing existing transaction to be finished. Means in previous release there was no scope to finish on going transaction. Instead of “alter system kill session” here we can use “alter system disconnect session”. Using syntax “POST_TRANSACTION” we can kill session for active transaction has to be completed first and after that it will be automatically killed. Example of same syntax is given below.

SQL> alter system disconnect session ‘9,171’ post_transaction;

System altered.

Session can be kill without finishing active transaction using “IMMEDIATE” syntax with “alter system disconnect session” command. This command kills and terminate existing session immediately and roll back if any active transaction. This syntax is same as previous command “alter system kill session” with immediate syntax as given following example.

SQL> alter system disconnect session ‘9,171’ immediate;

System altered.

But when we are executing command “alter system disconnect session” without above both clauses (means POST_TRANSACTION & IMMEDIATE), error is being generated called ORA- 02000: missing POST_TRANSACTION or IMMEDIATE keyword.

SQL>alter system disconnect session ‘9,171’;

ORA- 02000: missing POST_TRANSACTION or IMMEDIATE

Means we can’t execute “alter system disconnect session” without specific keywords like post_transaction or immediate. In contrast we can execute “alter system kill session” syntax without any specific more syntax like immediate in prior release of Oracle 11g database.   Actually this feature “alter system disconnect session” was introduced in Oracle 10g. In Oracle 10g database this feature and syntax was as new feature of Oracle 10g database.

Dbametrix is remote dba support service provider company. We have expert team of highly experienced remote DBA.We also offer 24*7*365 basis oracle database support with very low cost plan. You can reach to us to http://www.dbametrix.com. or check our remote service level support at http://www.dbametrix.com/remote-dba.html

Leave a Reply Cancel reply

You must be logged in to post a comment.

Recent Posts

  • NSTableView with Core Data Tutorial using NSFetchedResultsController
  • CodeIgniter Wizard – a new PHP CRUD Code Generator for macOS
  • Installing Oracle Database 10g Express Edition and Changing the Default HTTP Port
  • Xcode Tutorial 2 – Putting iAd into your App (The Apple Approved Way)
  • Cocoa Programming: A Quick-Start Guide for Developers

Blogroll

  • All Systems GO
  • GOZmosis
  • Maclord's Blog
  • Ozar.net

Tags

.NET 2008 application ASP.NET basic Beginning best books business Business Objects C# Database Databases Development Edition Guide iPhone Java Java EE learn Learning Microsoft MS SQL Server MySQL Objective-C Programming objects Oracle Part PHP PL/SQL Professional Programming Server Software SQL T-SQL TSQL Tutorial Tutorials Using Video Visual Visual Basic .NET Web Programming Tutorials XCode
© 2026 Ozar.net Developer Blog | Powered by Minimalist Blog WordPress Theme

Powered by
►
Necessary cookies enable essential site features like secure log-ins and consent preference adjustments. They do not store personal data.
None
►
Functional cookies support features like content sharing on social media, collecting feedback, and enabling third-party tools.
None
►
Analytical cookies track visitor interactions, providing insights on metrics like visitor count, bounce rate, and traffic sources.
None
►
Advertisement cookies deliver personalized ads based on your previous visits and analyze the effectiveness of ad campaigns.
None
►
Unclassified cookies are cookies that we are in the process of classifying, together with the providers of individual cookies.
None
Powered by