Is there an open source SQL Server DB compare tool? [closed] - sql-server

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm working on an open source project that uses SQL Server 2005 as the data store. We need a DB compare tool to generate diff scripts to be able to upgrade a DB from one version to another.
Is there an open source or free SQL Server DB diff tool out there that generates a convert script?

I think that Open DBiff does a good job.
It's simple and I works with SQL Server 2005/2008.
But only generate the change script. Nothing more and nothing less.

On CodePlex I noticed yesterday DbDiff (http://www.codeplex.com/OpenDBiff) that you could try. Supports Sql2005 and 2008, I did not try it.

I'd recommend spending some cash and getting Red Gate's SQL Compare tool which does an excellent job, and can even compare databases to Visual Studio database projects to generate upgrade scripts. It's fast and easy to use, and works well. The upgrade scripts are also of decent quality.
It's not that expensive. Probably less expensive than your time. Just think about how much your hourly rate is, and how many hours it might take to investigate an open-source tool and get it working (and how many you have already spent), then multiply them together. That's how much a 'free' tool is really costing you, which is often significantly more than a commercial tool.

It's not open source, but is free (as in beer): Sql Effects Accord (aka Clarity) Community Edition

AdeptSQL Diff and DataDiff are wonderful products, much cheaper than RedGate's and a much more simplified UI, and I have yet to run into a scenario it cannot handle.

Aloha
You might want to try SqlDbDiff. It can generate change scripts. The free edition does a good enough job.

Anyone try xSQL Bundle (xSQL Data Compare and xSQL Object Compare)? Our place only uses for DB diffs, no syncs, so can't say for syncing but the diff and reports are not bad.
Also, OpenDBDiff has a spin off, not sure which is better - http://code.google.com/p/sql-dbdiff/
Anyone know if any of the free/open source DB diff tools mentioned here offer scriptable / command line interface to automate the diffs and synching?
I looked into xSQL tools, they offer command line access but unfortunately, no scriptable command to export diff results to (report) file.

While it's not exactly what you want, I found this for postgres:
http://mbk.projects.postgresql.org/
It doesn't generate a diff to apply, but rather allows you to merge a full dump of the new version of the table with the previous version.

Hmm, none that I know of. You can always retrieve the definitions as SQL and then run a diff tool on them, but it's a bit of a pain in the rear.
Probably the best solution for this is using some kind of "Migrations" tool, so you can keep your database definitions together with your code, and version them, etc.

Update
On Sourceforge I found Whiz SQL Structure Compare with this description: Whiz is a database diff utility which will be useful to find difference between two MS-SQL Server databases. It also able to generate SQL script to update the changes from one database to another database.
However, I've been unsuccessful in getting it to work so far...

We have both SQL Delta and SQL Compare. Each has strengths, but each also have weaknesses that make them quite a pain.
SQL Delta will miss some triggers in its comparison, and it will take actions not found in the action list, and it will sometimes take actions you did not want it to take. That was discovered at quite a cost in time.
SQL Compare will catch the triggers, but they are embedded within the table listings. On a large database, that means going through each table and sifting them out. Something the tool should have isolated for us. Again, quite a cost in time.

Its is a little late, but I just relased a real simple project on code plex:
http://dbcompare.codeplex.com
Enter (or build) two connection strings and it will compare all Tables, Views and Stored Procedures.

Related

How to separate programming logic and data in MS SQL Server 2005?

I am developing a data driven website and quite a lot of programming logic resides in database stored procedures and database functions. I found myself changing the stored proc/functions quite a lot in order to fix bugs or add new functionality. The data (tables) have remained mostly untouched.
The issue I am having is keeping track of versions of stored proc/functions. Currently I am incrementing version of whole database when I do a set of changes. As data is huge (10 Gb) I get issues having to run development version and release versions of databases in parallel.
I wish to put all the stored procs and functions in one database and keep data in one database, so that I can better manage the changes.
I am sure others would have encountered similar suggest and request suggestions on how to best handle this situation.
I would also recommend using source control keyword expansion in your stored procedures ($Version:$)
That way you can eyeball, grep, search syscomments, etc to see what version you have on your deployed database.
You can version just the schema dumps. In combination with source control keword expansion (as suggested by Rawheiser), you just take a look at what version you have in the database, generate a diff and apply it.
Also, there are several excellent tools to compare databases and their schemas, generate DDL scripts etc.: SQL Workbench, Power Architect, DDLUtils and Redgate SQL Compare, to name a few. SQL Compare is likely to work best with SQL Server, although all the others are FOSS and provide a higher ROI (in terms of time spent learning and what you can do with them) as they are platoform and RDBMS independent.
Finally, I have to say...I understand that the immediate results you get with logic in the DB are tempting, but if you've gone beyond more than a couple of procedures in the database, you're setting your self up for quite a lot of pain, sifting through what easily turns into spaghetti code and locking your application to a single database vendor. You might have your reasons, but I've been there and didn't like it very much. Logic can live very nicely in a different layer.
For source control you have several options:
Use a Visual Studio Database project.
Use SQL Server 2005's built-in support for source control
Use a third part tool such as SQL Compare
IMO Option 1. is preferable.

What is a free tool to compare two SQL Server Databases? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
What is a free tool to compare two Sql Server tables (data and schema).
It would be great if the tool can script the differences found.
I also went through some older posts. The closest I have seen is SQLDBDiff but I would love to try more options.
TableDiff.exe should have everything you need. It is one of the hidden gems in SQL Server 2005. So you don't have to download anything.
• Table Difference tool allows you to discover and reconcile differences between a source and destination table or a view. Tablediff Utility can report differences on schema and data. The most popular feature of tablediff is the fact that it can generate a script that you can run on the destination that will reconcile differences between the tables. TableDiff.exe takes 2 sets of input;
• Connectivity - Provide source and destination objects and connectivity information.
• Compare Options - Select one of the compare options
• Compare schemas: Regular or Strict
• Compare using Rowcounts, Hashes or Column comparisons
• Generate difference scripts with I/U/D statements to synchronize destination to the source.
TableDiff was intended for replication but can easily apply to any scenario where you need to compare data and schema.
You can find more information about command line utilities and the Tablediff Utility in Books Online for SQL Server 2005.
Even though this has been answered years ago a new comer which works really well is Data Compare within Visual Studio. It is part of Visual Studio 2010 and is part of the Database Professionals GDR update to Visual Studio 2008. This works great when you want to compare the same tables in 2 different databases.
If you need to compare 2 tables with the same schema that are in the same database or with different names TableDiff (mentioned earlier) is a great option.
DBComparer is free and works well for MS SQL Server
Atlantis Interactiv, now owned by Pragmatic Works has two free tools called Schema Inspector and Data Inspector that works very much like the Red Gates tools.
Try CompareData from Zidsoft. It's free for comparing table/view data and has 30-trial for metadata comparisons
We can recommend you a our reliable solutions for data and schema comparison for SQL Server: dbForge Schema Compare for SQL Server and dbForge Data Compare for SQL Server.
Their main advantages are high speed (up to 3 times quicker than most competitors) and extreme reliability.
Those tools are not free, but you can use 30-days trial for free and you have an opportunity to get a free license for both of the products - please refer to our free license conditions page.
A SQL Server specific database table diff tool is Volpet's Table Diff

Alternatives to Toad [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm currently using Toad for my day-to-day work on our databases (queries, updates, small scripts, browsing of db objects, etc.).
My question is: since my version of Toad is old and buggy, which are the (possibly free, but not necessarily) alternatives to Toad?
The database versions we are using are 10g and 9i.
Thanks a lot.
Oracle's SQL Developer.
PL/SQL Developer from http://www.allroundautomations.nl/. Presented between a choice between Toad and PL/SQL developer, about half the developers prefer PL/SQL developer. I have to admit the code completion in PL/SQL developer is much better, but I still prefer Toad for the DBMS management functionality.
TOra is an another good option. I used the pre GPL version for years. It's a good simple SQL tool for Oracle.
It supports schema browsing, analyse plan, limited debugging plus all the stuff you'd expect.
I've used Squirrel-SQL (which is a Java/JDBC based program and will work with any OS or database that provides a driver) and the database development tools for Eclipse (Eclipse-DTP). Both are certainly sufficient for light database work. Both are free and open-source.
After trying other products for some months, I'm back to Toad.
And I have to admit that (IMHO, and for the type of use that I'm doing of it): I've found no alternative to Toad.
The indispensable features that are missing in other products are:
Speed. Toad is blazingly fast; SQL Developer starts to crawl if you open more than 2 or 3 connections. When you have to operate with time constraints, you really can't wait SQL Developer to open.
The "open a new window until commit" functionality (a new window is opened after an insert or update statement, and you are forced to commit or rollback). Really handy to avoid pending commits.
The "execute current statement" functionality (shift-F9). SQL Developer doesn't have it, or you are forced to select the query you want to execute.
I'm surprised that nobody has mentioned DbVisualizer yet. Our company has been using it for a few years and everybody seems happy with it. It's powerful, runs on multiple platforms (Java-based) and supports different database systems (Oracle, DB2, MS Access etc). It has a free version; a commercial version is available if you need more features.
Simple answer:
Use Textpad or another text editor.
Explanation:
For me PL/SQL development is a process that has evolved over time. I've tried to apply continuous improvement to SQL development and it has worked out wonderfully for me. (for more on continuous improvement/Kaizen see link text)
I found PL/SQL IDE tools to be unstable.
I've had several crashes of Quest Software's TOAD as well as Quest Software's SQL Navigator (I've been using it since Version 3).
I lost work.
I tried other IDE PL/SQL tools.
These tools also crashed.
I lost work again.
I got frustrated.
I do not trust PL/SQL software development to any of the PL/SQL IDE tools out there.
Here are my PL/SQL coding core practices:
1. Export code using Quest Software TOAD
2. Use a Cygwin bash script to move files into the appropriate directories
3. Compare versions via BeyondCompare (if needed)
4. Check code out of WinCVS / CVSNT (if needed)
5. Edit using TextPad
6. Compare versions via BeyondCompare (if needed)
7. Check code in to WinCVS / CVSNT (if needed)
8. Use a Cygwin bash script to create a master changes file.
9. Import code back using Quest Software TOAD
An even more lengthy explanation:
I use Quest Software TOAD to export all PL/SQL and table DDL code to the filesystem.
In the Database menu -> Export -> Source Code
In the Database menu -> Export -> Table Scripts
This gets me individual files for each database object.
I move these files (Cygwin bash script) in directories
based on the file extensions.
*.prc files in /procedures
*.fnc files in /functions
*.pks and *.pkb files in /proceudres
*.trg files in /triggers
*.vw files in /views
*.sql files in /table_scripts
These files are initially checked into CVS.
(I use WinCVS/CVSNT server side)
I Beyond Compare each file version exported by TOAD
with the version already in CVS.
I ensure that the CVS sql repository is up to date.
In other words I need to have a good starting baseline.
I then use TextPad to edit the PL/SQL code.
link text
I pre-configure my Textpad with SQL syntax files
to make it easier on the eyes
link text
After editing, I Beyond Compare each edited
file version exported with the version
in WinCVS.
Luckily, WinCVS allows you to use an external
diff (Beyond Compare) which comes in very handy.
I load the new/changed code via TOAD to a test schema.
In the SQL Editor menu -> Load and Execute a Script File
I test the code out. (do some debug runs)
If the code tests out, I check the code into CVS.
At the end, I use Cygwin bash (and a bash script I've written) to create a master changes file. This master changes file contains all of the changes that need to be applied to bring the live schema up to date. This saves me a lot of time.
I then load the new/changed code via TOAD to a live schema. In the SQL Editor menu -> Load and Execute a Script File. That's about it. Software engineering is about process, versioning (CVS) and automating builds (bash script).
The biggest lesson out of all this (that have made me 10 times more productive) was switching from DB-based PL/SQL IDEs to simple ASCII text files. KIS in action.
If a copy your code resides in an ASCII file you avoid:
- mucking up the DB
- locking up DB objects
- iffy DB based revision control tools (if any)
- iffy DB diff tools (if any)
- losing code due to IDE crashes
- losing code due to DB crashes / shutdowns
- losing code due to concurrent editing (this can happen if two or more PL/SQL developers edit the same procedure)
Instead if you handle all PL/SQL code in filesystem ASCII files you have
- your choice of text editors (TextPad,notepad++,vi,etc)
- your choice of revision control systems (CVS,svn)
- your choice of text filtering/handling/scripting systems (I like Cygwin bash)
- your choice of diff tools (Beyond Compare,WinDiff,diff)
- your choice of DB tools (I can use TOAD, SQL Navigator) for importing and exporting the PL/SQL code to files.
I wanted a version history of all code changes.
I wanted to get everyone working together and prevent developers from stepping on each other's toes.
I wanted the freedom to choose my tools.
The side effect of this is that I handle all of the DB code in the filesystem during rapid development.
Just my 2 cents.
I'll toss in my vote for SQLPal. It's free. Most of the features it has works really well (auto-competition has never seemed to work). I'm using it against a 10g database daily and it works great.
I've been using Golden from Benthic Software as a SQL*Plus replacement for a long time and love it.
http://www.benthicsoftware.com/products.htm
If we had to pay then I would strongly recommend PL/SQL Developer for database code writting and TOAD for administration tasks.
From the free solutions I've been using so far especially four of them: (Oracle) SQL Developer, SQL Tools, SQLPal and TORA.
I've found SQL Developer as the one with the most utilities.
Unfortunately its java GUI makes it prone to hanging too much often.
SQL Tools is a very nice instrument except one thing: it has not an
auto-fill functionality / code-completion (e.g. table names and columns). If you could
pass this issue then ... go for it.
SQLPal it's good as long as you have to look at only one database
object at time. I just don't understand why displaying a simply
new window is, in fapt, meaning to open a completely new instance
of the application. It has its auto-fill functionality but that makes it very laggy. I would place a minus for its JDBC only available connection option. Such limitation makes it sometimes to hang while waiting to retrieve database metadictionay information.
TORA - it's a nice tool except the code completion ... I just couldn't make it working. And from the forums I could get that this is a pretty common problem. Otherwise its GUI is
almost flawless.
My conclusion: I hate to say it, I am an open-source fan but ... simply buy PL/SQL Developer / TOAD if you have to work intensively with such tools .
I would also recommend Oracle's SQL Developer, however I've found WinSQL to be quite good as well. SQL Developer is free and WinSQL has a community version that is quite robust, and works well against other platforms too (I also use it for working with Netezza).
I've used OraDeveloper by DevArt to connect to Oracle databases. It's nice because it plugs into Visual Studio in much the same way as the SQL Server databases can be queried through Server Explorer. It is not free, but in our case it came free with the purchase of OraDirect .Net, which is a new provider that allows Oracle to work with Microsoft's Entity Framework.
Having done 3 years in one job using TOAD, and now 5 years in current job using PL/SQL Developer, I would say overall TOAD is a better tool, but if you are specifically developing stored procedures in PL/SQL, PL/SQL Developer is better.
Don't forget get to set up the context sensitive help (under Help - HTML Manuals)
You could also use sqltools, which some of my colleagues prefer. I never got used to it, but looks powerful.
I use PL/SQL Developer for running multiple queries and stored procedure development, as it's rock solid, and you can kill the process via Task Manager, and get back all your windows upon starting up again.
I use TOAD for browsing, as that functionality can't be beat. But it's flaky on me, hanging, etc, although that is probably my computer..
I would buy both. I have both open now.
For accessing odd sources (OSISoft PI, JDE on AS400, 4D, Access, Excel), I use Advanced Query Tool. It's great to be able to use SQL against an Excel sheet of a proposed table, to create your DDL.
I love Toad. I had to switch to Embarcadero's Rapid SQL for two months and it damn near killed me. So while I don't know of any products that are better than Toad, I can say without reservation that Rapid SQL is wholly inadequate.
We are using RazorSQL for Oracle and also DB2. It is low cost and has a ton of features.
PLSQL Developer very good for Oracle DBMS, specifically for Stored Proc, but not so well for the DBMS management.
Just to throw it out there - did you know you can grab the beta of Toad 4.1 and use that for free? The betas are always free to the public.
I've used Embarcadero DBArtisan (not free)
I thought it was good.
I second the SQL Developer comments. FWIW, the newer versions of Toad are much more stable than the golden oldies were. I'm using Toad 9.7 and it's quite good.
I'm using PL/SQL Developer, which I think one of the best oracle database tools, it's lite and fast, I have one copy in my USB flash to allow me to use it in any pc(you just copy it from the program files folder and place it in the flash and it will work fine).
Also I bought OraDeveloper from DevArt three months ago, it's has some good features, but it's slower than PL/SQL Developer and require .Net framekwork. but the good thing that it has direct connection to Oracle, so you can use it from any PC without requiring Oracle client to be installed.
Another tools is EMS SQL Management Studio for Oracle, which looks nice, and have some nice features specially with import/export from other format.
http://sqlmanager.net/en/products/studio/oracle
and for free one you can use AnySQL Maestro, which has support for Oracle/MySql/Sql server and offer AnySql Maestro for free
http://www.sqlmaestro.com/
I've tried most of the tools suggested above, and found that I prefer this one over all of them (including TOAD):
SQLDetective
SQL Studio for Oracle is really nice...
Dreamcoder offers good set of tools for Database Management.
I prefer both Toad or SQL Developer. But I give more preference to Toad because of features like-
If you want to update your select result in toad, just add the ROWID
is your select statement. Once you select the records with ROWID then
you can edit/update your result grid.
Also, the session and Database monitoring monitoring features are much better in Toad. The only downside of Toad is that it requires Oracle SQL Client to be installed (which may be the case with any other non-Oracle branded tool), on the other hand Oracle SQL Client installation is not necessary for SQL Developer.
Worked with PL/SQL developer. It rocks.

SQL Server Management Studio alternatives to browse/edit tables and run queries [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I was wondering if there are any alternatives to Microsoft's SQL Server Management Studio?
Not there's anything wrong with SSMS, but sometimes it just seem too big an application where all I want todo is browse/edit tables and run queries.
I've started using LinqPad. In addition to being more lightweight than SSMS, you can also practice writing LINQ queries- way more fun than boring old TSQL!
TOAD for MS SQL looks pretty good. I've never used it personally but I have used Quest's other products and they're solid.
Seems that no one mentioned Query Express (http://www.albahari.com/queryexpress.aspx) and a fork Query ExPlus (also link at the bottom of http://www.albahari.com/queryexpress.aspx)
BTW. First URL is the home page of Joseph Albahari who is the author of LINQPad (check out this killer tool)
Database .NET
I have been using Atlantis SQL Enywhere, a free software, for almost 6 months and has been working really well. Works with SQL 2005 and SQL 2008 versions. I am really impressed with its features and keyboard shortcuts are similar to VS, so makes the transition really smooth to a new editor.
Some of the features that are worth mentioning:
Intellisense that actually works when using multiple tables and joins with aliases
Suggestion of joins when using multiple tables (reduces time on typing, really neat)
Rich formatting of sql code, AutoIndent using Ctrl K, Ctrl D.
Better representation of SQL plans
Highlights variables declarations while they are used.
Table definition on mouse hover.
All these features have saved me lot of time.
powershell + sqlcmd :)
If you are already spending time in Visual Studio, then you can always use the Server Explorer to connect to any .Net compliant database server.
Provided you're using Professional or greater, you can create and edit tables and databases, run queries, etc.
There is an express version on SSMS that has considerably fewer features but still has the basics.
vim + dbext :)
Oracle has a free program called SQL Developer which will work with Microsoft SQL Server as well as Oracle & MySQL. When accessing SQL Server, however, Oracle SQL Developer is only intended to enable an easy migration to Oracle, so your SQL Server database is essentially read-only.
You can still install and use Query Analyzer from previous SQL Server versions.
How about Embarcadero Rapid SQL Really good but kind of expensive.

Tool for querying databases [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I want to query a number of different databases mainly Oracle and Informix.
Can anyone suggest me some tool using which I can do this easily?
Try WinSQL lite at http://www.indus-soft.com/SynametricsWebApp/WinSQL.jsp. It is absolutely free and does not expire. It is only one file and does not come with any bulky DLLs. If you don't like it, simply delete the file from your hard drive.
An introduction about how to use it against an informix database can be found in this article.
I use and love DbVisualizer.
I like SQuirreL SQL Client. It's cross platform and database independent, and quite handy.
As a previous answer stated, WinSQL is one of the best "generic" sql query programs, although it is far from perfect. Generally speaking, the programs dedicated to a particular sql product are better (usually 3rd party products, not written by the SQL vendor). TOAD is a great program for Oracle (originally written by an Oracle employee in his spare time before being bought by Quest). TOAD has become a little bloated of recent versions, but is still a fantastic product. I think there are versions of TOAD for MySQL and maybe one or two others, however, the Oracle version is by far the best. When I last used Informix (2004) there was a reasonable 3rd party Java program whose name escapes me for the moment. The standard tools that come with Informix are from the dark ages (I used the Unix utilities that look a bit like DOS versions of Lotus 123), so anything else is better. I used WinSQL with Informix with great success.
The best alround one is TOAD
#littlegeek: Toad is not available for Informix. Additionally, the OP seems to want a single program that can query several different brands of DBMS, and you have to buy a different version of Toad for every DBMS you want to use it with.
Informix is not very well supported among third party database tool vendors.
Interestingly, Oracle' SQL Developer supports browsing (and converting to oracle) several databases, including SQL Server and MySQL.
Try the following:
Query Express (single 100KB executable, no install)
Query ExPlus (improved Query Express)
There is several options on this page: http://freewarehome.com/index.html?http%3A//freewarehome.com/bx/index.php%3Faction%3Dvthread%26forum%3D8%26topic%3D7136
GenDAT is not bad, but I am biased as I did write it ! It has been voted highly though.
I need cross platform now so I use Oracle SQL Developer which I think is great. It can handle other databases not just Oracle. Another good one (cross platform) is DB Solo.
I like Aqua Data Studio from Aquafold. It supports all of the major database players as well as some of the less including Informix. Great features like code beautification and syntax highlighting are perks.
We use Aqua Data
I have used Query Tool for years http://www.gpoulose.com/
It is lightwight and gets the job done.
However, I will also investigate some of the other ones listed here. Must say that SQLDeveloper and Toad are too bloated for my needs. I work on many different systems in any day, all at different clients with different security and down to very low-end machines. Having one simple tool and good SQL chops goes a long way!
I also would like to note that because I am installing it on new servers constantly, it needs to be free, or have an unlimited machine license. I'd be happy to pay for my own use of the tool, but need to be able to install it over and over again.

Resources