Snapshot DB

ralph1972ralph1972 Posts: 6
edited October 23, 2006 8:55AM in SQL Toolkit Previous Versions
Hello,

Is there a sample code file VB.NET 2005 how to create a db snapshot
and how to read and compare this snapshot this to another DB?

Thanks

Comments

  • Eddie DEddie D Posts: 1,800 Rose Gold 5
    Hi Ralph

    Thank you for your post.

    Please use the following code snippet:

    Sub LoadAndSaveASnapshot()

    'register a database using integrated security
    Dim db1 As New Database()
    db1.Register(New ConnectionProperties(".", "WidgetStaging"), Options.Default)

    'save the database to disk
    db1.SaveToDisk("c:\WidgetStaging.snp")

    Dim db2 As New Database()
    db2.LoadFromDisk("c:\WidgetStaging.snp")

    'dispose of the objects
    db1.Dispose()
    db2.Dispose()

    End Sub

    You will also find the above code snippet along with other helpful snippets in the following default location C:\Program Files\Red Gate\SQL Bundle 5\Toolkit Sample Files\Automating SQL CompareBest Regards
    Eddie
    Eddie Davis
    Senior Product Support Engineer
    Redgate Software Ltd
    Email: support@red-gate.com
  • Eddy,

    I found the solution.

    But I have another problem which I have explained in another post.

    This post can be closed.

    Ralph
Sign In or Register to comment.