My Oracle Support Banner

Two Different Users Connected Simultaneously in SQL Developer And Working On The Same PL/SQL Package Causes Loss Of Changes (Doc ID 2683776.1)

Last updated on FEBRUARY 10, 2022

Applies to:

Oracle SQL Developer - Version 19.4 and later
Information in this document applies to any platform.

Symptoms

Using SQL Developer 19.4, you are connected as two different users.  If both users are working on the same package, you may encounter a scenario when one user's updates inadvertently overwrites the changes made by the other user, hence causing loss of changes.

Scenario:
In the same SQL Developer session, you connect as 2 different users (User1 and User2). If changes are made to a PL/SQL package by User1, then you switch to User2 connection and access the same package and compile it *without* reconnecting, it will overwrite whatever changes were made by User1, causing a loss of changes. Consequently, the package is overwritten with the stale code that was shown from User2 connection.

Example:
Using SQLDeveloper 19.4, did the following;

1) Logged in as User1 (very few privileges) and edited a package from User1's schema. Compiled this new modified version and ran it.

2) It had run time errors, so wanted to use the debugger on it.

3) Switched to User2 (which was already logged in) with DBA privileges. Navigated to the User1/ Packages, the package body which wanted to edit/debug. When brought it up, it had the old pre-modified version, with an error symbol. If you compile at that point it replaces the new modified version with the old pre-modified version. So all the edits on package made by User1 is now lost.

Unless you disconnect and reconnect, you will lose all edits if you compile stale PL/SQL code using User2.
  

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.