SQL SERVER 2008 R2を使用していますが、同じDBが2つあります。
- ABC(スキーマ、テーブルなどの構造のみで、テーブルにデータはありません)
- ABC1(スキーマ、テーブル、およびテーブル内のデータを含む)
スキーマとテーブルの#1と#2を比較するにはどうすればよいですか、そのためのソフトウェアはありますか、それともSSMS自体で実行できますか。
SQL SERVER 2008 R2を使用していますが、同じDBが2つあります。
スキーマとテーブルの#1と#2を比較するにはどうすればよいですか、そのためのソフトウェアはありますか、それともSSMS自体で実行できますか。
以下のソフトウェアを使用して、データベーススキーマを比較できます。
Redgate SQL Compare
他よりもユーザーフレンドリーでした。
You can write a sproc which will do this for you.
1.Lets get all the tables from ABC into a table variable or temp table.
2.Loop through the temp or table variable and get each table at a time.
3.Get all the column names,datatypes etc for this table and similarly get the same details for the same table from ABC1 database.
4.Also create one final result table where you just update the status against each table as match or nomatch
5.Repeat this for all the tables in the table variable.
また、データベースオブジェクト間の違いを検出するSQLServerデータベース比較および同期ツールであるApexSQLDiffを試すこともできます。見つかった違いに関する包括的なレポートを生成し、ライブデータベースとバージョン管理されたデータベース、バックアップ、スナップショット、およびスクリプトフォルダー間の同期プロセスを自動化できます
免責事項:私はApexSQLでサポートエンジニアとして働いています