3
votes

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

3
That error message isn't about compatibility. It compains about a syntax error. How are you creating that script and what does it contain? What's at line 29? - Panagiotis Kanavos
What is the exact problem? The CREATE TABLE statements or the INSERT statements? I'm seeing a CREATE TABLE in your error message so I'm assuming it's the create statements that fail? Can you show us that statement (click edit below your question, paste the CREATE statement(s) that fail, select that text and click the {} button to format it properly). - TT.
Post the SQL script from the task that creates the table. It's impossible to help otherwise. The Import wizard generates an SSIS package. You don't need to rerun the wizard each time, just save the package and run it whenever you need to. You also don't need to drop and recreate the table, just truncate it. You can replace the task that executes CREATE TABLE with TRUNCATE TABLE ARKALK; and keep the rest of the package as-is - Panagiotis Kanavos

3 Answers

0
votes

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.

0
votes

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)

0
votes

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.