SQL Compare Sample

I see there is sample in .net for SQL Compare which compares database to database and also script to database.
is there any sample where we can compare snapshot to database?
Tagged:

Comments

  • TugberkTugberk Cambridge Posts: 23 Bronze 4
    edited July 27, 2017 8:26PM
    Hi @brij_singh555,

    You should be able to load a SQL Compare snapshot into a C# Database object like below and the rest should be the same as comparing database to database really.
    using (Database snapshot = new Database())
    {
        // Load the database schema previously stored as the snapshot 
        var snapshotFile = Path.Combine(Directory.GetCurrentDirectory(), "mysnapshot.snp");
        snapshot.LoadFromDisk(snapshotFile);
    }
    

    Hope this answers your question but do let us know if you have more questions :smile:
    Tugberk Ugurlu
    Technical Lead, Data Privacy & Protection
    Redgate Software Ltd.
  • brij_singh555brij_singh555 Posts: 3 New member
    Thank you Tugberk!! that's what i was looking for
Sign In or Register to comment.