Options

REBUILD PARTITION = ALL

Is there an option to remove the following line from the build script generated by SQL Compare?

PRINT N'Altering [dbo].[MyPartitionedTable]'
GO
ALTER TABLE [dbo].[MyPartitionedTable] REBUILD PARTITION = ALL
WITH (DATA_COMPRESSION = NONE)
GO

I get the following error when I try to execute the synch script on a SQL 2005 database (the source object is in SQL 2008):

The following error message was returned from the SQL Server:

[102] Incorrect syntax near 'REBUILD'.
Incorrect syntax near the keyword 'with'. If this statement is a common table expression or an xmlnamespaces clause, the previous statement must be terminated with a semicolon.

The following SQL command caused the error:

ALTER TABLE [dbo].[MyPartitionedTable] REBUILD PARTITION = ALL
WITH (DATA_COMPRESSION = NONE)

Comments

  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi Marty,

    I don't think that data compression was supported in SQL Server 2005 -- the only references I can find on it apply to SQL Server 2008.

    Normally, SQL Compare will try to filter out any unsupported syntax when going between different versions.

    Just to make sure -- are you running the script against the same server that you had originally compared against or did you save the script to a file and try to run it against a third SQL Server?

    Thanks!
Sign In or Register to comment.