Compare encrypted functions doesn't work
Francisco Lopez
Posts: 3
Hi all,
I'm using SDK 8 for a internal tool to compare different version of our application.
So we have the following function to compare them
but the report doesn't show the differences, because it says that all encrypted functions are differente
Someone can help me?
Regards.
I'm using SDK 8 for a internal tool to compare different version of our application.
So we have the following function to compare them
databaseA.Register(new ConnectionProperties(serverNameA, databaseNameA, userName, password), Options.Default); databaseB.Register(new ConnectionProperties(serverNameB, databaseNameB), Options.Default); Differences databaseAVsB = databaseA.CompareWith(databaseB, Options.Default | Options.DecryptPost2kEncryptedObjects | Options.IgnorePermissions | Options.IgnoreWhiteSpace | Options.IgnoreUsers); HTMLReport.CreateHtmlReport(fileName, databaseA, databaseB, databaseAVsB , Options.Default, xslTemplate);
but the report doesn't show the differences, because it says that all encrypted functions are differente
-- Text was encrypted GO
Someone can help me?
Regards.
Comments
Can you make sure you have redgate.backupreader.dll added as a resource to your project?
The backupreader is responsible for decrypting the encrypted objects as it works in a similar way to the way we read backup files.
I hope this helps.
I have inserted that DLL (redgare.backupreader.dll) and now show the following error message:
Can't load BackupReader.dll
I think is a license problem, so I've changed the file license.licx and I've inserted also SQLDataCompare libraries (but I don't need it, because I want to compare schemas)
But still show the same error.
I'll investigate why I have this problem, now I've removed the backup library to carry on with the development.
Regards
You shouldn't need to add the SQL Data Compare assemblies if you're only working with schema objects.
I would make sure you're using the correct version of the backup reader by referencing the backupreader.dll from the same folder as the SQLCompare.engine.
Also, backupreader.dll is 32bit only, so if your project is targeting x64, then this might be the problem.
when call the register function to Register the database, it raise this error all the same.if there hasn't Encrypted objects, it can work well.
Options myoptions = Options.Default | Options.DecryptPost2kEncryptedObjects | Options.IgnorePermissions | Options.IgnoreWhiteSpace | Options.IgnoreUsers;
productionDB.Register(targetConnectionProperties, myoptions);