简体   繁体   中英

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.

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.....)

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? 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.
I don't write any SQL statement myself.
Connecting to the same database on the old SQL Server in the Company and running the Import from there works fine.
SQL Server 2008 R2 doesn't like the 2014 tables to be imported .... Full error message:

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."

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 ".

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.

We finaly had to move the database to a SQL Server 2014 at our hosting provider. After that everything was working like normal. (Same import routine through "SQL Server managment Studio" that failed with SQL Server 2008 R2)

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.

My workaround was to use the 'Copy Database' wizard from the 2014 server to a temporary DB on the 2012 server.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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