SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Comparing two database and upgrade tables & sp
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

blocker
Yak Posting Veteran

Philippines
89 Posts

Posted - 03/13/2012 :  05:16:56  Show Profile  Reply with Quote
Good day!

I am having a big problem on how to update table entities and stored procedures from old database to new modified database.

In modified database, some tables are edited like, new tables are added, new columns are added in tables,some tables are deleted, data type changes same with the stored procedures.

I need to know if there is a query or any other way to to this. I don't want to review each tables and store procedures since there is 60 tables and 85 stored procedures in Old database.

I need to do this without losing the data in each tables in Old database.


Thank you for helping!

TRANSOFTWARE

tkizer
Almighty SQL Goddess

USA
35017 Posts

Posted - 03/13/2012 :  13:21:42  Show Profile  Visit tkizer's Homepage  Reply with Quote
We use Red Gate's SQL Compare utility to sync databases where we don't know what's different. I must say though that you should know what is different if you are properly versioning the database and using source control. It should be rare that you need to run a sync'ing tool.

By the way, the tool is not free but is reasonable. We absolutely love the Red Gate SQL Toolbelt which has this in it. I am not paid to say this at all, it's just my own experience.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

blocker
Yak Posting Veteran

Philippines
89 Posts

Posted - 03/15/2012 :  01:00:37  Show Profile  Reply with Quote
thank you tkizer. Does it have a trial version? Will it completely update all tables and stored procedures without lossing any piece of data?

TRANSOFTWARE
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
35017 Posts

Posted - 03/15/2012 :  12:47:37  Show Profile  Visit tkizer's Homepage  Reply with Quote
I believe it does have a trial, but you'll need to check. In regards to not losing any data, I've never had any problems. BUT be sure you test the script somewhere on a copy of the schema to be sure.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

Bustaz Kool
Flowing Fount of Yak Knowledge

USA
1438 Posts

Posted - 03/15/2012 :  13:22:11  Show Profile  Reply with Quote
Just to clarify, the RedGate SQL Compare does the schema portion. You'll also need the SQL Data Compare to get the data sync'd. They'll both be in the toolkit bundle. I've used these for years and always found them useful.

=================================================
Men shout to avoid listening to one another. -Miguel de Unamuno
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
35017 Posts

Posted - 03/15/2012 :  13:27:14  Show Profile  Visit tkizer's Homepage  Reply with Quote
If you are going to sync data and schema, then might as well use backup/restore.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

blocker
Yak Posting Veteran

Philippines
89 Posts

Posted - 03/16/2012 :  05:12:48  Show Profile  Reply with Quote
thank you tkizer and Bustaz Kool.. I'll try this tool. I'll update soon.

TRANSOFTWARE
Go to Top of Page

Steve2106
Posting Yak Master

United Kingdom
149 Posts

Posted - 03/16/2012 :  06:54:51  Show Profile  Reply with Quote
Hi There,

I use tools from atlantis interactive.
http://www.atlantis-interactive.co.uk

Excellent set of tools and all for free.
I have been using them for about a year and saves me so much time.

Best Regards,



Steve
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.11 seconds. Powered By: Snitz Forums 2000