Showing posts with label Database Synchronization Scripts. Show all posts
Showing posts with label Database Synchronization Scripts. Show all posts

Friday, November 29, 2013

SQL Server : Database Schema Sychronization Script for Non Clustered Indexes

Non clustered indexes are the usual schema objects which a DBA usually like to  synchronize on same structured client databases. Following script should be executed on source database, to find and create missing indexes on target database.

(Note: These synchronization scripts are just modified by me, BUT are property of SQL Server community. Thanks to Amna Asif and other basic writers of these scripts)

SQL Server : Database Schema Sychronization Script for Column Default Values

During database schema synchronization, only missing columns creation is not enough, we also need to find what default values constraints are missing at target database. Following script I use for this purpose.

(Note: These synchronization scripts are just modified by me, BUT are property of SQL Server community. Thanks to Amna Asif and other basic writers of these scripts)

SQL Server : Database Schema Sychronization Script for Foreign Keys

Following schema synchronization script checks and creates if some foreign key is missing at target database as compare to source database. 

(Note: These synchronization scripts are just modified by me, BUT are property of SQL Server community. Thanks to Amna Asif and other basic writers of these scripts)

SQL Server : Database Schema Sychronization Script for Primary Keys

Following schema synchronizations script compare two given (source/target) databases to create missing primary keys at target database.

(Note: These synchronization scripts are just modified by me, BUT are property of SQL Server community. Thanks to Amna Asif and other basic writers of these scripts)




SQL Server : Database Schema Sychronization Script for Columns

As per my commitment with my blog readers, here is one more script I use for missing columns creation during database schema synchronization process.

(Note: These synchronization scripts are just modified by me, BUT are property of SQL Server community. Thanks to Amna Asif and other basic writers of these scripts)


Tuesday, November 5, 2013

SQL Server : Script to Find and Create Missing Tables for Database Sychronization

Different methods and tools are available to synchronize two SQL Server databases. But one simple way to synchronize is using TSQL Script to find difference and create missing structures. Following script is for the same purpose. Script can be used to find and create missing tables on target database by comparing tables structure with source database.