How can we help you today? How can we help you today?

Save off differences between databases using command line getting NothingToCompareException

Hello, 
I'm trying to write a powershell script that compares the data in a list  of tables between our master database and our production databases. I keep getting an error saying "Nothing to compare. Either there are no tables/views that can be compared, or everything has been filtered out". I know that some of the tables are absolutely not the exact same. I'm not really sure what I'm missing. I've read through the documents and I thought I had the table list formatted correctly but I'm still running into issues getting any output. 
$TablesToCheckDefaultData = "\[HierType\]^|\[Hier\]" 

sqldatacompare /server1:PC-ANDREWVAHEY /database1:Tworks_master /server2:DRHSQL2014B /database2:AllStarLabor 
  /export:C:\Users\andrew.vahey\Documents\CompareResults\FastTrackDataCompare.csv
  /Include:table:$TablesToCheckDefaultData

AndrewVahey
0

Comments

1 comment

  • Eddie D
    Hi, thank you for your forum post.

    Do you experience an Exit Code 63 along with the "Nothing to compare" message?

    If yes, can you please add the /Include:Identical switch to your syntax which will suppress the 63 exist code.

    Otherwise, can you add the /LogLevel:Verbose switch to your syntax?  This switch will generate a log file of comparison which may aid fault finding.  You will find the log file in this path:
    C:\Users\<user name>\AppData\Local\Red Gate\Logs\SQL Data Compare

    Many Thanks
    Eddie
    Eddie D
    0

Add comment

Please sign in to leave a comment.