Deployment script ignores the exclusion options

rrerre Posts: 42 Bronze 2
edited August 13, 2012 4:44AM in SQL Compare Previous Versions
As I learned in this thread http://www.red-gate.com/MessageBoard/vi ... hp?t=15518 SQL Compare will always show me all differences on a objects if it found one difference which I didn't want to ignore during the comparison.

Now, I want to deploy only these changes from a object which aren't ignored by the comparison that I have ticked at the options of SQL Compare (e.g. ignore constraint names is enabled). I give you one example.

I ticked the option to ignore data compression on the comparison between two different database. Now, I have table with activated data compression on the source database, but not on the target database. On this table I have a new column on the source database, but not on the target database.
SQL Compare should now create me a deployment script with the new column, but without the data compression option, because I ticked the option "ignore data compression" at the SQL Compare option.

Is there any way how I could do it? SQL Compare should show me the table with all difference, but create me a deployment script only with the new column, because I enabled the option "ignore data compression".

Do you get the purpose of my question?

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hello,

    Hopefully we can work out what is happening on your end, but I have been unable to reproduce the behavior on a simple reproduction. Given this script:
    CREATE TABLE TABLE_1(
    id int PRIMARY KEY,
    DATA NVARCHAR(50)
    )
    WITH (DATA_COMPRESSION=ROW)
    
    and Ignore ->data compression checked, the migration script does not include data compression.
    CREATE TABLE [dbo].[TABLE_1]
    (
    [id] [int] NOT NULL,
    [DATA] [nvarchar] (50) COLLATE Latin1_General_CI_AS NULL
    )
    GO
    IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
    GO
    IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
    GO
    PRINT N'Creating primary key [PK__TABLE_1__3213E83F7F60ED59] on [dbo].[TABLE_1]'
    GO
    ALTER TABLE [dbo].[TABLE_1] ADD CONSTRAINT [PK__TABLE_1__3213E83F7F60ED59] PRIMARY KEY CLUSTERED  ([id])
    GO
    
    If you can provide the script for the tables you are comparing, I can have a try at reproducing the issue.

    Also you had said
    SQL Compare will always show me all differences on a objects if it found one difference which I didn't want to ignore during the comparison.
    This is not strictly true -- problem is the text-based SQL parser the side-by-side windows use is not the same as the actual binary engine the comparison uses. So things like extra spaces in comments and some other odd bits can show as differences even though you chose to ignore these differences. It doesn't completely disregard all of the difference settings.
  • rrerre Posts: 42 Bronze 2
    Thanks, for you reply and sorry for my late answer.

    Basically you are right. I tried it again we the current version of SQL Compare 10.2.0.777 and it seems to work.
    The case I had before it's already done. So, I don't have the same problem like before. I can't also reproduce the error from before.

    If I get the problem again I will reply in this thread with a detail description and the example with the necessary objects. Thanks for your help.
Sign In or Register to comment.