Grant User Privileges for Oracle Database for Oracle GoldenGate Classic Architecture
The user privileges that are required for connecting to Oracle database from Oracle GoldenGate depend on the type of user.
The user privileges that are required for connecting to Oracle database from Oracle GoldenGate depend on the type of user.
Privileges should be granted depending on the actions that the user
needs to perform as the GoldenGate Administrator User on the source and target
databases. For example, to grant DML operation privileges to insert, update, and
delete transactions to a user, use the GRANT ANY
INSERT
/UPDATE
/DELETE
privileges and
to further allow users to work with tables and indexes as part of DML operations,
use the GRANT CREATE
/DROP
/ALTER ANY
TABLE
/INDEX
privileges.
If the GoldenGate Administrator user has the DBA role, additional object privileges are not needed. However, there might be security constraints granting the DBA role to the GoldenGate Administration user. The DBA role is not necessarily required for Oracle GoldenGate.
If there are many objects being replicated, you might consider using the ANY privilege for DML and DDL operations. This simplifies the provision of privileges to the GoldenGate Administrator users, as you only need to grant a few privileges depending on the database operations.
The following table describes some of the essential privileges for
GoldenGate Administrator user for Oracle database. For explanation purposes, the
table uses c##ggadmin
as an example of a common user for a
multitenant container database and ggadmin
as the pluggable
database (PDB) user. PDBEAST
and PDBWEST
are used
as examples of PDB names.
Privilege | Extract | Replicat All Modes | Purpose |
---|---|---|---|
|
Yes |
Yes |
Required to create objects In Oracle Database 12cR1 and later, instead of
|
|
Yes |
Yes |
Common user |
|
Yes |
Yes |
Required to connect to the database. |
|
Yes |
Yes |
Required to add the heartbeat table view. If you want to be specific to each object, you can also provide the privileges for each object individually. You may consider creating a specific database role to maintain such privileges. |
|
Yes |
Yes |
Perform administrative changes, such as enabling logging. |
|
Yes |
Yes |
Required for multitenant architecture and
|
|
Yes | Yes |
|
|
NA |
Yes |
Apply replicated DML to target objects. See Details of Support for Objects and Operations in Oracle DML |
|
NA |
Yes |
Grant these privileges to the Replicat user,
instead of granting |
DDL privileges on target objects (if using DDL support) |
NA |
Yes |
Issue replicated DDL on target objects. See Details of Support for Objects and Operations in Oracle DDL. |
|
Yes | Yes | Grants privileges for DDL Replication for tables. |
|
Yes |
Yes |
Grants privileges for creating table in any
schema. To allow creating tables only in a specific schema,
use the |
CREATE ANY
VIEW |
Yes |
Yes | Grants privilges to create view in
any database schema. To allow creating views in a specific
schema, use the CREATE VIEW privilege.
|
|
Yes |
Yes |
Allow all privileges to work properly on dictionary tables. |
Example: Permissions granted for the Oracle database common user
c##ggadmin
in the following
example:CREATE USER c##ggadmin IDENTIFIED BY passw0rd CONTAINER=all DEFAULT
TABLESPACE GG_DATA TEMPORARY TABLESPACE temp;
GRANT RESOURCE to c##ggadmin;
GRANT CREATE SESSION to c##ggadmin;
GRANT CREATE VIEW to c##ggadmin;
GRANT CREATE TABLE to c##ggadmin;
GRANT CONNECT to c##ggadmin CONTAINER=all;
GRANT DV_GOLDENGATE_ADMIN; –-- for data vault user
GRANT DV_GOLDENGATE_REDO_ACCESS; –-- for data vault user
GRANT ALTER SYSTEM to c##ggadmin;
GRANT ALTER USER to c##ggadmin;
ALTER USER c##ggadmin SET CONTAINER_DATA=all CONTAINER=current;
ALTER USER c##ggadmin QUOTA unlimited ON GG_DATA;
GRANT SELECT ANY DICTIONARY to c##ggadmin;
GRANT SELECT ANY TRANSACTION to c##ggadmin;
EXEC DBMS_GOLDENGATE_AUTH.GRANT_ADMIN_PRIVILEGE('c##ggadmin');
In this example, DBA privilege is not provided but the user will be able
to access the DBA_SYS_PRIVS
package, if required.
ggadmin
are provided in
the following example:
Example: Grant privileges using the DBMS_GOLDENGATE_AUTH.GRANT_ADMIN_PRIVILEGE package
This procedure grants the privileges needed by a user to be an Oracle GoldenGate administrator The following example grants explicit privileges for Extract on Oracle multitenant database:
BEGIN
DBMS_GOLDENGATE_AUTH.GRANT_ADMIN_PRIVILEGE
(GRANTEE => 'c##ggadmin', PRIVILEGE_TYPE => 'CAPTURE', GRANT_SELECT_PRIVILEGES => TRUE, DO_GRANTS => TRUE, CONTAINER => 'ALL' );
END;
See DBMS_GOLDENGATE_AUTH
in Oracle Database PL/SQL
Packages and Types Reference for more information.