[gdal-dev] Oracle ogrinfo insert into user_sdo_geom_metadata
Langford, Robert
Robert.Langford at salford.gov.uk
Fri Apr 11 05:14:26 PDT 2014
All,
I'm writing a batch file to automate the loading of spatial data into our Oracle database.
As a check I'm testing the Oracle connection before starting the process with a command like:
> ogrinfo -ro -q OCI:db_schema/db_password at db_name:table_name_1,table_name_2
Which, if all ok, would result in:
> 1: table_name_1
> 2: table_name_2
I then in testing I added a non-existent table name:
> ogrinfo -ro -q OCI:db_schema/db_password at db_name:table_name_1,table_name_2,NOT_A_TABLE_NAME
Resulting (as I was expecting) in:
> ERROR 1: ORA-04043: object NOT_A_TABLE_NAME does not exist
> in OCIDescribeAny
> ERROR 1: ORA-04043: object NOT_A_TABLE_NAME does not exist
> in OCIDescribeAny
> 1: table_name_1
> 2: table_name_2
However when checking in Oracle, the USER_SDO_GEOM_METADATA table contained an entry for NOT_A_TABLE_NAME. I deleted the row from the table in Oracle and tried the ogrinfo command again with "--debug on"
> ogrinfo -ro -q OCI:db_schema/db_password at db_name:table_name_1,table_name_2,NOT_A_TABLE_NAME --debug on
Which had the same resultant command line output (obviously with all the debug text as well), however this time the row wasn't inserted into the USER_SDO_GEOM_METADATA table.
Can anyone explain this behaviour, shouldn't the -ro flag prevent any inserts? Also as an aside I'd be interested in knowing why the "ERROR 1: ORA-04043" is output twice?
Initially using: GDAL 1.9.2
Updated & same on: GDAL 1.10.1
Kind regards,
Rob
DISCLAIMER: The information contained in this communication/message from Robert.Langford at salford.gov.uk sent on Fri Apr 11 13:14:26 2014 is confidential. It is intended solely for the addressee(s) gdal-dev at lists.osgeo.org
Access to this message by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful.
As a public body, Salford City Council may be required to disclose this email [or any response to it] under the Freedom of Information Act 2000, unless the information in it is covered by one of the exemptions in the Act.
Please immediately contact the sender, Robert.Langford at salford.gov.uk if you have received this message in error.
For the full disclaimer please access http://www.salford.gov.uk/e-mail. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20140411/90b0f044/attachment.html>
More information about the gdal-dev
mailing list