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

Activity overview

Latest activity by npensa

Help with regex to filter out tables
We're trying to filter out some tables from SQL Data compare using the command line in PowerShell and some regular expressions, and we keep getting syntax errors for them.We tried the one below, wh...
2 followers 2 comments 0 votes
Alex B said: Hi @npensa I'm not sure which thing you are referring to regarding "include table names that contain a certain phrase" but with the /Include switch on the SQL Data Compare command line the third part in the /Include option is a regular expression, so it should be able to do a "starts with" option using the carrot ^ operator. I believe the switch would look like this to include tables that start with "a": /Include:table:^a.* This, however, won't affect the initial load of the comparison as at that point all of the tables are still being compared I'm afraid.  Meaning, it will not be filtered at that point and the tables will all, always be compared because there is no "prefilter" (or ignore options as they are called in the Oracle tools) in the SQL Server tools.  The option above for including (or excluding with /Exclude) are related to what will be deployed. I hope that helps! Kind regards, Alex Hi Alex. I have some very large tables that are static, and the values in them don't change.  We're looking to try and exclude them from even being compared at all so it doesn't drive up the time to migrate changes between these two databases.  I saw this article for the WHERE clause that can be used in the UI to filter rows for comparison (https://documentation.red-gate.com/sdc/setting-up-the-comparison/filtering-the-comparison-with-a-where-clause) and this one where you can create a filter for a comparison (https://productsupport.red-gate.com/hc/en-us/articles/360005881437-How-to-Create-a-Filter-for-Command-Line-Comparisons). 1. Do either of these prevent tables that I don't want compared being compared? 2. Is there any way at all to trim down the comparison and update time so it doesn't take as long since that is the main reason that I'm attempting to write this script? Basically, we don't want to spend 30 minutes comparing a massive table that will never have data changes between the two databases if we don't have to. / comments
Alex B said: Hi @npensa I'm not sure which thing you are referring to regarding "include table names that contain a certain phrase" but with the /Include switch on the SQL Data Compare comman...
0 votes
SQL Data Compare allowed us to trim down the backup time of one of our databases by only copying the different rows between them instead of migrating the whole database. / comments
SQL Data Compare allowed us to trim down the backup time of one of our databases by only copying the different rows between them instead of migrating the whole database.
0 votes
How to limit a SQL Data Comparison based on the first character of the table name?
I'm creating a script to migrate the changes from one database to another one, but the database is very large.  I'd like to limit the script based on the first character of the table name (Tables b...
3 followers 4 comments 0 votes