gg初体验之安装

在官网上下载软件,oracle将软件归类到中间件那里。

1.解压缩

[oracle@bre1 gg]$ unzip ogg112101_fbo_ggs_Linux_x64_ora11g_64bit.zip 
Archive:  ogg112101_fbo_ggs_Linux_x64_ora11g_64bit.zip
  inflating: fbo_ggs_Linux_x64_ora11g_64bit.tar  
  inflating: OGG_WinUnix_Rel_Notes_11.2.1.0.1.pdf  
  inflating: Oracle GoldenGate 11.2.1.0.1 README.txt  
  inflating: Oracle GoldenGate 11.2.1.0.1 README.doc  
  
[oracle@bre1 gg]$ tar xvf fbo_ggs_Linux_x64_ora11g_64bit.tar 
UserExitExamples/
UserExitExamples/ExitDemo_more_recs/
UserExitExamples/ExitDemo_more_recs/Makefile_more_recs.HPUX
UserExitExamples/ExitDemo_more_recs/Makefile_more_recs.SOLARIS
UserExitExamples/ExitDemo_more_recs/Makefile_more_recs.LINUX
UserExitExamples/ExitDemo_more_recs/Makefile_more_recs.AIX
UserExitExamples/ExitDemo_more_recs/exitdemo_more_recs.vcproj
UserExitExamples/ExitDemo_more_recs/exitdemo_more_recs.c
UserExitExamples/ExitDemo_more_recs/readme.txt
UserExitExamples/ExitDemo_passthru/
UserExitExamples/ExitDemo_passthru/exitdemo_passthru.c
UserExitExamples/ExitDemo_passthru/exitdemopassthru.vcproj
UserExitExamples/ExitDemo_passthru/Makefile_passthru.HPUX
UserExitExamples/ExitDemo_passthru/Makefile_passthru.AIX
UserExitExamples/ExitDemo_passthru/Makefile_passthru.HP_OSS
UserExitExamples/ExitDemo_passthru/Makefile_passthru.LINUX
UserExitExamples/ExitDemo_passthru/readme.txt
UserExitExamples/ExitDemo_passthru/Makefile_passthru.SOLARIS
UserExitExamples/ExitDemo_lobs/
UserExitExamples/ExitDemo_lobs/exitdemo_lob.c
UserExitExamples/ExitDemo_lobs/Makefile_lob.HPUX
UserExitExamples/ExitDemo_lobs/Makefile_lob.SOLARIS
UserExitExamples/ExitDemo_lobs/Makefile_lob.AIX
UserExitExamples/ExitDemo_lobs/exitdemo_lob.vcproj
UserExitExamples/ExitDemo_lobs/Makefile_lob.LINUX
UserExitExamples/ExitDemo_lobs/readme.txt
UserExitExamples/ExitDemo_pk_befores/
UserExitExamples/ExitDemo_pk_befores/Makefile_pk_befores.AIX
UserExitExamples/ExitDemo_pk_befores/Makefile_pk_befores.LINUX
UserExitExamples/ExitDemo_pk_befores/exitdemo_pk_befores.c
UserExitExamples/ExitDemo_pk_befores/Makefile_pk_befores.HPUX
UserExitExamples/ExitDemo_pk_befores/exitdemo_pk_befores.vcproj
UserExitExamples/ExitDemo_pk_befores/Makefile_pk_befores.SOLARIS
UserExitExamples/ExitDemo_pk_befores/readme.txt
UserExitExamples/ExitDemo/
UserExitExamples/ExitDemo/exitdemo.vcproj
UserExitExamples/ExitDemo/Makefile_exit_demo.SOLARIS
UserExitExamples/ExitDemo/Makefile_exit_demo.HP_OSS
UserExitExamples/ExitDemo/exitdemo.c
UserExitExamples/ExitDemo/Makefile_exit_demo.LINUX
UserExitExamples/ExitDemo/exitdemo_utf16.c
UserExitExamples/ExitDemo/Makefile_exit_demo.HPUX
UserExitExamples/ExitDemo/Makefile_exit_demo.AIX
UserExitExamples/ExitDemo/readme.txt
bcpfmt.tpl
bcrypt.txt
cfg/
cfg/password.properties
cfg/MPMetadataSchema.xsd
cfg/jps-config-jse.xml
cfg/ProfileConfig.xml
cfg/mpmetadata.xml
cfg/Config.properties
chkpt_ora_create.sql
cobgen
convchk
db2cntl.tpl
ddl_cleartrace.sql
ddl_ddl2file.sql
ddl_disable.sql
ddl_enable.sql
ddl_filter.sql
ddl_nopurgeRecyclebin.sql
ddl_ora10.sql
ddl_ora10upCommon.sql
ddl_ora11.sql
ddl_ora9.sql
ddl_pin.sql
ddl_purgeRecyclebin.sql
ddl_remove.sql
ddl_session.sql
ddl_session1.sql
ddl_setup.sql
ddl_status.sql
ddl_staymetadata_off.sql
ddl_staymetadata_on.sql
ddl_trace_off.sql
ddl_trace_on.sql
ddl_tracelevel.sql
ddlcob
defgen
demo_more_ora_create.sql
demo_more_ora_insert.sql
demo_ora_create.sql
demo_ora_insert.sql
demo_ora_lob_create.sql
demo_ora_misc.sql
demo_ora_pk_befores_create.sql
demo_ora_pk_befores_insert.sql
demo_ora_pk_befores_updates.sql
dirjar/
dirjar/xmlparserv2.jar
dirjar/fmw_audit.jar
dirjar/jps-internal.jar
dirjar/org.springframework.jdbc-3.0.0.RELEASE.jar
dirjar/org.springframework.context-3.0.0.RELEASE.jar
dirjar/jps-upgrade.jar
dirjar/oraclepki.jar
dirjar/org.springframework.transaction-3.0.0.RELEASE.jar
dirjar/xstream-1.3.jar
dirjar/jsr250-api-1.0.jar
dirjar/org.springframework.beans-3.0.0.RELEASE.jar
dirjar/ldapjclnt11.jar
dirjar/spring-security-cas-client-3.0.1.RELEASE.jar
dirjar/jps-manifest.jar
dirjar/org.springframework.aspects-3.0.0.RELEASE.jar
dirjar/identityutils.jar
dirjar/org.springframework.aop-3.0.0.RELEASE.jar
dirjar/jacc-spi.jar
dirjar/jmxremote_optional-1.0-b02.jar
dirjar/slf4j-log4j12-1.4.3.jar
dirjar/jps-api.jar
dirjar/slf4j-api-1.4.3.jar
dirjar/identitystore.jar
dirjar/jps-unsupported-api.jar
dirjar/osdt_xmlsec.jar
dirjar/org.springframework.orm-3.0.0.RELEASE.jar
dirjar/jagent.jar
dirjar/commons-codec-1.3.jar
dirjar/jps-ee.jar
dirjar/spring-security-taglibs-3.0.1.RELEASE.jar
dirjar/log4j-1.2.15.jar
dirjar/osdt_core.jar
dirjar/spring-security-acl-3.0.1.RELEASE.jar
dirjar/xpp3_min-1.1.4c.jar
dirjar/spring-security-web-3.0.1.RELEASE.jar
dirjar/spring-security-core-3.0.1.RELEASE.jar
dirjar/spring-security-config-3.0.1.RELEASE.jar
dirjar/jps-mbeans.jar
dirjar/org.springframework.test-3.0.0.RELEASE.jar
dirjar/jdmkrt-1.0-b02.jar
dirjar/jps-common.jar
dirjar/org.springframework.web-3.0.0.RELEASE.jar
dirjar/jps-patching.jar
dirjar/jps-wls.jar
dirjar/commons-logging-1.0.4.jar
dirjar/org.springframework.expression-3.0.0.RELEASE.jar
dirjar/org.springframework.instrument-3.0.0.RELEASE.jar
dirjar/monitor-common.jar
dirjar/osdt_cert.jar
dirjar/org.springframework.asm-3.0.0.RELEASE.jar
dirjar/org.springframework.context.support-3.0.0.RELEASE.jar
dirjar/org.springframework.core-3.0.0.RELEASE.jar
dirprm/
dirprm/jagent.prm
emsclnt
extract
freeBSD.txt
ggMessage.dat
ggcmd
ggsci
help.txt
jagent.sh
keygen
libantlr3c.so
libdb-5.2.so
libgglog.so
libggrepo.so
libicudata.so.38
libicui18n.so.38
libicuuc.so.38
libxerces-c.so.28
libxml2.txt
logdump
marker_remove.sql
marker_setup.sql
marker_status.sql
mgr
notices.txt
oggerr
params.sql
prvtclkm.plb
pw_agent_util.sh
remove_seq.sql
replicat
retrace
reverse
role_setup.sql
sequence.sql
server
sqlldr.tpl
tcperrs
ucharset.h
ulg.sql
usrdecs.h
zlib.txt

