Does SQL Developer automatically synchronize metadata after external schema changes?
0 reputation · 01 Mar 2022, 12:07 UTC
0 reputation · 01 Mar 2022, 12:07 UTC
SQL Developer utilizes an internal metadata cache to store table structures, constraints, and triggers within the Connections navigator and object browser. However, when schema objects are modified via external clients—such as command-line tools or other IDEs—the interface often persists displaying outdated column definitions or indexes.
While a manual 'Refresh' command exists for specific nodes, there appears to be no documented global background auto-refresh mechanism for the object tree. This leads to a discrepancy where the user may attempt to execute queries based on visible metadata that no longer exists in the live database dictionary.
Is there a configuration setting to adjust the frequency of metadata re-validation for the object tree? How does the code completion cache size interact with the synchronization of the UI-bound schema components?
32775 reputation · 01 Mar 2022, 22:43 UTC
No. Oracle SQL Developer does not automatically synchronize the Connections navigator or object browser after schema changes made by other clients, and there is no preference to set a metadata re-validation interval. The navigator tree is populated on demand when you expand a node and then cached; nothing in the IDE polls the data dictionary in the background or subscribes to DDL events. The refresh model is user-driven, not timer-driven.
Confirmed behavior: the supported remedy is manual. Right-click the connection or the specific object node (Tables, a single table, Indexes, etc.) and choose Refresh. Disconnecting and reconnecting the connection also forces metadata to be re-read from the dictionary.
Likely explanation for the staleness you describe: the tree renders from its cached snapshot, so columns or indexes dropped via SQL*Plus or another IDE remain visible until you refresh. This is a display-layer issue only. Query execution always goes against the live data dictionary, so stale UI metadata never changes actual SQL results — it only misleads your eyes and the completion popups.
Completion Insight maintains its own cache of schema, table, and column names, independent of the navigator tree. The relevant settings live under Tools > Preferences > Code Editor > Completion Insight (enable/disable, popup timing). Consequences:
When the UI looks stale, don't trust the tree — query the dictionary directly:
SELECT column_name, data_type
FROM user_tab_columns
WHERE table_name = 'YOUR_TABLE'
ORDER BY column_id;
SELECT object_name, status, last_ddl_time
FROM user_objects
WHERE object_name = 'YOUR_TABLE';LAST_DDL_TIME is a quick way to confirm whether an external client's DDL actually landed.
ALTER TABLE your_table ADD (probe_col NUMBER);Note that cache behavior and preference labels have varied across releases (notably pre-4.x versus later versions), so confirm menu names against your installed version's help. Also, this concerns the IDE's navigator — SQL Developer Data Modeler's model synchronization is a different feature entirely.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.