[gdal-dev] OCI driver and -lco OVERWRITE=yes

Peter J Halls P.Halls at york.ac.uk
Tue Oct 13 07:26:59 EDT 2009


Jukka,

    several things here and, I think, they may stem from the Oracle OCI API, 
rather than the OGR OCI Driver.

    Firstly, drop table does not remove the index(es): these have to be dropped 
explicitly.  Secondly, there is no automatic handling of SDO_GEOM_METADATA: 
again, this must be handled explicitly: the OCI API provides no assistance.

    Thirdly, so far as I am aware, Oracle names indexes internally.

    Fourthly, so far as I am aware, the OGR -lco append and overwrite options 
enable access to the user's tablespace, rather than to create a new tablespace 
(which I do not think is supported in the API).  I had not thought of trying to 
do a delete through OGR, mainly as I use SQL Developer on a regular basis and 
just do table management there.

Best wishes,

Peter

Jukka Rahkonen wrote:
> Hi,
> 
> I tried to follow the example from http://gdal.org/ogr/drv_oci.html but but -lco
> OVERWRITE=yes does not overwrite anything for me. I have to drop the table
> manually first. It is not about user rights, I can drop the table as the same
> user from SQL*Plus. I quess that OVERWRITE=yes should drop the table and indexes
> and delete the corresponding line from USER_SDO_GEOM_METADATA. However, ogr2ogr
> with this option gives me just:
> 
> FAILED: Layer test already exists, and -append not specified.
>         Consider using -append, or -overwrite.
> ERROR 1: Terminating translation prematurely after failed
> translation of layer test
> 
> I did consider using -overwrite, but it is not supported with OCI driver.
> Ogr2ogr message:
>  ERROR 6: DeleteLayer() not supported by this data source.
> DeleteLayer() failed when overwrite requested.
> No surprise, I bet that because of this there is the -lco OVERWRITE=yes option.
> But is fails as well.
> 
> Ogr2ogr I am using comes from MS4W 2.2.8.
> 
> One question about OCI-driver: Is is possible to give the name of the spatial
> index that will be created? I have succeeded in giving the tablespace for index
> with INDEX_PARAMETERS but index name is not a parameter in Oracle CREATE INDEX,
> it is given before the parameters.
> 
> -Jukka Rahkonen-
> 
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
--------------------------------------------------------------------------------
Peter J Halls, GIS Advisor, University of York
Telephone: 01904 433806     Fax: 01904 433740
Snail mail: Computing Service, University of York, Heslington, York YO10 5DD
This message has the status of a private and personal communication
--------------------------------------------------------------------------------


More information about the gdal-dev mailing list