Compare SQL Native Backup to LiveDatabase
rockywurden
Posts: 10
I can compare 2 databases.
What do I need to change DB1 to a SQL Backup file?
Thanks
Imports RedGate.SQL.Shared
Imports RedGate.SQLCompare.Engine
Imports RedGate.SQLDataCompare.Engine
Imports RedGate.SQLDataCompare.Engine.ResultsStore
Imports RedGate.SQLCompare.BackupReader
Dim db1 As New Database
Dim db2 As New Database
db1.RegisterForDataCompare(New ConnectionProperties(sServer, sDatabase))
db2.RegisterForDataCompare(New ConnectionProperties(tServer, tdatabase))
......
What do I need to change DB1 to a SQL Backup file?
Thanks
Imports RedGate.SQL.Shared
Imports RedGate.SQLCompare.Engine
Imports RedGate.SQLDataCompare.Engine
Imports RedGate.SQLDataCompare.Engine.ResultsStore
Imports RedGate.SQLCompare.BackupReader
Dim db1 As New Database
Dim db2 As New Database
db1.RegisterForDataCompare(New ConnectionProperties(sServer, sDatabase))
db2.RegisterForDataCompare(New ConnectionProperties(tServer, tdatabase))
......
Comments
You'll also need to make sure you have the following files with your program...
And the code is simply...
The third argument is a backupset which is irrelevant for sqb files, the string arrays are used so you can pass multiple files. For each file you can set the password. If you don't have passwords you can simply omit this argument e.g....
HTH
Project Manager
Red Gate Software Ltd