2.4 Disconnecting


There is a difference between "disconnecting from the database" and exiting the SQL*Plus application. When you use the EXIT command:

  1. Any database changes you submitted, such as INSERT statements, are committed; that is, they are permanently applied to the database. This is because SQL*Plus does an implicit commit when you end your session.

  2. Your point-to-point session is terminated .

  3. Finally, your SQL*Plus program exits and you are back to your desktop or command shell.

From within SQL*Plus, you do have the option to just DISCONNECT from your current database connection but keep the SQL*Plus application up. When you disconnect:

  1. Any database changes you submitted, such as INSERT statements, are committed; that is, they are permanently applied to the database.

  2. Your point-to-point session is terminated.

  3. You are still within the SQL*Plus application but you no longer have a connection to a database. From this point you can reconnect to the same database, connect to a different database, or exit from SQL*Plus with the exit command.

Whether you DISCONNECT or you EXIT, SQL*Plus does an implicit commit.



Programming Oracle Triggers and Stored Procedures
Programming Oracle Triggers and Stored Procedures (3rd Edition) (Prentice Hall PTR Oracle Series)
ISBN: 0130850330
EAN: 2147483647
Year: 2003
Pages: 111
Authors: Kevin Owens

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net