Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Compare Definition and Data of table in 2DBs

By julianhaynes,

This proc compares the table definition and the data in a table which is in two of your databases. Typically you may have a development database and a production database on the same server and you just want to know that the table is the same on both. (This proc will express the data differences in terms of SQL in which you need to execute to bring them in line)
Typical Call:- utl_CompareTables 'YourTable', 'YourOtherDatabase'

If the SQL expressed to bring the tables in line needs to be reversed (i.e. INSERTs become DELETEs etc.) then simply run from your other database.

No match to Redgate's SQL Compare but good for a quick look!

Total article views: 240 | Views in the last 30 days: 1
 
Related Articles
FORUM

Database

Database

FORUM

Database Sync

Database

FORUM

Database suspect

Database

FORUM
FORUM

Database Synchronization

Database Synchronization

Tags
miscellaneous    
 
Contribute