【问题标题】:The data type could not be assigned to the column "GeoLocation"无法将数据类型分配给“GeoLocation”列
【发布时间】:2015-07-31 20:48:58
【问题描述】:

我想从 Azure 获取实时数据库并将其复制到我的本地 SQL Server Management Studio 2014...


当我尝试从实时服务器导入时,我看到了数据库并选择了它,然后我点击下一步并选择我的本地数据库并抛出:


TITLE: SQL Server Import and Export Wizard


Column information for the source and the destination data could not be retrieved, or the data types of source columns were not mapped correctly to those available on the destination provider.


[dbo].[Fields] -> [dbo].[Fields]:

          - The data type could not be assigned to the column "GeoLocation" in "Microsoft OLE DB Provider for SQL Server".

[dbo].[FieldWanteds] -> [dbo].[FieldWanteds]:

          - The data type could not be assigned to the column "GeoLocation" in "Microsoft OLE DB Provider for SQL Server".

【问题讨论】:

    标签: sql azure


    【解决方案1】:

    您正在尝试将某些内容分配给定义为 GeoLocation 的字段,该字段不是 GeoLocation 值。您要复制到的本地数据库中的 [dbo].[Fields] 和 [dbo].[FieldWanteds] 的数据类型不是 GeoLocation。检查这些字段并确保类型与您的 Azure 数据库中的类型匹配。

    【讨论】:

    • 谢谢,我先运行迁移来创建表,然后它就起作用了。
    • 没问题,很高兴您对它进行了排序。感谢您接受答案。
    【解决方案2】:

    使用 SQLPackage.exe 从命令行加载您的 bacpac,如下所示:

    'C:\Program Files (x86)\Microsoft SQL Server\110\DAC\bin\SqlPackage.exe' /a:Import /sf:z:\downloads\foo.bacpac /tsn:sql.example.com /tdn:foo /tu:USERNAME /tp:PASSWORDHERE

    我使用的是 SQL Server 2012,根据this,.exe 的确切位置可能在 SQL 2014 上有所不同。

    【讨论】:

      猜你喜欢
      • 2012-08-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-02-10
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多