OracleMetadataProvider uses USER_* views while legacy OracleSchemaManager uses ALL_* views, causing introspectTableByUnquotedName() to fail when session user ≠ schema owner
Author: k0n3rCreated Mar 5, 2026Updated Jul 28, 2026
LabelsRequires FeedbackOracleSchema Introspection
Bug Report
| Q | A |
|---|---|
| Version | 4.4.1 |
| Previous Version if the bug is a regression | N/A |
Summary
Inconsistent behavior between deprecated SchemaManager API and the new introspectTableByUnquotedName() when Oracle session user differs from schema owner.
Current behavior
introspectTableByUnquotedName() queries USER_* views and fails with TableDoesNotExist when session user ≠ schema owner.
Steps to reproduce
- Oracle DB with schema owner user SCHEMA_OWNER.
- Connect DBAL with a different session user (e.g., DBA proxy or application user) that has privileges on SCHEMA_OWNER's tables, with dbname = 'SCHEMA_OWNER'.
- Call $schemaManager->tablesExist(['my_table']) → returns true (uses ALL_TABLES WHERE OWNER = 'SCHEMA_OWNER').
- Call $schemaManager->introspectTableByUnquotedName('my_table') → throws TableDoesNotExist (uses USER_TAB_COLUMNS which only sees the session user's own tables)
Expected behavior
Should use ALL_* views scoped by OWNER, consistent with tablesExist() and introspectTable().
Source: doctrine/dbal