OGG-00665权限设置问题


              数据库版本      OGG版本
源端:     11.2.0.1.0            11.2.1.0.1
目标:         11.2.0.3.0          11.2.1.0.1

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING                                           
EXTRACT     RUNNING     E1          00:00:00      00:00:07    
EXTRACT     ABENDED     P1          00:00:00      00:14:48   


2016-08-17 13:36:21  INFO    OGG-03500  WARNING: NLS_LANG environment variable does not match database character set, or not set. Using database character set value of AL32UTF8.
rmthost 10.3.4.211, mgrport 7809
rmttrail /opt/ogg/dirdat/bi
table sender.*;

显示NLS_LANG environment variable 与database character set  建议用Using database character set value of AL32UTF8.

SETENV (NLS_LANG="AMERICAN_AMERICA.AL32UTF8")

环境变量.bash_profile
#export NLS_LANG="SIMPLIFIED CHINESE_CHINA".ZHS16GBK
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
#export  NLS_LANG=american_america.AL32UTF8

数据库的database set :
sys@R2> select * from nls_database_parameters where parameter in ('NLS_LANGUAGE','NLS_TERRITORY','NLS_CHARACTERSET');

PARAMETER                             VALUE
------------------------------------------------------------ ------------------------------
NLS_LANGUAGE                             AMERICAN
NLS_TERRITORY                             AMERICA
NLS_CHARACTERSET                         AL32UTF8


目标端:
.bash_profile
export ORACLE_TERM=vt100
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export PATH=$PATH:$ORACLE_HOME/bin:$HOME/bin

数据库:
SQL> set linesize 200
SQL> /

PARAMETER                             VALUE
------------------------------------------------------------ --------------------
NLS_LANGUAGE                             AMERICAN
NLS_TERRITORY                             AMERICA
NLS_CHARACTERSET                         AL32UTF8

也是不一致
2016-08-17 13:45:38  INFO    OGG-03035  Oracle GoldenGate Delivery for Oracle, rep1.prm:  Operating system character set identified as UTF-8. Locale: en_US, LC_ALL:.
2016-08-17 13:45:38  ERROR   OGG-00665  Oracle GoldenGate Delivery for Oracle, rep1.prm:  OCI Error describe for query (status = 942-ORA-00942: table or view does not exist), SQL<SELECT db.name, i.instance_name, i.version FROM v$database db, v$instance i>.
2016-08-17 13:45:38  ERROR   OGG-01668  Oracle GoldenGate Delivery for Oracle, rep1.prm:  PROCESS ABENDING.

提示table or view does not exist 其实是权限问题

SQL> grant select on sys.props$ to ogg;
SQL> grant select any dictionary to ogg;
016-08-17 14:19:07  INFO    OGG-00995  Oracle GoldenGate Delivery for Oracle, rep1.prm:  REPLICAT REP1 starting.
2016-08-17 14:19:07  INFO    OGG-03035  Oracle GoldenGate Delivery for Oracle, rep1.prm:  Operating system character set identified as UTF-8. Locale: en_US, LC_ALL:.
2016-08-17 14:19:08  ERROR   OGG-00014  Oracle GoldenGate Delivery for Oracle, rep1.prm:  Unrecognized parameter: #DDL. Parameter could be misspelled or unsupported.
2016-08-17 14:19:08  ERROR   OGG-01668  Oracle GoldenGate Delivery for Oracle, rep1.prm:  PROCESS ABENDING.

把repl.pra中的 #DDL. Parameter could be misspelled or unsupported. 清掉
GGSCI (veridata) 5> start rep1

Sending START request to MANAGER ...
REPLICAT REP1 starting


GGSCI (veridata) 6> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING                                           
REPLICAT    RUNNING     REP1        00:00:00      00:00:00    


2016-08-17 14:22:15  INFO    OGG-03035  Oracle GoldenGate Delivery for Oracle, rep1.prm:  Operating system character set identified as UTF-8. Locale: en_US, LC_ALL:.
2016-08-17 14:22:15  INFO    OGG-01815  Oracle GoldenGate Delivery for Oracle, rep1.prm:  Virtual Memory Facilities for: COM
    anon alloc: mmap(MAP_ANON)  anon free: munmap
    file alloc: mmap(MAP_SHARED)  file free: munmap
    target directories:
    /opt/ogg/dirtmp.
2016-08-17 14:22:16  INFO    OGG-00996  Oracle GoldenGate Delivery for Oracle, rep1.prm:  REPLICAT REP1 started.

这样就正常启动了ogg

测试:
2016-08-17 14:22:16  INFO    OGG-00996  Oracle GoldenGate Delivery for Oracle, rep1.prm:  REPLICAT REP1 started.
2016-08-17 14:33:35  WARNING OGG-00869  Oracle GoldenGate Delivery for Oracle, rep1.prm:  Failed to retrieve column list handle for table SENDER.TEST.
2016-08-17 14:33:35  ERROR   OGG-00199  Oracle GoldenGate Delivery for Oracle, rep1.prm:  Table sender.TEST does not exist in target database.
2016-08-17 14:33:35  ERROR   OGG-01668  Oracle GoldenGate Delivery for Oracle, rep1.prm:  PROCESS ABENDING.
原因:
ogg没有权限对sender操作
 --在源端创建ggs用户
  grant connect ,resource,unlimited tablespace to ogg;
  grant execute on utl_file to ogg;
  grant select any dictionary,select any table to ogg;
  grant alter any table to ogg;
  grant flashback any table to ogg;
  grant execute on dbms_flashback to ogg;  
  --在目标端创建ggs用户
  grant insert any table to ogg;
  grant delete any table to ogg;
  grant update any table to ogg;



小结:
1、 在extract 与 replicat 参数文件中最好是添加SETENV (NLS_LANG="AMERICAN_AMERICA.AL32UTF8") 确保与数据库的字符集一致
2、 ogg同步时,数据库的版本不一致也可以实现数据库同步
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值