0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Miningand Real Application Testing options
--脚本1:
SQL> @marker_setup.sql;
Marker setup script
You will be prompted for the name of aschema for the GoldenGate database objects.
NOTE: The schema must be created prior torunning this script.
NOTE: Stop all DDL replication beforestarting this installation.
--输入我们之前创建的用户名:
Enter GoldenGate schema name:ggtest
Marker setup table script complete, runningverification script...
Please enter the name of a schema for theGoldenGate database objects:
Setting schema name to ggtest
MARKER TABLE
-------------------------------
OK
MARKER SEQUENCE
-------------------------------
OK
Script complete.
--脚本2:
SQL> @ddl_setup.sql;
GoldenGate DDL Replication setup script
Verifying that current user has privilegesto install DDL Replication...
You will be prompted for the name of aschema for the GoldenGate database objects.
NOTE: For an Oracle 10g source, the systemrecycle bin must be disabled. For Oracle 11g and later, it can be enabled.
--注意这里提示我们在10g里,必须关闭recycle bin,在11g以后的版本,可以不用关闭。
NOTE: The schema must be created prior torunning this script.
NOTE: Stop all DDL replication beforestarting this installation.
--提示输入GG的用户:
Enter GoldenGate schema name:ggtest
You will be prompted for the mode ofinstallation.
To install or reinstall DDL replication,enter INITIALSETUP
To upgrade DDL replication, enter NORMAL
--这里让我们选择安装模式: install 和 reinstall 选择INITIALSETUP
Enter mode of installation:INITIALSETUP
Working, please wait ...
Spooling to file ddl_setup_spool.txt
Checking for sessions that are holdinglocks on Oracle Golden Gate metadata tables ...
Check complete.
Using ggtest as a GoldenGate schema name,INITIALSETUP as a mode of installation.
Working, please wait ...
DDL replication setup script complete,running verification script...
Please enter the name of a schema for theGoldenGate database objects:
Setting schema name to ggtest
DDLORA_GETTABLESPACESIZE STATUS:
……
STATUS OF DDL REPLICATION
-------------------------------------------------------------------------------------------------------
SUCCESSFUL installation of DDL Replicationsoftware components
Script complete.
--脚本3:
SQL> @role_setup.sql;
GGS Role setup script
This script will drop and recreate the roleGGS_GGSUSER_ROLE
To use a different role name, quit thisscript and then edit the params.sql script to change the gg_role parameter tothe preferred name. (Do not run the script.)
You will be prompted for the name of aschema for the GoldenGate database objects.
NOTE: The schema must be created prior torunning this script.
NOTE: Stop all DDL replication beforestarting this installation.
--同样输入GG用户名:
Enter GoldenGate schema name:ggtest
Wrote file role_setup_set.txt
PL/SQL procedure successfully completed.
Role setup script complete
Grant this role to each user assigned tothe Extract, GGSCI, and Manager processes, by using the following SQL command:
--这里提示我们赋权给相关的用户:
GRANT GGS_GGSUSER_ROLE TO
where is the userassigned to the GoldenGate processes.
--脚本4:赋权
SQL> grant GGS_GGSUSER_ROLE to ggtest;
Grant succeeded.
--脚本5:
SQL> @ddl_enable.sql;
Trigger altered.
注意这里脚本创建的table都是使用默认的名称,当然也可以修改这些table的默认名。
三、测试
注意:
(1) 目标库的用户名和对象名称可以与源端不同,关键在于配置文件中要能够正确匹配。
(2) 配置源和目标两端tnsnames,保持互联互通。(记得启动lsnrctl)
gg1:
SQL> create user ssgg identified by oracle default tablespa