In this post, we are going to cover creating GoldenGate Global User in Multitenant Architecture. Oracle Database 12c introduced the Multitenant Architecture for Oracle databases. This allows for multiple pluggable databases to exist within the same container database.
If you are new to Oracle GoldenGate then check our previous posts about Oracle GoldenGate 12c Overview & Components. And GoldenGate 12c (12.3.0.1) New Features/Changes
If you want to install Goldengate 12c then go through our post here Oracle GoldenGate 12c Download & Installation and for troubleshooting go through Oracle GoldenGate 12c: Troubleshooting using LogDump Utility
1. Create Global User & Grant DBA Role
We need to create the Global user in Multitenant architecture for Goldengate replication. In order to segregate the tablespace for golden gate user, it is advisable to create a separate tablespace. The tablespace will be required in both containers as well as in all pluggable databases.
Note: gg_tblsp needs to be created in pluggable as well as container databases.
a) In container database:
SQL> create tablespace ggs_tblsp datafile ‘/u01/app/oracle/oradata/OGGDB1/datafile/gg_cdb.dbf’ size 2G;
b) In Pluggable database:
SQL> alter session set container=PDB1;
SQL> create tablespace ggs_tblsp datafile ‘/u01/app/oracle/oradata/OGGDB1/datafile/gg_pdb1.dbf’ size 2G;
Note: Same needs to be done individually in all PDBs if there are multiple Pluggable.
2. Create a user in container database with prefix c##.
Note: In 12c this user is common to all the pluggable present. (In 12c all common users and roles are created with prefix c##)
SQL> create user c##ggadmin identified by Welcome1 default tablespace ggs_tblsp;
SQL> grant dba to c##ggadmin container=all;
Note if a tablespace is not created in any of the pluggable or containers, you will hit the error tablespace doesn’t exist. So below is the workaround:
- Create the tablespace in all existing containers and Pluggable
- Or create the user without defining any tablespace. However, this is not recommended in the Prod environment.
This post is from our Oracle GoldenGate 12c Administration Training, in which we cover Architecture, Installation, Configuring & Preparing the Environment, DML Replication – Online Change Synchronization, Initial Load, Zero Downtime Migration & Upgrading using GoldenGate, Oracle GoldenGate Security, Performance of Oracle GoldenGate and Troubleshooting and much more.
Next Task For You
Want to move ahead in your career and want to get a higher Earning Job?
Get 7+ Courses for DBAs & Apps DBA in a bundle program and learn from the Industry’s best Experts.
Mani says
Hi seema,
the post is informative. could you tell me how to configure the wallet and credentialstore in a single CDB which hosts 2 PDBs?
Thank you.
Surbhi Sharma says
Hi Mani,
Below is the answer,
The steps to create the credential store remains the same. The credentialstore is specific to a Goldengate instance. Once its created u may add any number of user credentials.
For adding different PDB users you will need to add each user with TNS entry. Below are the sample steps:
GGSCI> add credentialstore
GGSCI>alter credentialstore add user test1@pdb1,password xxxxxx,alias test_pdb1
GGSCI> alter credentialstore add user test2@pdb2,password xxxxxx,alias test_pdb2
Then test the credentials by doing useridalias. Once done then edit the parameter files.
Hope that helps.
Regards,
Surbhi
saeed says
you’ve made a mistake in grant permission.
you’ll have to grant dba to user not to password of user.
Surbhi Sharma says
Hi Saeed,
Thanks for highlighting, we have updated our blog
Regards,
Surbhi