2.修改环境变量

[oracle@bre1 gg]$ ./ggsci
./ggsci: error while loading shared libraries: libnnz11.so: cannot open shared object file: No such file or directory

[oracle@bre1 gg]$ vi /home/oracle/.bash_profile

export PATH=$ORACLE_HOME/bin:$PATH:$HOME/bin:$GRID_HOME/bin:/gg
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/gg/

[oracle@bre1 gg]$ source /home/oracle/.bash_profile 


3.创建目录结构

[oracle@bre1 gg]$ 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 (bre1) 1> create subdirs

Creating subdirectories under current directory /gg

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


GGSCI (bre1) 2> exit


4.修改数据库为归档,打开附加日志,创建gg用户并授权

[oracle@bre1 gg]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Mon Jun 23 22:35:00 2014

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> archive log list;
Database log mode	       No Archive Mode
Automatic archival	       Disabled
Archive destination	       USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     13
Current log sequence	       15
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.

Total System Global Area  835104768 bytes
Fixed Size		    2257840 bytes
Variable Size		  494931024 bytes
Database Buffers	  331350016 bytes
Redo Buffers		    6565888 bytes
Database mounted.

SQL> alter database archivelog;

Database altered.

SQL> alter system set log_archive_dest_1='location=/arch' scope=both;

System altered.

SQL> alter database open;

SQL> Alter database add supplemental log data;

Database altered.

SQL> alter database force logging;

Database altered.

SQL> create user ggs identified by ggs ;

User created.
grant connect,resource,unlimited tablespace to ggs;
grant execute on utl_file to ggs;
grant select any dictionary,select any table to ggs;
grant alter any table to ggs;
grant flashback any table to ggs;

Grant succeeded.

SQL> 
Grant succeeded.

SQL> 
Grant succeeded.

SQL> 
Grant succeeded.

SQL> 
Grant succeeded.

SQL> grant execute on DBMS_FLASHBACK to ggs;

Grant succeeded.

目标端安装和源端基本一样,只是目标端需要赋予ggs为DBA权限。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值