简体   繁体   English

将数据库表从SQL Server 2014导出到SQL Server 2008 R2

[英]Export database table from SQL Server 2014 to SQL Server 2008 R2

We have upgraded our company database from SQL Server 2008 R2 to SQL Server 2014. Since that we are not able anymore to export data (3 tables) into our webshop, which uses SQL Server 2008 R2. 我们已将公司数据库从SQL Server 2008 R2升级到SQL Server 2014.由于我们无法将数据(3个表)导出到使用SQL Server 2008 R2的网上商店。

We receive the following error message : 我们收到以下错误消息:

0xc002f210, SQL-Task Preperation, 'CREATE TABLE [dbo].[XXXXX] ([XXXXX_ID] int NOT...': 'Line 29: Length or precision specification 0 is invalid.....) 0xc002f210,SQL-Task Preperation,'CREATE TABLE [dbo]。[XXXXX]([XXXXX_ID] int NOT ...':'第29行:长度或精度规格0无效.....)

Is there a way to still use the export feature in SQL Server 2014 or do we have to upgrade our webshop database to SQL Server 2014 as well? 有没有办法在SQL Server 2014中仍然使用导出功能,还是我们必须将我们的网上商店数据库升级到SQL Server 2014? Any other way to get our tables exported? 是否有其他方式可以导出我们的表格?

EDIT: I am using the import data function from SQL Server 2014 to try to Import 3 tables from SQL Server 2014 to 2008 R2. 编辑:我正在使用SQL Server 2014中的导入数据功能尝试从SQL Server 2014到2008 R2导入3个表。
I don't write any SQL statement myself. 我自己不写任何SQL语句。
Connecting to the same database on the old SQL Server in the Company and running the Import from there works fine. 连接到公司中旧SQL Server上的同一数据库并从那里运行导入工作正常。
SQL Server 2008 R2 doesn't like the 2014 tables to be imported .... Full error message: SQL Server 2008 R2不喜欢导入2014表....完整的错误消息:

Fehler 0xc002f210: 1-SQL-Task 'Vorbereitung': Fehler beim Ausführen der Abfrage 'CREATE TABLE [dbo].[ARKALK] ( [ARKALK_ID] int NOT...': 'Line 29: Length or precision specification 0 is invalid.'. Mögliche Ursachen sind folgende: Probleme bei der Abfrage, nicht richtig festgelegte ResultSet-Eigenschaft, nicht richtig festgelegte Parameter oder nicht richtig hergestellte Verbindung." Fehler 0xc002f210:1-SQL-Task'Vorbereitung':FehlerbeimAusführenderAbfrage'CREATE TABLE [dbo]。[ARKALK]([ARKALK_ID] int NOT ...':'第29行:长度或精度规格0无效。 '.MöglicheUrsachensind folgende:Probleme bei der Abfrage,nicht richtig festgelegte ResultSet-Eigenschaft,nicht richtig festgelegte参数oder nicht richtig hergestellte Verbindung。“

Editor note: since more people read English then German - here is the result of a google translate of the full error: 编者注:因为更多的人阅读英语然后阅读德语 - 这是谷歌翻译完整错误的结果:

Error 0xc002f210: 1 SQL Task 'preparation': Failed to execute the query 'CREATE TABLE [dbo] [ARKALK] ([ARKALK_ID] int NOT ....': 'Line 29: Length or precision specification 0 is invalid. . 'Possible causes are: problems with the query, not properly fixed ResultSet property, not properly determined parameters or not properly established connection ". 错误0xc002f210:1 SQL任务'准备':无法执行查询'CREATE TABLE [dbo] [ARKALK]([ARKALK_ID] int NOT ....':'第29行:长度或精度规范0无效。'可能的原因是:查询问题,没有正确修复ResultSet属性,没有正确确定参数或没有正确建立连接“。

You can set the compatibility level for your database like this: 您可以像这样设置数据库的兼容级别:

ALTER DATABASE database_name 
SET COMPATIBILITY_LEVEL = 100 -- 2008 / 2008 r2

For more information about compatibility levels, read the relevant MSDN page. 有关兼容级别的详细信息,请阅读相关的MSDN页面。

We finaly had to move the database to a SQL Server 2014 at our hosting provider. 我们最终必须将数据库移动到我们的托管服务提供商的SQL Server 2014。 After that everything was working like normal. 之后一切都正常。 (Same import routine through "SQL Server managment Studio" that failed with SQL Server 2008 R2) (与SQL Server 2008 R2失败的“SQL Server管理Studio”相同的导入例程)

I had exactly the same error today trying to run the Import/Export wizard against a SQL 2014 DB, attempting to export data to a 2012 server. 我今天尝试针对SQL 2014数据库运行导入/导出向导,尝试将数据导出到2012服务器时出现完全相同的错误。

My workaround was to use the 'Copy Database' wizard from the 2014 server to a temporary DB on the 2012 server. 我的解决方法是使用2014服务器上的“复制数据库”向导到2012服务器上的临时数据库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM