通过查看Oracle安装文档中列出的Package Requirements可以查看在不同平台上需要的软件包,下面列出Asianux 3, Oracle Enterprise
环境:11.2.0.3+OEL5.7
192.168.1.55zlm sid:zlm11g
192.168.1.60zlm2 sid:zlm11g
gg软件包:ogg112101_fbo_ggs_Linux_x64_ora11g_64bit
相关阅读:
Oracle DML流程
PL/SQL“ ORA-14551: 无法在查询中执行 DML 操作”解决
MySQL常用DDL、DML、DCL语言整理(附样例)
Oracle基本事务和ForAll执行批量DML练习
Oracle DML语句(insert,update,delete) 回滚开销估算
一、安装OGG软件并配置实验环境
*******
源主库:
*******
1.把gg软件包复制到源主机,2次解压到gg安装目录gg11
[oracle@zlmdb_1]$ cd $OACLE_BASE
[oracle@zlm~]$ ls
接下来请看第2页精彩内容:
incremental_hot_database_backup.sh ogg112101_fbo_ggs_Linux_x64_ora11g_64bit.zip
incremental_hot_database_backup.sh.out orz.sh
[oracle@zlmoracle]$ mkdir gg11
[oracle@zlmoracle]$ cd gg11
[oracle@zlmgg11]$ unzip /home/oracle/ogg112101_fbo_ggs_Linux_x64_ora11g_64bit.zip
[oracle@zlmgg11]$ ll
total223764
-rw-rw-r--1 oracle oinstall 228556800 Apr 23 2012fbo_ggs_Linux_x64_ora11g_64bit.tar
-rwxrwxrwx1 oracle oinstall 220546 May 2 2012OGG_WinUnix_Rel_Notes_11.2.1.0.1.pdf
-rwxrwxrwx1 oracle oinstall 93696 May 2 2012Oracle GoldenGate 11.2.1.0.1README.doc
-rwxrwxrwx1 oracle oinstall 24390 May 2 2012Oracle GoldenGate 11.2.1.0.1README.txt
[oracle@zlmgg11]$ tar xvoffbo_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
.............
2.修改环境变量文件.bash_profile,加入OGG的环境变量
export GGHOME=/$ORACLE_BASE/gg11
exportPATH=$ORACLE_BASE/gg11:$ORACLE_HOME/bin:/usr/bin/:$PATH
[oracle@zlmgg11]$ . ~/.bash_profile
[oracle@zlmgg11]$ ggsci
ggsci:error while loading shared libraries: libnnz11.so: cannot open shared objectfile: No such file or directory
由于没有设置LD_LIBRARY_PATH环境变量,所以无法执行ggsci,重新添加到.bash_profile
在环境变量中添加如下命令:
export LD_LIBLARY_PATH=$ORACLE_BASE/gg11:$ORACLE_HOME/lib:$ORACLE_HOME/bin
重新source一下后执行ggsci
[oracle@zlmgg11]$ . ~/.bash_profile
[oracle@zlmgg11]$ ggsci
OracleGoldenGate Command Interpreter for Oracle
Version 11.2.1.0.1OGGCORE_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.
3.创建OGG专用目录subdirs
GGSCI (zlm)1> create subdirs
Creatingsubdirectories under current directory /u01/app/oracle/gg11
Parameterfiles /u01/app/oracle/gg11/dirprm: already exists
Reportfiles /u01/app/oracle/gg11/dirrpt: created
Checkpointfiles /u01/app/oracle/gg11/dirchk:created
Processstatus files /u01/app/oracle/gg11/dirpcs: created
SQLscript files /u01/app/oracle/gg11/dirsql: created
Databasedefinitions files /u01/app/oracle/gg11/dirdef: created
Extractdata files /u01/app/oracle/gg11/dirdat: created
Temporaryfiles /u01/app/oracle/gg11/dirtmp: created
Stdoutfiles /u01/app/oracle/gg11/dirout: created
4.对源数据库设置补充日志,并开启归档模式和强制归档
SQL>alter database add supplemental log data;
Databasealtered.
SQL>alter system switch logfile;
Systemaltered.
SQL>select supplemental_log_data_min,log_mode,force_logging from v$database;
SUPPLEMELOG_MODE FOR
-------------------- ---
YES ARCHIVELOG NO
SQL> alterdatabase force logging;
Databasealtered.
SQL>select supplemental_log_data_min,log_mode,force_loggingfrom v$database;
SUPPLEMELOG_MODE FOR
-------------------- ---
YES ARCHIVELOG YES
5.编辑源数据库管理进程参数文件
GGSCI(zlm) 1> edit params mgr
Cannotload ICU resource bundle 'ggMessage', error code 2 - No such file or directory
Cannotload ICU resource bundle 'ggMessage', error code 2 - No such file or directory
Aborted
这里报错是因为之前进入ggsci界面是并没有在OGG安装目录,必须要在$GGHOME(如果配置过的话,我这里$GGHOME=/u01/app/oracle/gg11)
[oracle@zlm~]$ cd $ORACLE_BASE/gg11
[oracle@zlmgg11]$ ggsci
OracleGoldenGate Command Interpreter for Oracle
Version 11.2.1.0.1OGGCORE_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(zlm) 1> edit params mgr
在mgr中添加入如下一行:(和vi编辑器一样操作)
PORT 7809

