Opened 8 years ago

Closed 8 years ago

#5402 closed defect (duplicate)

MSSQLSpatial driver incorrectly identifies tables with the same name but different schema as the same table

Reported by: plectrum20 Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: 1.10.1
Severity: normal Keywords:


The MSSQLSpatial driver seems ignores the schema when checking to see if a table exists and when dropping what it thinks is an existing table.

For example, I'm trying to import a layer "Countries" into schema "schema1". There is a table already in the database "dbo.Countries" with a spatial column. When I run the query with overwrites, this existing table gets deleted and schema1.Countries is created. If overwrites are off, schema1.Counties is not imported. If I have two objects in the database already called "Countries" with different schema "dbo" and "schema2", one of them is deleted when I try to import a new object.

I have resorted to creating a new database (rather than schemas) for each mapping source I want to import from so nothing existing is over written and everything gets imported.

Change History (1)

comment:1 Changed 8 years ago by Even Rouault

Resolution: duplicate
Status: newclosed

Duplicate of #5401

Note: See TracTickets for help on using tickets.