I have used the ddlgen tool to export the database schemas from my DEV and UAT servers. Now I am trying to file diff the output but the order in which the DDL is generated is different from both servers.
The documentation for the tool does not appear to have an option for sorting the output. Is there one?
Alternatively, is there another tool available for this purpose?
Regarding sorting you are right, there's no option to do it!
If you need to compare schemas, you can extract all tables and all stored procedures one at a time. Then you compare each files individually.
Related
I have two databases, DB mysql & DB Access.
I want to compare two the same tables from this different databases about data and schema.
I need a tool for do it. Can you help me!
With DataGrip, you can select 2 databases, right-click and select Compare.
If it is only for 2 tables with identical columns, the best way would be to extract the data into and ordered csv and use a diff tool to compare the files. If you want to compare many tables and the table structure you'll need to extract each in turn.
I don't know if it the best but IBM Data Studio can do that if I'm report to this post.
You could use JetBrains IDE data grip and dump both files out and then compare using either excel or CLI
I have a table under dbo and an almost identical table under a schema called tmp. Visual Studio Schema Compare does not appear to let me select one set of dbo-based objects and compare them with a similar set of tmp-based objects.
The database server is locked down and it is not possible to create a second database. Also, SQL server is unusable on a local dev machine due to resource constraints. The tmp schema would allow me to make changes to tmp, then compare and push those changes to the dev schema of "dbo".
What's the best way to compare these two sets of objects?
You can compare your objects with different schemas with ApexSQL Diff and it has free Community edition.
By creating custom schema mapping, you’ll be able to match objects with different schemas compare them and synchronize if needed.
If you just want to compare objects to see differences and create a merge script, you can check out a free tool - ApexSQL Compare.
Since RedGate tool is already mentioned, one more tool that can help you out is dbForge Schema Compare.
Two methods come to mind. Try redgates sql-compare tool, worth its weight in gold imo.
Another option would be to use the 'generate scripts' functionality of ssms and then use the diff tool of your choice to compare the resultant sql text files.
We have some sets of the tables in same database like table1 and table_copy. Now we are planning to migrate the old data from table1 to table_copy which is currently in use. But before that we have to compare the definitions of the tables so that the data import will be hassel free. Can we compare the table definitions with a sybase query.
I searched over net by all I get approaches to compare the data in two tables. but we intend to compare the definitions only.
You could do queries on sysobjects, syscolumns and systypes.
Or you could compare with diff (or perl or whatever) the outputs of sp_help.
However isn't this really a development and testing problem? You should perhaps copy the database into a pre-production database and test your scripts - repeat until perfect.
If you can only do the full migration on the Production database for some resources reason (time, money, servers,) then you need full dumps before starting.
Isn't the DDL for these two tables saved and accurate in a Version Control system somewhere? Perhaps they're from a 3rd party system though, so you don't have that.
I need to compare a stored procedure in my DEV database with multiple databases in PROD environment (20+).
Any ideas about tools to do that?
I'm using "SQL Delta 5" to compare two DBs. For multiple DBs (1->N) I was thinking in the command line feature. What do you think?
Thanks!
I suggest that use Redgate Schema compare. It's a good tools in order to compare schema of two database together.
I need to compare structure of approx. 50 tables in SQL Server 2005, and write T-Sql script to make them equal. Each table has its copy in the same database, the only difference being the name and structure (e.g. original "tableName" has to be compared to "tableName_copy", and the "tableName_copy" has missing constraints, PK, FK, triggers, etc).
I know there are lots of tools on the market (both free and commercial) to compare and prepare SQL scripts, but their problem is that they can compare tables with identical names in two databases, not giving option to choose which tables compare, even less if their names differ.
I was wondering if such tools exist (it would be great if they were free or open-source) to do this job of automating script generation for chosen tables of different names. I'd appreciate if anyone who has done similar job before share his/her experience!
Could you take a different approach, copying your tablename_copys into a second database, but renaming them to tablename, and then running your favorite comparison tool?