Forum Stats

  • 3,824,849 Users
  • 2,260,430 Discussions
  • 7,896,330 Comments

Discussions

transparent re-connection to database from sqlplus

Dumitru Motei
Dumitru Motei Member Posts: 5 Blue Ribbon
edited Apr 6, 2020 7:50AM in Database Ideas - Ideas

Hi,

I have observed that a connection established to a 12c PDB via sqlplus "survives" a PDB restart, that is, a PDB close followed by a PDB open.

After some testing, we realized that the session did not really survive, but was actually automatically reconneted to the PDB when a new SQL statement was issued from the sqlplus session initiated before PDB restart. This session was verified to be a new one, with different sid & serial# but, from sqlplus session pespective, it looks like there has never been a PDB restart as no errors are retrieved and SQL statements may be issued successfully following the PDB restart.

Therefore I would like to know if there is a way to prevent this transparent reconnection to the database, i.e., it would be preferred that a SQL statement issued after PDB restart from a sqlplus terminal initiated before the restart would fail with an error. For instance, this is already the case for sessions opened with SQL Developer which would give error. What we want to know if its possible to prevent this automatic reconnection, i.e., we would like that the sql session opened before the PDB was restarted could no longer issue statements successfully after the PDB to which it was connected was restarted (like it happens with SQL developer).

Thank you.

Dumitru

0 votes

Active · Last Updated

Comments