I managed to get the OCI driver to work on both oracle table and views but I can't get it to work with synonyms.
Is this a limitation or am I doing something wrong?
Here's a sample of the command I'm using:
"C:\Program Files\GDAL\ogr2ogr.exe" -f "ESRI Shapefile" "test_shape.shp" "OCI:<schema>/<password>@(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)))(CONNECT_DATA = (SID =orcl))):MY_LOCAL_SYNONYM
I get the following error:
ERROR 1: ORA-04043: object "MY_LOCAL_SYNONYM" does not exist
If I log into SQL Developer with the same schema/password and try to perform a select it works perfectly.
SELECT * FROM MY_LOCAL_SYNONYM;
SELECT * FROM <schema>.MY_LOCAL_SYNONYM;
-sql "select * from my_local_synonym"
? The OCI driver probably wants to read some metadata from ALL_SDO_GEOMETRY_METADATA and you may need to insert a row for your synonym. – user30184 Dec 15 '16 at 15:07--debug on
into your command prints some information about the SQL queries. – user30184 Dec 15 '16 at 15:36