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.
Related
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.
I use toad for sql server to compare databases.
Is it possible to merge results between 2 database schema changes?
TOAD for SQL Server (6.1 +) has a neat compare Schema tool, which allows you to compare two databases. It also comes with a wizard that will allow you control how to merge the objects from one database to another.
Without more information about your current setup and what sorts of objects you're trying to merge, there is not much I can do to help you.
I have two database that belongs to two different SQL Server. Their database schema should be very similar but somehow different application generate different 'default schema' on the tables and views. Now when I am trying to compare the schema by using SSDT, I don't know how to ignore this default schema (I found it has a setting but it didn't value, same result showing as treating them as different set of objects).
e.g. Database A vs Database B
[dbuser].[TableA] vs [dbo].[TableA]
SSDT claims they are different..... :S
Please give me some advice... I expect I don't have to hack the database in order to achieve the comparison....
Save yourself the headache get sql-compare from redgate. You shoukd be able to get a trial and test your scenaior. This tool plus their SQL toolbelt is a must for anyone dealing with multiple sql servers. http://www.red-gate.com/products/sql-development/sql-compare/
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.
How do I migrate table schemas from one DB to another without damaging the data in the destination DB?
I want to move my data from my deployed development copy to the live database and would like to run some scripts to do it. I need to upgrade the schema for some tables and create others. I figure right now that I'll have to check each of the tables in the destination DB against the deployment one and then copy the new tables but that will be quite tedious. Are there any suggestions on how I can do this?
Check out SQL Compare tool by Redgate
http://www.red-gate.com/products/SQL_Compare/index.htm
You should be able to compare both the databases and then generate scripts based on the differences.
You can use a tool to generate the scripts. Redbrick has one, and Erwin can do deltas as well.
Another one besides the excellent Red-Gate SQL Compare is ApexSQL's SQL Diff.
ApexSQL also has a SQL Data Diff if you also need to compare and synchronize data from various sources.
Highly recommended!
Marc
In addition to the RedGate software mentioned above, Embarcadero Change Manager can do both schema and data instance compares, then generate alter scripts for the schemas and DML scripts for the data to bring two database in sync.