June 3, 2015 at 3:05 pm
Just doing some research and trying to determine are there any features within SQL Server that will allow you to compare schemas, objects and data. I think SSDT has a schema compare feature but again I want to know is anything within SQL Server. I know there are a lot of 3rd party products.
Thanks.
June 3, 2015 at 3:31 pm
as far as I know, nothing built in. you could accomplish this with some queries:
for data compare, this will give you all rows that dont match
select * from db1.dbo.table
except
select * from db2.dbo.table
select * from db2.dbo.table
except
select * from db1.dbo.table
you could do the same thing for schema compare. The example below would only check for column differences but you could expand it to check for any metadata you are concerned with.
select * from db1.sys.columns
where object_id = object_id('table')
except
select * from db2.sys.columns
where object_id = object_id('table')
June 4, 2015 at 11:52 am
There's nothing directly within SSMS that does that kind of work.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply