Error "Invalid object name'mapinfo.mapinfo_mapcatalog" when opening a table in a SQL Server database

Product affected: MapInfo Pro™

Issue

When trying to open a table via an ODBC connection to a Sql Server database, the following error is generated:

Odbc error: odbc rc=-1, odbc sqlstate=S0002, dbms rc=208, dbms msg=[mirosoft][sql server native client 10.0][sql server]Invalid object name'mapinfo.mapinfo_mapcatalog'

Cause

This error appears because the table named ‘MAPINFO.MAPINFO_MAPCATALOG’ is missing in SQL database. 

Resolution

UPDATED: December 4, 2019
The required table can be created using any of the steps listed.

1. Create the table using EasyLoader in MapInfo.

2. If the above step fails, then use the following script in Sql Server to create the Table.


Replace "master" with the name of the database being used

------------------------------------------------------------------------------------------------------------------------------------------------------------
USE [master]
GO
 
/****** Object:  Table [MAPINFO].[MAPINFO_MAPCATALOG]    /
SET ANSI_NULLS ON
GO
 
SET QUOTED_IDENTIFIER ON
GO
 
SET ANSI_PADDING ON
GO
 
CREATE TABLE [MAPINFO_MAPCATALOG](
      [SPATIALTYPE] [float] NULL,
      [TABLENAME] [varchar](32) NULL,
      [OWNERNAME] [varchar](32) NULL,
      [SPATIALCOLUMN] [varchar](32) NULL,
      [DB_X_LL] [float] NULL,
      [DB_Y_LL] [float] NULL,
      [DB_X_UR] [float] NULL,
      [DB_Y_UR] [float] NULL,
      [VIEW_X_LL] [float] NULL,
      [VIEW_Y_LL] [float] NULL,
      [VIEW_X_UR] [float] NULL,
      [VIEW_Y_UR] [float] NULL,
      [COORDINATESYSTEM] [varchar](254) NULL,
      [SYMBOL] [varchar](254) NULL,
      [XCOLUMNNAME] [varchar](32) NULL,
      [YCOLUMNNAME] [varchar](32) NULL,
      [RENDITIONTYPE] [int] NULL,
      [RENDITIONCOLUMN] [varchar](32) NULL,
      [RENDITIONTABLE] [varchar](32) NULL,
      [NUMBER_ROWS] [int] NULL
) ON [PRIMARY]
 
GO
 
SET ANSI_PADDING OFF
GO
---------------------------------------------------------------------------------------------------------------------------------------------------------------------


After creating table " MapInfo. MapInfo_Mapcatalog." 

1. Create a unique index on the TABLENAME and the OWNERNAME, so only one table for each
owner can be made mappable.

2. . Grant Select privileges to all users on the MAPINFO_MAPCATALOG. This allows users to make
tables mappable. Update, Insert, and Delete privileges must be granted at the discretion of
the database administrator.