Monday, July 22, 2013

Compare collation from SQL Server 2000(source) table to 2008(target) view and create script to cast data type in View

We are always upgrading from lower version to highest version and also changing approaches for new implementation. There may be chances that data type mismatched from our old version(2000) to new version(2008).
Here, we had requirement to compare collation from SQL Server 2000(source) table to 2008(target) view and create script to cast data type in View. I have tried to create script which will use of OPENROWSET command to read system tables from SOURCE database and compare it with TARGET database. This script will return difference from SOURCE to TARGET tables which are exists in TARGET database. We are doing that because it’s possible that we don’t want some table from older version. This script also provides cast prefix and suffix for TARGET database to sync views with SOURCE database.
Below is script to download.
Compare Collation from Source To Target.sql

No comments:

Post a Comment