构建windows平台到linux平台Oracle 11g goldengate

平台信息

源平台:Windows server 2008 x64

源平台数据库名:ORCL

Oracle database版本:11.2.0.4

源平台IP:192.168.1.97

归档模式:c:\arch\

 

目标平台:Oracle linux 5 X64

目标平台数据库名:PDAC

Oracle database版本:11.2.0.4

目标平台IP:192.168.1.99

 

建立用户

在源数据库操作系统上新增

GoldenGate

的用户,需要和

oracle

数据库用户在一个

组:

在linux数据库操作系统上新增GoldenGate的用户,需要和oracle数据库用户在一个组

[root@localhost u02]# useradd -g oinstall -G dba -s /bin/bash -d /home/ogg ogg

[root@localhost u02]# cp /home/oracle/.bash_profile /home/ogg/
cp: overwrite `/home/ogg/.bash_profile'? y

[root@localhost u02]# chmod 750 /home/oracle 

 

创建OGG目录

在LINUX平台上创建目录

ogg@localhost ogg]$ ./ggsci 


Oracle GoldenGate Command Interpreter for Oracle
Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Apr 23 2012 08:32:14


Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.


GGSCI (localhost.localdomain) 2> create subdirs   


Creating subdirectories under current directory /ogg


Parameter files                /ogg/dirprm: already exists
Report files                   /ogg/dirrpt: created
Checkpoint files               /ogg/dirchk: created
Process status files           /ogg/dirpcs: created
SQL script files               /ogg/dirsql: created
Database definitions files     /ogg/dirdef: created
Extract data files             /ogg/dirdat: created
Temporary files                /ogg/dirtmp: created
Stdout files                   /ogg/dirout: created




GGSCI (localhost.localdomain) 3> exit

 

在Windows 平台创建目录

 

 

 

在源数据库上创建

GoldenGate

的账号,并赋权限

一、在源数据库上创建GoldenGate的账号,并赋权限

 

SQL> create tablespace ts_ogg datafile 'C:\APP\ADMINISTRATOR\ORADATA\ORCL\ogg01.dbf' size 50M autoextend on next 50M maxsize 2000M;

表空间已创建。

SQL> create user gate01 identified by gate01 default tablespace ts_ogg temporary  tablespace temp quota unlimited on ts_ogg;

用户已创建。

SQL> grant connect,resource,dba to gate01;

授权成功。

SQL> @marker_setup.sql;

Marker setup script

You will be prompted for the name of a schema for the Oracle GoldenGate database
 objects.
NOTE: The schema must be created prior to running this script.
NOTE: Stop all DDL replication before starting this installation.

Enter Oracle GoldenGate schema name:gate01

Marker setup table script complete, running verification script...
Please enter the name of a schema for the GoldenGate database objects:
Setting schema name to GATE01

MARKER TABLE
-------------------------------
OK

MARKER SEQUENCE
-------------------------------
OK
Script complete.

 

 

SQL> @ddl_setup.sql;

Oracle GoldenGate DDL Replication setup script
Verifying that current user has privileges to install DDL Replication...
You will be prompted for the name of a schema for the Oracle GoldenGate database objects.
NOTE: For an Oracle 10g source, the system recycle bin must be disabled. For Oracle 11g and later, it can be enabled.
NOTE: The schema must be created prior to running this script.
NOTE: Stop all DDL replication before starting this installation.
Enter Oracle GoldenGate schema name:gate01
Working, please wait ...
Spooling to file ddl_setup_spool.txt
Checking for sessions that are holding locks on Oracle Golden Gate metadata tables ...

Check complete.

Using GATE01 as a Oracle GoldenGate schema name.
Working, please wait ...
DDL replication setup script complete, running verification script...
Please enter the name of a schema for the GoldenGate database objects:
Setting schema name to GATE01
CLEAR_TRACE STATUS:

 

Line/pos             Error
-------------------- -----------------------------------------------------------------
No errors            No errors


CREATE_TRACE STATUS:

Line/pos             Error
-------------------- -----------------------------------------------------------------
No errors            No errors

TRACE_PUT_LINE STATUS:


Line/pos             Error
-------------------- -----------------------------------------------------------------
No errors            No errors


INITIAL_SETUP STATUS:

Line/pos             Error
-------------------- -----------------------------------------------------------------
No errors            No errors


DDLVERSIONSPECIFIC PACKAGE STATUS:

Line/pos             Error
-------------------- -----------------------------------------------------------------
No errors            No errors

DDLREPLICATION PACKAGE STATUS:


Line/pos             Error
-------------------- -----------------------------------------------------------------
No errors            No errors

DDLREPLICATION PACKAGE BODY STATUS:

Line/pos             Error
-------------------- -----------------------------------------------------------------
1453/9               PL/SQL: SQL Statement ignored
1455/26              PL/SQL: ORA-00942: 表或视图不存在
1464/9               PL/SQL: SQL Statement ignored
1466/26              PL/SQL: ORA-00942: 表或视图不存在
1478/9               PL/SQL: SQL Statement ignored
1480/26              PL/SQL: ORA-00942: 表或视图不存在
1485/9               PL/SQL: SQL Statement ignored
1487/26              PL/SQL: ORA-00942: 表或视图不存在
1492/9               PL/SQL: SQL Statement ignored
1494/26              PL/SQL: ORA-00942: 表或视图不存在
1499/9               PL/SQL: SQL Statement ignored


Line/pos             Error
-------------------- -----------------------------------------------------------------
1501/26              PL/SQL: ORA-00942: 表或视图不存在
1581/4               PL/SQL: SQL Statement ignored
1582/21              PL/SQL: ORA-00942: 表或视图不存在
1584/4               PL/SQL: SQL Statement ignored
1585/21              PL/SQL: ORA-00942: 表或视图不存在
1600/28              PL/SQL: ORA-00942: 表或视图不存在
1600/4               PL/SQL: SQL Statement ignored
1602/28              PL/SQL: ORA-00942: 表或视图不存在
1602/4               PL/SQL: SQL Statement ignored


DDL IGNORE TABLE
-----------------------------------
FAILED: Table does not exist

DDL IGNORE LOG TABLE
-----------------------------------
FAILED: Table does not exist

DDLAUX  PACKAGE STATUS:

Line/pos             Error
-------------------- -----------------------------------------------------------------
No errors            No errors

DDLAUX PACKAGE BODY STATUS:

Line/pos             Error
-------------------- -----------------------------------------------------------------
0/0                  PL/SQL: Compilation unit analysis terminated
1/24                 PLS-00304: 如果没有说明, 则无法编译 'DDLAUX' 主体
1/24                 PLS-00905: 对象 GATE01.DDLAUX 无效
 

SYS.DDLCTXINFO  PACKAGE STATUS:

Line/pos             Error
-------------------- -----------------------------------------------------------------
No errors            No errors

SYS.DDLCTXINFO  PACKAGE BODY STATUS:

Line/pos             Error
-------------------- -----------------------------------------------------------------
No errors            No errors

DDL HISTORY TABLE
-----------------------------------
FAILED: Table does not exist


DDL HISTORY TABLE(1)
-----------------------------------
FAILED: Table does not exist

 

DDL DUMP TABLES
-----------------------------------
FAILED: Table does not exist


DDL DUMP COLUMNS
-----------------------------------
FAILED: Table does not exist


DDL DUMP LOG GROUPS
-----------------------------------
FAILED: Table does not exist


DDL DUMP PARTITIONS
-----------------------------------
FAILED: Table does not exist


DDL DUMP PRIMARY KEYS
-----------------------------------
FAILED: Table does not exist


DDL SEQUENCE
-----------------------------------
FAILED: Sequence does not exist


GGS_TEMP_COLS
-----------------------------------
FAILED: Table does not exist


GGS_TEMP_UK
-----------------------------------
FAILED: Table does not exist


DDL TRIGGER CODE STATUS:


Line/pos             Error
-------------------- -----------------------------------------------------------
------
126/9                PL/SQL: SQL Statement ignored
128/26               PL/SQL: ORA-00942: 表或视图不存在
133/24               PL/SQL: ORA-02289: 序列不存在
133/5                PL/SQL: SQL Statement ignored
657/17               PLS-00905: 对象 GATE01.DDLAUX 无效
657/5                PL/SQL: Statement ignored
919/28               PL/SQL: ORA-00942: 表或视图不存在
919/4                PL/SQL: SQL Statement ignored

DDL TRIGGER INSTALL STATUS
-----------------------------------
OK


DDL TRIGGER RUNNING STATUS
----------------------------------------------------------------------
ENABLED
FROM "GATE01" ."GGS_SETUP"
               *
第 2 行出现错误:
ORA-00942: 表或视图不存在




FROM "GATE01" ."GGS_SETUP"
               *
第 2 行出现错误:
ORA-00942: 表或视图不存在




FROM "GATE01" ."GGS_SETUP"
               *
第 2 行出现错误:
ORA-00942: 表或视图不存在






LOCATION OF DDL TRACE FILE
------------------------------------------------------------------------------------------------------------------------
C:\app\Administrator\diag\rdbms\orcl\orcl\trace/ggs_ddl_trace.log


Analyzing installation status...

 

STATUS OF DDL REPLICATION
------------------------------------------------------------------------------------------------------------------------
ERRORS detected in installation of DDL Replication software components (6)


Script complete.
SQL>

 

SQL> @role_setup.sql;


GGS Role setup script


This script will drop and recreate the role GGS_GGSUSER_ROLE
To use a different role name, quit this script and then edit the params.sql script to change the gg_role parameter to the preferred name. (Do not run the script.)


You will be prompted for the name of a schema for the GoldenGate database objects.
NOTE: The schema must be created prior to running this script.
NOTE: Stop all DDL replication before starting this installation.


Enter GoldenGate schema name:gate01
已写入 file role_setup_set.txt


PL/SQL 过程已成功完成。




Role setup script complete


Grant this role to each user assigned to the Extract, GGSCI, and Manager process
es, by using the following SQL command:


GRANT GGS_GGSUSER_ROLE TO <loggedUser>


where <loggedUser> is the user assigned to the GoldenGate processes.

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值