I have an oracle table which I would like to query/make a selection. I would then like to export the selection to a shp file.
I'm using gdal and ogr2ogr.
Following the guidelines here and here I have come up with the following:
ogr2ogr -f "ESRI Shapefile" c:/Testing/Scratch/GDAL/symbol.shp OCI:dbusername/db_password@tns_name -sql "SELECT* FROM tablename where VERSION_DATE >= CURRENT_DATE -8" -progress
I then get the following error: "Unable to open datasource 'OCI:dbusername/db_password@tns_name' with the following drivers"
There is then a long list of drivers including "ESRI Shapefile".
I have now added " after OCI as suggested.
ogr2ogr -f "ESRI Shapefile" c:/Testing/Scratch/GDAL/symbol.shp OCI:"dbusername/db_password@tns_name -sql "SELECT* FROM tablename where VERSION_DATE >= CURRENT_DATE -8" -progress
I no longer get the errors about it being unable to open the datasource with the drivers. I now just get an "Access in denied".
I have a working connection to the database in ArcGIS using the same username & password. Does gdal generate its own user?