SQL: sp_CompareDB..

1 post / 0 new
benzzon
benzzon's picture
SQL: sp_CompareDB..

Lagrad procedur som kan användas för att jämföra 2 sql databaser
och hitta skillnader i design & data:

Alternativt verktyg: http://www.red-gate.com/products/SQL_Compare/index.htm

2006-03-27_134824_sp_CompareDB.txt

-- Parameters:
-- 1. @db1 - name of first database to compare
-- 2. @db2 - name of second database to compare
-- 3. @TabList - list of tables to compare. if empty - all tables in the databases should be
-- compared
-- 4. @NumbToShow - number of rows with differences to show. Default - 10.
-- 5. @OnlyStructure - flag, if set to 1, allows to avoid data comparing. Only structures should
-- be compared. Default - 0
-- 6. @NoTimestamp - flag, if set to 1, allows to avoid comparing of columns of timestamp
-- data type. Default - 0
-- 7. @VerboseLevel - if set to 1 allows to print querues used for data comparison