Wolfon Stromboy
Дата: 04.08.2005 11:18:22
Различается работой с транзакцией
DISCONNECT SESSION Clause
Use the DISCONNECT SESSION clause to disconnect the current session by
destroying the dedicated server process (or virtual circuit if the connection was
made by way of a Shared Server). To use this clause, your instance must have the
database open. You must identify the session with both of the following values from
the V$SESSION view:
- For integer1, specify the value of the SID column.
- For integer2, specify the value of the SERIAL# column.
If system parameters are appropriately configured, then application failover will
take effect.
- The POST_TRANSACTION setting allows ongoing transactions to complete
before the session is disconnected. If the session has no ongoing transactions,
then this clause has the same effect described for as KILL SESSION.
- The IMMEDIATE setting disconnects the session and recovers the entire session
state immediately, without waiting for ongoing transactions to complete.
- If you also specify POST_TRANSACTION and the session has ongoing
transactions, then the IMMEDIATE keyword is ignored.
- If you do not specify POST_TRANSACTION, or you specify POST_
TRANSACTION but the session has no ongoing transactions, then this clause
has the same effect as described for KILL SESSION IMMEDIATE.
KILL SESSION Clause
The KILL SESSION clause lets you mark a session as terminated, roll back ongoing
transactions, release all session locks, and partially recover session resources. To use
this clause, your instance must have the database open, and your session and the
session to be killed must be on the same instance. You must identify the session
with both of the following values from the V$SESSION view:
- For integer1, specify the value of the SID column.
- For integer2, specify the value of the SERIAL# column.
If the session is performing some activity that must be completed, such as waiting
for a reply from a remote database or rolling back a transaction, then Oracle waits
for this activity to complete, marks the session as terminated, and then returns
control to you. If the waiting lasts a minute, then Oracle marks the session to be
killed and returns control to you with a message that the session is marked to be
killed. The PMON background process then marks the session as terminated when
the activity is complete.
Whether or not the session has an ongoing transaction, Oracle does not recover the
entire session state until the session user issues a request to the session and receives
a message that the session has been killed.
eml78
Дата: 04.08.2005 14:52:05
Спасибо за цитаты, но хелп у меня тоже есть и я его читал.
По поводу "Различается работой с транзакцией" - имеется в виду что в DISCONNECT SESSION есть опция POST_TRANSACTION? И все?
Зачем тогда нужно было 2 команды заводить?