在SQL Server中使用空间索引得到“无法打开格式错误的程序集'mscorlib'”

时间:2011-11-16 19:58:49

标签: sql-server sql-server-2008 spatial spatial-index

我在MSSQL中设置数据库时遇到一些问题,当我尝试在地理数据类型列上设置索引时,它会继续吐出错误

消息6507,级别16,状态2,第1行 无法打开格式错误的程序集' mscorlib'使用HRESULT 0x80070008。

这是代码

        /* do this last as everything is keyed to it */
        IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[place]') AND type in (N'U'))
        DROP TABLE [dbo].[place]
        GO
        IF  EXISTS (SELECT * FROM sysfulltextcatalogs ftc WHERE ftc.name = N'ft_placebyname')
        DROP FULLTEXT CATALOG [ft_placebyname]
        GO


        CREATE TABLE [dbo].[place](
            [place_id] [int] IDENTITY(1,1) NOT NULL,
            [prime_name] [nvarchar](max) NULL,
            [abbrev_name] [nchar](10) NULL,
            [street_address] [nvarchar](max) NULL,
            [creation_date] [datetime] NULL,
            [updated_date] [datetime] NULL,
            [coordinate] [geography] NULL,
            [plus_four_code] [tinyint] NULL
                CONSTRAINT [CK_plus_four_code_check] 
                CHECK ([plus_four_code] LIKE '[0-9][0-9][0-9][0-9]' AND [plus_four_code] NOT LIKE '0000'),

            CONSTRAINT [PK_place] PRIMARY KEY CLUSTERED 
            (
                [place_id] ASC
            )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
            ) ON [PRIMARY]
        GO
        /* create the indexing by long and lats */
        CREATE SPATIAL INDEX SIndx_place_geography_coordinate
           ON [place]([coordinate])
           USING GEOGRAPHY_GRID
           WITH (
            GRIDS =(LEVEL_1 = MEDIUM,LEVEL_2 = MEDIUM,LEVEL_3 = MEDIUM,LEVEL_4 = MEDIUM), 
            CELLS_PER_OBJECT = 64,
            PAD_INDEX  = ON,
            SORT_IN_TEMPDB = OFF,
            DROP_EXISTING = OFF,
            ALLOW_ROW_LOCKS  = ON,
            ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
        GO  

        /* create the indexing by primary name */
        CREATE UNIQUE INDEX ui_place_prime_name ON [place]([place_id]);
        CREATE FULLTEXT CATALOG ft_placebyname AS DEFAULT;
        CREATE FULLTEXT INDEX ON [place]([prime_name])
            KEY INDEX ui_place_prime_name 
            WITH STOPLIST = SYSTEM;
        GO

1 个答案:

答案 0 :(得分:1)

FWIW, SQL Server 2008 R2:命令已成功完成。

这是一个非常快速的谷歌:

  

没有足够的存储空间可用于处理此命令。

     

(HRESULT异常:0x80070008)(mscorlib)

你有没有机会离开车位?

另一篇文章:

  

SqlServer进程内存不足(HRESULT 0x80070008)。我会提交   DCR使错误信息更好。

看起来像内存或驱动器空间耗尽问题?