MySQLviewshavelimitations:1)Theydon'tsupportallSQLoperations,restrictingdatamanipulationthroughviewswithjoinsorsubqueries.2)Theycanimpactperformance,especiallywithcomplexqueriesorlargedatasets.3)Viewsdon'tstoredata,potentiallyleadingtooutdatedinforma

ProperusermanagementinMySQLiscrucialforenhancingsecurityandensuringefficientdatabaseoperation.1)UseCREATEUSERtoaddusers,specifyingconnectionsourcewith@'localhost'or@'%'.2)GrantspecificprivilegeswithGRANT,usingleastprivilegeprincipletominimizerisks.3)

MySQLdoesn'timposeahardlimitontriggers,butpracticalfactorsdeterminetheireffectiveuse:1)Serverconfigurationimpactstriggermanagement;2)Complextriggersincreasesystemload;3)Largertablesslowtriggerperformance;4)Highconcurrencycancausetriggercontention;5)M

Yes,it'ssafetostoreBLOBdatainMySQL,butconsiderthesefactors:1)StorageSpace:BLOBscanconsumesignificantspace,potentiallyincreasingcostsandslowingperformance.2)Performance:LargerrowsizesduetoBLOBsmayslowdownqueries.3)BackupandRecovery:Theseprocessescanbe

Adding MySQL users through the PHP web interface can use MySQLi extensions. The steps are as follows: 1. Connect to the MySQL database and use the MySQLi extension. 2. Create a user, use the CREATEUSER statement, and use the PASSWORD() function to encrypt the password. 3. Prevent SQL injection and use the mysqli_real_escape_string() function to process user input. 4. Assign permissions to new users and use the GRANT statement.

MySQL'sBLOBissuitableforstoringbinarydatawithinarelationaldatabase,whileNoSQLoptionslikeMongoDB,Redis,andCassandraofferflexible,scalablesolutionsforunstructureddata.BLOBissimplerbutcanslowdownperformancewithlargedata;NoSQLprovidesbetterscalabilityand

ToaddauserinMySQL,use:CREATEUSER'username'@'host'IDENTIFIEDBY'password';Here'showtodoitsecurely:1)Choosethehostcarefullytocontrolaccess.2)SetresourcelimitswithoptionslikeMAX_QUERIES_PER_HOUR.3)Usestrong,uniquepasswords.4)EnforceSSL/TLSconnectionswith

ToavoidcommonmistakeswithstringdatatypesinMySQL,understandstringtypenuances,choosetherighttype,andmanageencodingandcollationsettingseffectively.1)UseCHARforfixed-lengthstrings,VARCHARforvariable-length,andTEXT/BLOBforlargerdata.2)Setcorrectcharacters


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Zend Studio 13.0.1
Powerful PHP integrated development environment

Atom editor mac version download
The most popular open source editor

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SublimeText3 Mac version
God-level code editing software (SublimeText3)
