Goldengate error message Unable to add schematrandata

980 Views Asked by At

Following a tutorial to configure GoldenGate with Kafka, in sqlplus I created my GoldenGate user ggadmin and granted the privileges below:

CREATE USER ggadmin IDENTIFIED BY ggadmin;
GRANT CREATE SESSION, CONNECT, RESOURCE, ALTER SYSTEM TO ggadmin;
EXEC DBMS_GOLDENGATE_AUTH.GRANT_ADMIN_PRIVILEGE(grantee=>'ggadmin', privilege_type=>'CAPTURE', grant_optional_privileges=>'*');
GRANT SELECT ANY DICTIONARY TO ggadmin;
GRANT UNLIMITED TABLESPACE TO ggadmin;

My problem is when I try to connect to Oracle database in ggsci console. I need to dblogin into my pdb database (named ORCL) in order to add schematrandata. But I can only dblogin into CDB$ROOT.

And here I get this error :

ERROR: OCI Error ORA (status = 1031-ORA-01031: insufficient privileges).

I've also tried login with dblogin userid ggadmin@ORCL password ggadmin but I get this error instead:

ERROR: OCI Error ORA (status = 12541-ORA-12541: TNS:no listener).

Do I have a problem with my tnsnames.ora file? I'm a noob so I think maybe the problem is with the dblogin command and not with this file, but I don't really know.

Any idea how to connect to pdb and add schematrandata in ggsci console?

2

There are 2 best solutions below

0
On

you can use "Oracle to Oracle Replication with Oracle Multitenant" tutorial or instead of this user use "system" user for login in OGG for adding schematrandata . system user will solve your problem. for more info check the log file beside in OGG folder.

0
On

To use tnsname when doing dblogin inside ggsci, you will first need create tnsnames.ora file somewhere on your system and put the right hostname, port, service name and etc. there. Then you can refer to the tnsname in your dblogin command. Also you will need define $TNS_ADMIN environmental variable before you start ggsci.

Or a much simpler way to do that, is to use GoldenGate V19 Microservices architecture. It has the WebUI interface for the schematrandata operations. You just do it there by using <PDB_NAME>.<SCHEMA_NAME>