XAG-233 when adding GoldenGate resource using agctl

Adding a goldengate resource using agctl

$ agctl add goldengate GG_Source \
--gg_home /u01/app/oracle/product/goldengate \
--instance_type source \
--nodes atxdb1,atxdb2,atxdb3 \
--filesystems dbfs_mount \
--databases pmddb \
--oracle_home /u01/app/oracle/product/12.2.0.1/dbhome_1
XAG-233: Database 'pmddb' does not exist or is not registered.

Check the database service

srvctl config database -d pmddb
Database unique name: pmddb
Database name: pmddb
Oracle home: /u01/app/oracle/product/12.2.0.1/dbhome_1
Oracle user: oracle
Spfile: +DATA/pmddb/spfilepmddb.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: pmddb
Database instances: atxdb1,atxdb2,atxdb3
Disk Groups: DATA
Services: BatchApp
Database is administrator managed

This happens because agctl only accepts complete CRS resource names for –databases and –db_services parameters, so get the right name from crscrtl.

crsctl stat res
...
NAME=ora.pmddb.db
TYPE=ora.database.type
TARGET=ONLINE , ONLINE
STATE=OFFLINE on atxdb1, ONLINE on atxdb2, ONLINE on atxdb3

And use this name for the adding the goldengate resource.