Solved

How to prepare schema sync scripts?

Posted on 2013-06-03
2
365 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 500 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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Via a live example, show how to shrink a transaction log file down to a reasonable size.

733 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