How can we help you today? How can we help you today?

Compare Single snapshot vs script file for each object

I have created a snapshot and script files for each database object using SQL Compare.
After that I have compared the snapshot against the script files.
I am getting 2 objects that exist in both but are different.

The difference is in the script for Extended properties for the 2 tables.
sangha
0

Comments

2 comments

  • sangha
    The object synchronization script is same for both the synchronization direction.
    Here is the object synchronization script that was created by SQL Compare.
    /*
    Script created by SQL Compare version 6.0.0 from Red Gate Software Ltd at ---.
    Run this script on --- to make it the same as ---
    Please back up your database before running this script
    */
    SET NUMERIC_ROUNDABORT OFF
    GO
    SET ANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT, QUOTED_IDENTIFIER, ANSI_NULLS ON
    GO
    IF EXISTS (SELECT * FROM tempdb..sysobjects WHERE id=OBJECT_ID('tempdb..#tmpErrors')) DROP TABLE #tmpErrors
    GO
    CREATE TABLE #tmpErrors (Error int)
    GO
    SET XACT_ABORT ON
    GO
    SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
    GO
    BEGIN TRANSACTION
    GO
    IF EXISTS (SELECT * FROM #tmpErrors) ROLLBACK TRANSACTION
    GO
    IF @@TRANCOUNT>0 BEGIN
    PRINT 'The database update succeeded'
    COMMIT TRANSACTION
    END
    ELSE PRINT 'The database update failed'
    GO
    DROP TABLE #tmpErrors
    GO
    
    sangha
    0
  • Michelle T
    The script you've provided there is the script that Compare generates when it hasn't actually generated any actions to synchronize between databases, so this does look like a bug (Compare shouldn't produce just that script because if it's producing a synchronization script it should be generating some actions).

    I've just tried out saving some tables with extended properties on to snapshots and scripts, and comparing the results to each other, and it's working fine for me. Can you give me more information about the tables and extended properties? You can email more information to michelle.taylor@red-gate.com if you don't want to post it on a public forum.

    (What would be most useful is a copy of the full creation script for those two tables, but other useful information would be whether the extended properties are directly on the table or on a column, constraint, index or trigger, what data type the value of the extended properties has, and anything interesting about the table like computed columns or complex constraints or triggers - it might be that the problem is in fact with another element of the table, but the SQL Difference pane's textual comparison is getting confused amongst the extended properties instead of reporting the real problem.)
    Michelle T
    0

Add comment

Please sign in to leave a comment.