Solved

How to prepare schema sync scripts?

Posted on 2013-06-03
2
347 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
2 Comments
 
LVL 39

Accepted Solution

by:
lcohan earned 500 total points
Comment Utility
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
Comment Utility
Thanks.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now