When using "Import vector layer" in QGIS DB Manager (QGIS 3.6.0) to load a layer to an Oracle database ( I get the following error:

Error 2
Creation of data source "XXXXX"."MY_TABLE" failed: 
Oracle error: CRS not found and could not be created.
SQL: ORA-01031: insufficient privileges
Unable to execute statement
Error: INSERT INTO sdo_coord_ref_system(srid,coord_ref_sys_name,coord_ref_sys_kind,legacy_wktext,is_valid,is_legacy,information_source) VALUES (:a,:bb,:bc,:bd,'TRUE','TRUE','GDAL/OGR via QGIS')

Source shapefile is in WGS84, QGIS shows "EPSG:4326" in layer properties and CRS definition in the PRJ file is:


Projection definition is also contained in SDO_COORD_REF_SYSTEM. The following query returns one row.

FROM sdo_coord_ref_system
WHERE srid = 4326;

Why does QGIS try to insert the CRS into SDO_COORD_REF_SYSTEM although there is already a valid record for this common CRS?

  • 2
    Also ogr2ogr tends to do the same unless the OCI driver specific layer creation option is used as -lco SRID=4326 gdal.org/drv_oci.html. I do not know if user can add that parameter with QGIS. The OCI driver is old and Oracle Spatial did not originally support EPSG codes but it used its own peculiar codes. – user30184 Mar 6 at 17:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.