Opened 10 years ago

Closed 10 years ago

#5339 closed defect (fixed)

ogr2ogr fails to create spatial_ref_sys and geometry_columns tables in MSSQL 2012 database

Reported by: andyew Owned by: tamas
Priority: normal Milestone:
Component: OGR_SF Version: unspecified
Severity: major Keywords: mssql spatial_ref_sys ogr2ogr
Cc: tamas

Description

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.

Attachments (1)

SQLProfilerTrace.csv (10.8 KB ) - added by andyew 10 years ago.
SQL Profiler Trace

Download all attachments as: .zip

Change History (4)

by andyew, 10 years ago

Attachment: SQLProfilerTrace.csv added

SQL Profiler Trace

comment:1 by Even Rouault, 10 years ago

Cc: tamas added
Component: defaultOGR_SF
Keywords: mssql added

comment:2 by tamas, 10 years ago

Owner: changed from warmerdam to tamas

comment:3 by tamas, 10 years ago

Resolution: fixed
Status: newclosed

fixed in trunk (r27015) and branch-1.10 (r27016)

Note: See TracTickets for help on using tickets.