Solved

Compare two SQL database and script changes

Posted on 2014-11-24
4
250 Views
Last Modified: 2014-12-10
I have two databases one in a UAT environment and one in a DEV environment.  I will like to update the UAT environment with the changes made in the DEV environment such as additional columns to existing tables, new tables and sps.

i there some method that can compare the two databases and script any changes?
0
Comment
Question by:RDLFC
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 66

Accepted Solution

by:
Jim Horn earned 500 total points
ID: 40462260
SQL Server (2012) Data Tools has SQL menu > Schema Compare > New Schema Comparison, which enables you to point to a source and target database, identify any objects that are in one and not the other / in both but different, and to 'migrate' those changes with a couple of button clicks.

Invaluable when migrating all changes from one database (say DEV) to another (UAT).

Once the compare is complete you'll be able to click the 'Generate Script' button to get a single .sql script of all changes.

>such as additional columns to existing tables, new tables and sps.
If these are the only changes, then hit the Options button (looks like a gear), and in the Object Types tab uncheck the Application-scoped node, then expand it, then check only the tables and SP's checkboxes.  That way it doesn't try to compare and potentially update all of the users, groups, views, and other stuff.
0
 

Author Comment

by:RDLFC
ID: 40462556
i am not seeing the menu options you described.  I am using server management studio 2012.
0
 
LVL 66

Expert Comment

by:Jim Horn
ID: 40462566
SQL Server Data Tools is a separate download performed after SQL Server/SSMS.
0
 
LVL 21

Expert Comment

by:Alpesh Patel
ID: 40464332
One Free tool is DBCompare

I have been using since 2 years
0

Featured Post

Why You Need a DevOps Toolchain

IT needs to deliver services with more agility and velocity. IT must roll out application features and innovations faster to keep up with customer demands, which is where a DevOps toolchain steps in. View the infographic to see why you need a DevOps toolchain.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question