How To Compare Two SQL Server Databases Without Any Software

How To Compare Two SQL Server Databases Without Any Software

I’m glad to inform that today im going to release my next phase of TsqlTools is SQLCOMPARE. I was in a point to compare two databases which are on two different servers, I have checked many websites and blogs, but unfortunately, I didn’t find any useful T-SQL query for that. But there is so many good software available to compare the databases. Red-Gate is one of my favorite tool for comparison.

So I have prepared 3 Tsql scripts to compare all databases objects between two SQL servers.

  1. Objects Compare
  2. Index Compare
  3. RowCount Compare

How to Run this query?

You can use a centralized Server and create LinkedServers for Source and Target DB servers,

or

Create a LinkedServer for Target server on SourceDB server, then run the query on Source DB server.

Download the Script Here:



Joshua Bennett

Database Engineer

3 个月

More than 7yrs later, and this article (scripts included) is very helpful. Used sp_serveroption stored procedure to connect to my remote server, and everything worked well.

回复

要查看或添加评论,请登录

Bhuvanesh R.的更多文章

社区洞察

其他会员也浏览了