无法将数据类型分配给列" GeoLocation"

时间:2015-05-19 20:30:14

标签: sql azure

我想从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".

2 个答案:

答案 0 :(得分:1)

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

答案 1 :(得分:0)

使用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,.exe的确切位置可能因SQL this而异。