What are the challenges you face when working across database platforms? Take the survey
Options

SQL Compare Error

NDUCKSTENDUCKSTE Posts: 22
edited August 20, 2009 10:36AM in SQL Compare Previous Versions
SQL Compare is generating the following ALTER TABLE statement which errors:

ALTER TABLE [dbo].[ims_subscriber_details]
ADD CONSTRAINT [PK_ims_subscriber_details]
PRIMARY KEY CLUSTERED ([detail_id])
WITH FILLFACTOR=100, PAD_INDEX ON [PRIMARY]

One flavor of syntax that appears to work is:

ALTER TABLE [dbo].[ims_subscriber_details]
ADD CONSTRAINT [PK_ims_subscriber_details]
PRIMARY KEY CLUSTERED ([detail_id])
WITH (FILLFACTOR=100, PAD_INDEX=ON) ON [PRIMARY]

Comments

  • Options
    I am running version 8.1.0.360 which appears to be the latest.
  • Options
    PAD_INDEX is SQL 2000 syntax, PAD_INDEX = ON is SQL 2005/8 syntax. What version of SQL Server are you running the script on, and what's the compatability mode of the database?
  • Options
    Makes sense. Running SQL 2005 SP3, but database is in 8.0 compatability mode. The error comes from SQL Compare when the scripts first get created via the command line. Should I be doing any thing different?
    Simon C wrote:
    PAD_INDEX is SQL 2000 syntax, PAD_INDEX = ON is SQL 2005/8 syntax. What version of SQL Server are you running the script on, and what's the compatability mode of the database?
  • Options
    Any word on this? When I script a folder out is always seems to include the PAD_INDEX ON text (which is incorrect) regardless of the setting to ignore fillfactor and pad_index settings and then it errors when I try to do a compare.

    Thanks,

    Nick
    NDUCKSTE wrote:
    Makes sense. Running SQL 2005 SP3, but database is in 8.0 compatability mode. The error comes from SQL Compare when the scripts first get created via the command line. Should I be doing any thing different?
    Simon C wrote:
    PAD_INDEX is SQL 2000 syntax, PAD_INDEX = ON is SQL 2005/8 syntax. What version of SQL Server are you running the script on, and what's the compatability mode of the database?
  • Options
    It looks like SQL Compare is obtaining wrong version information from the connection information with the server. Do you have access to visual studio you can run a small console app with?
  • Options
    I have VS Studio 2005 installed and have access to 2008 if need be.

    I'm also taking the occasion to push the folks dragging their feet on upgrading our code to make it SQL 2008 compatible. We've got old style sql-92 joins littered everywhere.

    Thanks,

    Nick
    Simon C wrote:
    It looks like SQL Compare is obtaining wrong version information from the connection information with the server. Do you have access to visual studio you can run a small console app with?
Sign In or Register to comment.