了解如何为与数据库交互的进程创建数据库用户,分配正确的权限,并保护凭证不被未授权使用。
Topics
对于您正在使用的数据库版本、数据库配置和Oracle GoldenGate特性,Oracle GoldenGate进程需要一个或多个具有正确数据库特权的数据库凭据。
创建一个源数据库用户和一个目标数据库用户,每个用户在源和目标系统上都专用于oracle GoldenGate。对于必须连接到源或目标Oracle数据库的所有Oracle GoldenGate进程,分配的用户可以是相同的用户。
Parent topic: Establishing Oracle GoldenGate Credentials
Extract用户对源数据库执行元数据查询,并在需要时从源表获取数据。在集成捕获的本地挖掘部署中,该用户还创建、修改和连接到日志挖掘服务器,并从日志挖掘服务器接收逻辑更改记录(LCR)。 (See Deciding Which Capture Method to Use for more information about capture modes.)
如果源数据库是多租户容器数据库,则提取用户必须是公共用户,并且必须登录到根容器。有关更多信息,请参见在多租户容器数据库中配置Oracle GoldenGate。
如果Extract将在集成捕获模式下运行,并且您正在使用下游挖掘数据库,那么您需要分配一个额外的用户。该用户将是挖掘用户,并在下游数据库中创建。挖掘用户创建、修改并连接到挖掘数据库上的日志挖掘服务器,并从中接收逻辑更改记录(LCR)。此用户可以与源提取用户相同,也可以不同。请仔细选择挖掘用户的名称。该用户创建数据库日志挖掘服务器后,其他用户不能更改或使用它。有关配置下游挖掘的更多信息,请参见配置下游挖掘数据库。
Parent topic: Assigning Credentials to Oracle GoldenGate
Replicat用户创建Replicat检查点表(如果使用),并根据Replicat模式通过Oracle调用接口或数据库入站服务器应用DML和DDL操作, see Deciding Which Apply Method to Use
Parent topic: Assigning Credentials to Oracle GoldenGate
如果使用Oracle GoldenGate DDL支持,则需要在源数据库中为Manager进程提供一个用户。此用户对支持DDL捕获的Oracle GoldenGate数据库对象执行维护。
在DEFGEN实用程序的源数据库或目标数据库中都需要一个用户。位置取决于在何处生成数据定义文件。此用户执行本地元数据查询以构建一个数据定义文件,该文件将元数据提供给远程Oracle GoldenGate实例。 For more information about the data-definitions file, see Administering Oracle GoldenGate.
如果Extract将以经典的捕获模式运行,则可能需要其他用户或特权来使用以下特性:
RMAN日志保留,参见日志保留选项。
支持TDE,请参见以经典捕获模式配置Oracle TDE数据。
ASM,参见在经典捕获模式下挖掘ASM存储的日志。
Parent topic: Assigning Credentials to Oracle GoldenGate
Oracle GoldenGate所需的用户特权取决于数据库版本和提取或复制进程模式。 For more information about process modes, see Choosing Capture and Apply Modes.
Parent topic: Assigning Credentials to Oracle GoldenGate
3.1.4.1 Oracle 11.2.0.4 or Later Database Privileges
The following privileges apply to Oracle versions 11.2.0.4 or later.
Privilege | ExtractClassic Mode | Extract Integrated Mode | Replicat All Modes | Purpose |
---|---|---|---|---|
|
X |
X |
X |
Connect to the database |
|
X |
X |
X |
For Replicat, required only if Replicat owns target objects. Alternatively, use |
|
X |
X |
X |
Create objects If
|
|
X |
X |
Required for Oracle 12.1.0.1 only to issue the |
|
|
X |
X |
Perform administrative changes, such as enabling logging |
|
|
X |
X |
Required for multitenant architecture and |
|
Privileges granted through |
X |
X |
X |
(Extract) Grants privileges for both classic and integrated Extract, including the logmining server.(Replicat) Grants privileges for both nonintegrated and integrated replicat, including the database inbound server (Oracle 11.2.0.4 or later). |
Any or all of optional privileges of |
X |
X |
X |
See About the dbms_goldengate_auth.grant_admin_privilege Package for more information. |
|
X |
Apply replicated DML to target objects |
||
|
X |
Create a checkpoint table in target database |
||
DDL privileges on target objects (if using DDL support) |
X |
Issue replicated DDL on target objects |
||
|
X |
X |
DDL and sequence support |
|
|
X |
Lock target tables. Only required for initial load using direct bulk load to SQL*Loader. |
||
SELECT ANY DICTIONARY |
X | X | X | Allow all privileges to work properly on dictionary tables. |
|
X |
Use a newer Oracle ASM API. See Mining ASM-stored Logs in Classic Capture Mode. |
Parent topic: Granting the Appropriate User Privileges
3.1.4.2 Oracle 11.2.0.3 or Earlier Database Privileges
The following privileges apply to Oracle versions 11.2.0.3 or earlier.
Privilege | ExtractClassic Mode | ExtractIntegrated Mode | Replicat | Manager | Purpose |
---|---|---|---|---|---|
and
|
X |
X |
X |
Connect to the database |
|
|
X |
X |
Perform administrative changes, such as enabling logging |
||
|
X |
X |
X |
Create objects If
|
|
|
X |
X |
X |
For Replicat, required only if Replicat owns target objects. Alternatively, use |
|
|
X |
X |
X |
Query data dictionary objects in the SYS schema |
|
or
|
X |
X |
Make flashback queries |
||
or
|
X |
X |
X |
Perform queries on any table |
|
|
X |
X |
|||
|
X |
Apply replicated DML to target objects |
|||
|
X |
Create a checkpoint table in target database |
|||
|
X |
X |
Call |
||
DDL privileges on target objects (if using DDL support) |
X |
Issue replicated DDL on target objects |
|||
|
X |
X |
DML privileges on Oracle GoldenGate DDL objects. Role is created by user with |
||
|
X |
Use parameters that maintain Oracle GoldenGate DDL objects |
|||
|
X |
Lock target tables. Only required for initial load using direct bulk load to SQL*Loader. |
|||
|
X |
Use a newer Oracle ASM API. See Mining ASM-stored Logs in Classic Capture Mode. |
|||
Privileges granted through |
X |
Interact with database logmining server |
|||
|
X |
Issue the Required for Oracle version >= 11.1.0.5 and <= 11.2.0.1. |
|||
|
X |
Issue the Required for Oracle version >= 11.1.0.5 and <= 11.2.0.1. |
Parent topic: Granting the Appropriate User Privileges
3.1.4.3 About the dbms_goldengate_auth.grant_admin_privilege Package
提取和复制操作经典模式和集成模式所需的大多数特权都是通过dbms_goldengate_auth授予的。grant_admin_privilege包。
下面授予Oracle 11.2.0.4及更高版本的基本特权。第一个示例是缺省值,它授予捕获和应用。第二个演示如何显式地授予捕获或应用 (in this case, capture).
grant_admin_privilege('ggadm')
grant_admin_privilege('ggadm','capture');
下面授予Oracle 11.2.0.3的基本特权。第一个示例是缺省值,它授予捕获和应用。第二个演示如何显式地授予捕获.
grant_admin_privilege('ggadm',grant_select_privileges=>true)
grant_admin_privilege('ggadm','capture',grant_select_privileges=>true)
Parent topic: Granting the Appropriate User Privileges
3.1.4.4 Optional Grants for dbms_goldengate_auth.grant_admin_privilege
(Required) Enter introductory text here, including the definition and purpose of the concept.
Parent topic: Granting the Appropriate User Privileges
为了保护您数据的安全性,并准确地监视Oracle GoldenGate的处理,不允许其他用户、应用程序或进程以Oracle GoldenGate数据库用户的身份登录或操作。
Oracle GoldenGate为保护分配给Oracle GoldenGate进程的登录凭据提供了不同的选项。推荐的选项是使用凭据存储。您可以创建一个凭据存储,并将其存储在一个共享位置,以便Oracle GoldenGate的所有安装都可以访问它,或者您可以在安装了Oracle GoldenGate的每个系统上创建一个单独的凭据存储。
凭据存储存储分配给每个Oracle GoldenGate用户的用户名和密码。用户ID与一个或多个别名相关联,它是命令和参数文件中提供的别名,而不是实际的用户名或密码。凭据文件可以划分为域,允许为进程使用一组标准别名,同时允许每个系统上的管理员在本地管理凭据。
See Administering Oracle GoldenGate for more information about creating a credential store and adding user credentials.
Parent topic: Establishing Oracle GoldenGate Credentials