REBUILD PARTITION = ALL

mbenson@frontporch.com[email protected] Posts: 12
edited November 26, 2009 9:41AM in SQL Compare Previous Versions
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

  • Brian DonahueBrian Donahue Posts: 6,590 New member
    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.