| Author |
Message |
yacov
Joined: 29 Jun 2010 Posts: 11
|
Posted: Thu Oct 06, 2011 5:25 pm Post subject: comper two snap files in sdk |
|
|
hi
i want to compare two snap files ,get result in script
like the command line comparison
"SQLCompare.exe" /sn1:D:\bcp\HASTRSQL.HashSQL.snp /sn2:D:\bcp\YACOVR_SQLHASHAVIT.HashSQL.snp /f /q /sf:tst1.sql"
In sdk
i have load the files
CustomerDB.LoadFromDisk(@"D:\bcp\YACOVR_SQLHASHAVIT.HashSQL.snp");
HashavimProductionDB.LoadFromDisk(@"D:\bcp\HASTRSQL.HashSQL.snp");
i do
Differences stagingVsProduction = HashavimProductionDB.CompareWith(CustomerDB, Options.EnableDeployNow);
how to get the script _________________ Regards
yacov -R |
|
| Back to top |
|
 |
Chris.Allen
Joined: 12 Mar 2009 Posts: 442
|
Posted: Fri Oct 07, 2011 9:57 pm Post subject: |
|
|
I need to do a little bit of research myself to find you the full answer but let me point you in the right direction for now:
http://help.red-gate.com/help/SQLCompareAPIv8/0/en/index.htm
for:
SQL Compare API 8.0.0
the Work.ScriptObject Method
Namespace: RedGate.SQLCompare.Engine
Assembly: RedGate.SQLCompare.Engine (in RedGate.SQLCompare.Engine.dll)
Returns the script necessary to create a SQL object. |
|
| Back to top |
|
 |
yacov
Joined: 29 Jun 2010 Posts: 11
|
Posted: Sat Oct 08, 2011 6:46 pm Post subject: comper two snap files in sdk |
|
|
Do you have sample ?
i am using this RedGate.SQLCompare.Engine.dll.
if you using command line compare.exe like "SQLCompare.exe" /sn1:D:\bcp\HASTRSQL.HashSQL.snp /sn2:D:\bcp\YACOVR_SQLHASHAVIT.HashSQL.snp /f /q /sf:tst1.sql"
you get reuslt file that contain the difference between two snp files
i want to build comper between two snp files with sdk
after loading the files snp , how i get the diferece of the objets
thank you _________________ Regards
yacov -R |
|
| Back to top |
|
 |
Chris.Allen
Joined: 12 Mar 2009 Posts: 442
|
Posted: Mon Oct 10, 2011 10:25 pm Post subject: |
|
|
You can find all our samples within the SDK.
I believe the answer is that the script generated by the code is written to standard out (the screen) - to redirect to a file simply use the redirection operator '>' and specify a file name. |
|
| Back to top |
|
 |
Chris.Allen
Joined: 12 Mar 2009 Posts: 442
|
Posted: Mon Oct 10, 2011 10:33 pm Post subject: |
|
|
Take a look at this example supplied in the SDK:
LoadAndSaveASnapshotExample.cs |
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
|
| Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group