Tell me more ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am using SQL Server 2008 R2. We have two database, one is development and another one is for testing. We want to maintain both databases in sync but only in structure and stored procedures, not in data. Both databases contain different data but structure should remain the same. Is there any way to achieve this?

share|improve this question
4  
source code revision control – Mitch Wheat Jan 27 at 11:49
1  
Sure - using a tool like Red Gate's SQL Compare makes it very easy to achieve this – marc_s Jan 27 at 16:41
Use a proper schema management tool (like Liquibase, Flyway) or simply store your DDL statements (and migration statements) in SQL scripts. Store everyhing in a version control system and you can re-generate your database to any version you like. Using something to compare the databases is an ugly workaround. – a_horse_with_no_name Jan 27 at 22:14
@a_horse_with_no_name just for the sake of argument, the RG tools also support comparing a source control rev (well, for certain version control systems) to a database. It can always be useful to know that the deployment you're about to do is going to change the database in exactly the way that you expect it to... – Aaron Bertrand Jan 28 at 2:22
I got one link adeptsql.com/download.htm and found very effective. Sry for trouble. Thanks. – user18489 Jan 28 at 8:28

closed as off topic by Mark Storey-Smith, Phil, RolandoMySQLDBA, dezso, Leigh Riffel Jan 28 at 13:37

Questions on Database Administrators Stack Exchange are expected to relate to database administration within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

1 Answer

ApexSQL Diff can also do this for you. You can filter by object type

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.