gpcopy error when using include-table / exclude-table options: "Error: Can not find matched database for "<db_name>" from source cluster"
search cancel

gpcopy error when using include-table / exclude-table options: "Error: Can not find matched database for "<db_name>" from source cluster"

book

Article ID: 296710

calendar_today

Updated On:

Products

VMware Tanzu Greenplum

Issue/Introduction

For example, if we have source and dest clusters with upper case in their names like "SOURCE_db" and "DEST_db". Below command will throw an error Error: Can not find matched database for "source_db" from source cluster":
gpcopy --analyze --verbose --drop --source-port 6432 --source-host localhost --include-table SOURCE_db.public.sourcetable --dest-port 6432 --dest-host localhost --dest-table DEST_db.public.sourcetable;


Environment

Product Version: 6.16

Resolution

We get that error because gpcopy does not handle case sensitivity issue well with include-table/exclude-table options in older versions. 

From gpcopy 2.3.2, it respects the case sensitivity of database, schema, and table names that you specify with --include-table[-xxx], --exclude-table[-xxx], and --dest-table options when you enclose the individual name in double quotes.

For example, if we change the above command like below, it will be working:
gpcopy --analyze --verbose --drop --source-port 6432 --source-host localhost --include-table '"SOURCE_db".public.sourcetable' --dest-port 6432 --dest-host localhost --dest-table DEST_db.public.sourcetable;
We can also refer to the link as below for more details about the fix:
https://docs.vmware.com/en/VMware-Tanzu-Greenplum-Data-Copy-Utility/2.3/tanzu-greenplum-copy/GUID-release-notes.html