DataJuggler.DBCompare 8.0.0

dotnet add package DataJuggler.DBCompare --version 8.0.0                
NuGet\Install-Package DataJuggler.DBCompare -Version 8.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DataJuggler.DBCompare" Version="8.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DataJuggler.DBCompare --version 8.0.0                
#r "nuget: DataJuggler.DBCompare, 8.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install DataJuggler.DBCompare as a Cake Addin
#addin nuget:?package=DataJuggler.DBCompare&version=8.0.0

// Install DataJuggler.DBCompare as a Cake Tool
#tool nuget:?package=DataJuggler.DBCompare&version=8.0.0                

DBCompare

DB Compare is used to compare two SQL Server databases and view a report of any schema differences. DB Compare was originally a sample of DataTier.Net and uses the same class SQLDatabaseConnector.cs to read the database schema.

<a href='https://youtu.be/13HipAOyAqU'>This is the most recent video on YouTube:</a>

Update 11.15.2023: This project has been updated to .NET 8.

Update 10.20.2022: This project has been updated to .NET 7. You must use Visual Studio 2022 Preview until the full version comes out.

Breaking change: Microsoft.Data.SqlClient version 5.0 (same with 4.0) has encryption turned on by default. If your database is not encrypted, you must add Encrypt=false to your connection string. If you build your connection string using the Connection String Builder Form, there is an option 'Turn Off Encryption'.

I just published a video that demonstrates how to use this.

Please like and subscribe to my channel if you find this useful.

https://youtu.be/0dMvALbl6MA

To run this project as a Nuget package, follow these steps.

Modify your Program.cs.

Step 1:

Change the line that runs this app to this:

Application.Run(new DBCompare.MainForm());

Step 2:

Run the application.

Step 3:

Enter or Build Your Source and Target Connection Strings.

Step 4:

Click the Compare Button

Step 5:

View the report that was created.

I am working on changes for creating the SQL to update, but I wanted to convert to .Net 5 before I did this.

Watch for a new 'Create Update Scripts' button coming in the coming days hopefully. Or by 2029. I get busy sometimes and have too many projects.

Enjoy. Please report any bug on Git Hub:

https://github.com/DataJuggler/DBCompare

As will all my open source, they come with triple your money back if you are not happy, after a small $1.50 restocking fee.

Update 9.12.2019: DBCompare install can not be downloaded here: https://datajuggler.com/Downloads/DBCompare.msi

Update 6.29.2019: Version 2.1 New Features

  1. Ignore DataSync - My boss installed SQL DataSync on our servers so we can run our websites on SQL Express, which is much faster than Azure SQL, but he likes Azure SQL for backups so now we have the database on the VM backed up and mirred to Azure SQL. Works pretty well and every 10 minutes they sync up any changes.

SQL DataSync added 717 tables / procedures to my comparisons, so now I ignore these by default unless you turn it on.

  1. Ignore Firewall Rules - Azure SQL adds a view database_firewall_rules. This is ignored by default unless you turn it on.

  2. I made the compare method async, and it helps a little as far as you no longer see (NotResponding), but the hourglass stays on so I might need to rethink the hourglass when hovering over the main form title bar for movement.

  3. I updated the Nuget package DataJuggler.Net to version 5.5.0 to handle this optional parameters for IgnoreDataSync and IgnoreFirewallRules.

The only possible breaking change is if you have a table or view with (underscore)dss in the name it will not be added for comparison. (if I type _dss it goes to italics for some dumb reason).

I just rented a virtual machine, so soon I am going to build a DB Compare online.

It will be easy to build the Azure to Azure comparision, for the comparision of your home machine vs an Azure I haven't figure that out yet. Suggestions anyone?

This project now has Git Hub Pages setup. Book mark this and I will try and keep it up to date with the latest news:

<a href='https://datajuggler.github.io/DBCompare/'>DB Compare Home - Git Hub Pages</a>

The video lists the URL incorrectly, now DB Compare is in its own repo:

<a href='https://github.com/DataJuggler/DBCompare'>DB Compare on Git Hub<a/>

The main engine of DB Compare and the project DataTier.Net is a class library called DataJuggler.Net.

For any projects that need to read the database schema of a SQL Server database, DataJuggler.Net is available as a Nuget Package:

Update 6.29.2019: Install-Package DataJuggler.Net -Version 5.5.0

Or install the package using NuGet Package Manager (which is what I do).

I am building a website this weekend, so I will have an install version available soon (I took the install out of the repo).

Please visit my YouTube channel as I make new videos often:

<a href='https://www.youtube.com/channel/UCaw0joqvisKr3lYJ9Pd2vHA'>Data Juggler YouTube Channel</a>

Product Compatible and additional computed target framework versions.
.NET net8.0-windows7.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
8.0.0 251 11/15/2023
7.0.2 204 7/29/2023
5.0.9 478 2/7/2021
5.0.8 366 1/31/2021
5.0.7 340 1/30/2021
5.0.6 341 1/30/2021
5.0.5 363 1/30/2021
5.0.4 327 1/29/2021
5.0.3 326 1/29/2021
5.0.2 364 1/29/2021
5.0.1 330 1/29/2021
5.0.0 336 1/29/2021

11.15.2023: The project has been updated to .NET 8.

July 28, 2023: A bug was found where the graph exceeded the maximum for some reason, so I fixed it to
increase the graph.Maximum by 10 if the value being set exceed the max.

April 13: 2022
Version 6.3.0: The Generate Scripts has been updated to create tables, fields and views that are missing.
The code I just added to DataJuggler.NET8 to get ViewText, something similar can be used to get the
stored procedures and functions and that is 98% of what I have to update. Add table relationships and constraints
and that should complete most of the Generate Scripts use cases I can think of.

Version 5.0.9 - I created a Generate Scripts Button that shows after a Comparison. For now it only creates the Fields that are missing. I will work on this over time. All fields are created as a nullable. If you need to change that, you can change the SQL that is copied to your clipboard.

Version 5.0.8 - I added a link to a video I just made for this project in the ReadMe.txt that opens.

Version 5.0.7 - The text was out of date. I need to convert the text to pull from the binary version number, or remember to enter the text when I update.

Version 5.0.6 - The YouTube Button showed up on the Form, but the background image didn't make it. Now this is fixed. I should have checked for this when I fixed the Swap Button. Oops.

Version 5.0.5 - The Swap Button showed up on the Form, but the background image didn't make it. Now this is fixed.

Version 5.0.4 - Testing including a ReadMe that opens with the project. (Worked)

Version 5.0.3 - It turns out the Label text is set in the Init method of the Main Form.
It is fixed now.

Version 5.0.2 - I left the version # as 2 something on the Main Form. Now it is up to date.
I now know this works! New video coming soon.

Version 5.0.1  - I had an image path that was in my Graphics folder, not in the project folder.

This is the 1st version for .Net 5. This project has been ported from .Net Framework, and this is the 1st
attempt as a Nuget package.