?
Solved

How to prepare schema sync scripts?

Posted on 2013-06-03
2
Medium Priority
?
377 Views
Last Modified: 2016-02-11
I have 2 db schema (source and destination). I would like to convert the source schema to destination schema by providing sync script. What are the steps I need to perform such as Remove the constraints, perform datatype change, Delete all indexes, Delete FKs, Delete PKs and so on and in which order? I know some tools are there in market. But my customers don't accept it. How to  perform in T-SQL? Please assist.

It would be great if the sql scripts are run in order using SSIS package. Could you please suggest how to achieve this?

I know the question is big and hard one. Please bear with me and provide your solution.
0
Comment
Question by:Easwaran Paramasivam
[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 Comments
 
LVL 40

Accepted Solution

by:
lcohan earned 1500 total points
ID: 39219519
So...you need to build an "Upgrade" script for your customers right?
I warmly suggest start using SSIS because it ofers workflow/decision control and you can stop/resume for instance a broken upgrade easily. I would start by creating the SQL scripts I need to run then put them in SQL Task Steps inside the SSIS package where you can control as mentioned the flow and have a config file as well from where you could read in certain values at the begining of the Upgrade like: Customer ServerName, DBName, DBVersion, Loginid, password, etc...

http://www.codeproject.com/Articles/173918/How-to-Create-your-First-SQL-Server-Integration-Se

http://msdn.microsoft.com/en-us/library/ms141711(v=sql.105).aspx


And to be speciffic for "How to prepare schema sync scripts?" you must roll up your sleeves and start writting T-SQL ALTER ... commands.
0
 
LVL 16

Author Closing Comment

by:Easwaran Paramasivam
ID: 39278300
Thanks.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
I have a large data set and a SSIS package. How can I load this file in multi threading?
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Suggested Courses

752 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