ogr2ogr fails to create spatial_ref_sys and geometry_columns tables in MSSQL 2012 database
|Reported by:||andyew||Owned by:||tamas|
|Severity:||major||Keywords:||mssql spatial_ref_sys ogr2ogr|
Using a command line like this ogr2ogr -f MSSQLSpatial "MSSQL:server=RMDS04;database=Andrew_test;trusted_connection=yes" -lco "OVERWRITE=YES" "C:\REFMAP\SOURCE.TAB" -progress
The SOURCE table is created in the database with all the requisite columns. The tables spatial_ref_sys and geometry_columns are not.
Attached is a SQL Profiler Trace of the transaction. You'll see a couple of "Invalid object name" references to the two tables when these are queried and not found.
No error is reported during upload.
The ogr2ogr is from the 64 bit Windows version of QGIS(Dufour) found in the OSGeo4W64\bin directory and executed in the OSGeo4W Shell. The PC OS is Windows 8 64 bit.