环境 :数据库版本Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 VBOX虚拟机主机名、数据库实例、库名及IP规划:源
环境 :
数据库版本Oracle Database 11g Enterprise Edition Release 11.2.0.1.0
VBOX虚拟机
主机名、数据库实例、库名及IP规划:
源主机IP:192.168.1.213 HOSTNAME:bys001.oel.com
目标主机IP:192.168.1.213 HOSTNAME:bys2.oel.com
实例名和数据库名两台主机一样,两台主机的数据库结构完全一样。
采用先配置源主机,再克隆一台修改一下配置做为目标机。
其中源主机已经安装好ORACLE数据库软件并已经创建数据库。
整个配置分6步:
1.修改环境变量,创建目录
2.上传OGG软件解压并安装
3.查询数据库名、实例名并开启归档模式,,强制产生日志等
4.在数据库中为OGG创建用户
5.开始配置OGG的同步--未配置DDL的同步
6.测试test用户的test1表做DML操作能否同步
######################################
1.修改环境变量,创建目录
[oracle@bys001 ~]$ vi .bash_profile
增加这一句:
export OGG_HOME=/u01/ogg
".bash_profile" 24L, 560C written
[oracle@bys001 ~]$ source .bash_profile
[oracle@bys001 ~]$ cd /u01
[oracle@bys001 u01]$ mkdir ogg
[oracle@bys001 u01]$ ls
admin checkpoints oradata
app diag oraInventory
archbys1 flash_recovery_area
cfgtoollogs ogg
[oracle@bys001 u01]$ echo $OGG_HOME
/u01/ogg
2.上传OGG软件解压并安装
----使用SSH SECURE SHELL上传很好用。
[oracle@bys001 ~]$ ls ogg112101_fbo_ggs_Linux_x86_ora11g_32bit.zip ogg112101_fbo_ggs_Linux_x86_ora11g_32bit.zip
[oracle@bys001 ~]$ unzip ogg112101_fbo_ggs_Linux_x86_ora11g_32bit.zip
[oracle@bys001 ~]$ ls fbo_ggs_Linux_x86_ora11g_32bit.tar
fbo_ggs_Linux_x86_ora11g_32bit.tar
[oracle@bys001 ~]$ tar -xvf fbo_ggs_Linux_x86_ora11g_32bit.tar -C $OGG_HOME
打开 ggsci时的一个错误解决:
我这里在使用ggsci遇到错误因为找不到库文件报错:
[oracle@oel-01 ogg]$ ./ggsci
./ggsci: error while loading shared libraries: libnnz11.so: cannot open shared object file: No such file or directory
建议在使用前先在OGG的目录执行:[oracle@bys001 ogg]$ ldd ggsci
如果库文件全在,可以直接执行[oracle@bys001 ogg]$ ./ggsci
如果缺少库文件,可以find / -name libnnz11.so 这样在整个/目录下查询。
根据查出的库文件位置,做一个软链接就可以了,要使用 root账户。如:
[root@oel-01 ~]# ln -s /u01/app/oracle/product/11.2.0/dbhome_1/lib/libnnz11.so /lib/libnnz11.so
创建OGG目录:要注意在OGG的安装目录下调用
[oracle@bys001 ogg]$ ./ggsci
GGSCI (bys001.oel.com) 2> create subdirs
Creating subdirectories under current directory /u01/ogg
Parameter files /u01/ogg/dirprm: already exists
Report files /u01/ogg/dirrpt: created
Checkpoint files /u01/ogg/dirchk: created
Process status files /u01/ogg/dirpcs: created
SQL script files /u01/ogg/dirsql: created
Database definitions files /u01/ogg/dirdef: created
Extract data files /u01/ogg/dirdat: created
Temporary files /u01/ogg/dirtmp: created
Stdout files /u01/ogg/dirout: created
只需要在打开的窗口写入: PORT 7809就可以了,使用是和VI一样。
GGSCI (bys001.oel.com) 4> edit param mgr
PORT 7809
GGSCI (bys001.oel.com) 7> start mgr
Manager started.
GGSCI (bys001.oel.com) 8> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
OGG安装完成。因为后面才会克隆虚拟机,所以这里只需要做一次安装哈哈。
OGG同步的配置在第6步。
###############################################

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

SublimeText3 Chinese version
Chinese version, very easy to use

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Linux new version
SublimeText3 Linux latest version

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.
