dlt-hub / dlt-hub/dlt

Oracle 12c ORA-02420: missing schema authorization clause

Open
#3,939 4 comments 0 reactions 1 assignee Claimed by @rudolfix View on GitHub
bug destination needs decision
Dominant language
Python
Stars
5.9k
Forks
600
Avg merge
1d 14h
Merged PRs (30d)
38

Description

### dlt version

1.26.0

### Describe the problem

Trying
a) to fetch a small table from Oracle ( dates2 ) and then
b) load it back to Oracle under a different table name ( dates3 ).

The first operation finishes smooth, and without errors. The second one raises :

(oracledb.exceptions.DatabaseError) ORA-02420: missing schema authorization clause
Help: https://docs.oracle.com/error-help/db/ora-02420/
[SQL: CREATE SCHEMA "ORACLE_USER_SCHEMA"]
(Background on this error at: https://sqlalche.me/e/20/4xp6)

### Expected behavior

To create metadata tables ( _dlt_loads, _dlt_pipeline_state, _dlt_version ) and materialize the table "dates3" in Oracle .

### Steps to reproduce

```
import dlt
from dlt.sources.sql_database import sql_table
from dlt.destinations import sqlalchemy

CREDS = "DRIVER + CONNECTION_STRING_GOES_HERE"

def load_tables() -> None:
pipeline = dlt.pipeline(
pipeline_name="oracle",
destination=dlt.destinations.sqlalchemy(
credentials=CREDS,
enable_dataset_name_normalization=False
),
dataset_name='ORACLE_USER_SCHEMA',
dev_mode=False
)
src = sql_table(credentials=CREDS, table='dates2') # a)
print ( list(src) ) # Runs fine, shows table results
info = pipeline.run(src, write_disposition='replace', table_name='dates3') # b)

load_tables()
```

### Operating system

Windows

### Runtime environment

Local

### Python version

3.13

### dlt data source

Oracle through sqlalchemy

### dlt destination

Oracle through sqlalchemy

### Other deployment details

Targets Oracle through sqlalchemy

### Additional information

Related with :
[https://github.com/dlt-hub/dlt/issues/3141#issuecomment-3606265725](url)

python lib versions:

dlt -> 1.26.0
oracledb -> 4.0.0
sqlalchemy -> 2.0.49
python -> 3.13.2

backend version:
Oracle -> 12c

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.