oracle11.2.0.4+ogg19.1.0.4目标端复制配置3

小结:

采用集成模式:目标端不需要配置checkpoint表,ddl复制也不需要配置。当然也可增加相应ddl参数明确指定:

ddl include mapped
ddlerror 24344,ignore
ddlerror 955,ignore

对应源端采用create table as select 这种方式可同步sql,但是获取的记录数是本地库的数据,所以数据可能不一致。ogg同步不建议使用ctas的同步。

[oracle@saperp ~]$ pwd
/home/oracle
[oracle@saperp ~]$ ls
191004_fbo_ggs_Linux_x64_shiphome.zip  bbed  dmp  jyc  mysql-5.7.28-linux-glibc2.12-x86_64.tar.gz  rdba.sql  roll.sql  tbs.sql  test.sh
[oracle@saperp ~]$ ll
total 705536
-rw-r--r-- 1 oracle oinstall 556240981 May 31 18:22 191004_fbo_ggs_Linux_x64_shiphome.zip
drwxr-xr-x 2 oracle oinstall      4096 May 15 14:15 bbed
drwxr-xr-x 2 oracle oinstall       113 Jun  1 14:51 dmp
drwxr-xr-x 2 root   root            21 Mar 23 15:05 jyc
-rw-r--r-- 1 oracle oinstall 166207440 Mar 23 14:52 mysql-5.7.28-linux-glibc2.12-x86_64.tar.gz
-rw-r--r-- 1 oracle oinstall       958 May 15 10:16 rdba.sql
-rw-r--r-- 1 oracle oinstall         0 May  7 15:56 roll.sql
-rw-r--r-- 1 oracle oinstall      1120 Mar 23 15:07 tbs.sql
-rwxr-xr-x 1 oracle oinstall       378 May  7 15:58 test.sh
[oracle@saperp ~]$ pwd
/home/oracle
[oracle@saperp ~]$ mkdir soft
[oracle@saperp ~]$ mv 191004_fbo_ggs_Linux_x64_shiphome.zip ./soft
[oracle@saperp ~]$ cd soft
[oracle@saperp soft]$ pwd
/home/oracle/soft
[oracle@saperp soft]$ ls
191004_fbo_ggs_Linux_x64_shiphome.zip
[oracle@saperp soft]$ unzip 191004_fbo_ggs_Linux_x64_shiphome.zip 
Archive:  191004_fbo_ggs_Linux_x64_shiphome.zip
   creating: fbo_ggs_Linux_x64_shiphome/
......
  inflating: OGG-19.1.0.0-README.txt  
  inflating: OGG_WinUnix_Rel_Notes_19.1.0.0.4.pdf  
[oracle@saperp soft]$ pwd
/home/oracle/soft
[oracle@saperp soft]$ ls
191004_fbo_ggs_Linux_x64_shiphome.zip  fbo_ggs_Linux_x64_shiphome  OGG-19.1.0.0-README.txt  OGG_WinUnix_Rel_Notes_19.1.0.0.4.pdf
[oracle@saperp soft]$ cd fbo_ggs_Linux_x64_shiphome/
[oracle@saperp fbo_ggs_Linux_x64_shiphome]$ ls
Disk1
[oracle@saperp fbo_ggs_Linux_x64_shiphome]$ cd Disk1/
[oracle@saperp Disk1]$ ls
install  response  runInstaller  stage
[oracle@saperp Disk1]$ cd response/
[oracle@saperp response]$ ls
oggcore.rsp
[oracle@saperp response]$ vi oggcore.rsp 
####################################################################
## Copyright(c) Oracle Corporation 2019. All rights reserved.     ##
##                                                                ##
## Specify values for the variables listed below to customize     ##
## your installation.                                             ##
##                                                                ##
## Each variable is associated with a comment. The comment        ##
## can help to populate the variables with the appropriate        ##
## values.                                                        ##
##                                                                ##
## IMPORTANT NOTE: This file should be secured to have read       ##
## permission only by the oracle user or an administrator who     ##
## own this installation to protect any sensitive input values.   ##
##                                                                ##
####################################################################

#-------------------------------------------------------------------------------
# Do not change the following system generated value.
#-------------------------------------------------------------------------------
oracle.install.responseFileVersion=/oracle/install/rspfmt_ogginstall_response_schema_v19_1_0


################################################################################
##                                                                            ##
## Oracle GoldenGate installation option and details                          ##
##                                                                            ##
################################################################################

#-------------------------------------------------------------------------------
# Specify the installation option.
# Specify ORA19c for installing Oracle GoldenGate for Oracle Database 19c or
#         ORA18c for installing Oracle GoldenGate for Oracle Database 18c or
#         ORA12c for installing Oracle GoldenGate for Oracle Database 12c or
#         ORA11g for installing Oracle GoldenGate for Oracle Database 11g
#-------------------------------------------------------------------------------
INSTALL_OPTION=ORA11g

#-------------------------------------------------------------------------------
# Specify a location to install Oracle GoldenGate
#-------------------------------------------------------------------------------
SOFTWARE_LOCATION=/ogg/19c

#-------------------------------------------------------------------------------
# Specify true to start the manager after installation.
#-------------------------------------------------------------------------------
START_MANAGER=

#-------------------------------------------------------------------------------
# Specify a free port within the valid range for the manager process.
# Required only if START_MANAGER is true.
#-------------------------------------------------------------------------------
MANAGER_PORT=

#-------------------------------------------------------------------------------
# Specify the location of the Oracle Database.
# Required only if START_MANAGER is true.
#-------------------------------------------------------------------------------
DATABASE_LOCATION=/home/db/oracle/product/11.2.0/db_1


################################################################################
##                                                                            ##
## Specify details to Create inventory for Oracle installs                    ##
## Required only for the first Oracle product install on a system.            ##
##                                                                            ##
################################################################################

"oggcore.rsp" 81L, 4488C written                                                                                                                                                                                           
[oracle@saperp response]$ pwd
/home/oracle/soft/fbo_ggs_Linux_x64_shiphome/Disk1/response
[oracle@saperp response]$ cd /ogg
-bash: cd: /ogg: No such file or directory
[oracle@saperp response]$ exit
logout
[root@saperp ~]# mkdir /ogg
[root@saperp ~]# mkdir /ogg/19c
[root@saperp ~]# chown -R oracle:oinstall /ogg
[root@saperp ~]# su - oracle
Last login: Thu Jun  4 13:53:20 CST 2020 on pts/1
[oracle@saperp ~]$ cd soft
[oracle@saperp soft]$ ls
191004_fbo_ggs_Linux_x64_shiphome.zip  fbo_ggs_Linux_x64_shiphome  OGG-19.1.0.0-README.txt  OGG_WinUnix_Rel_Notes_19.1.0.0.4.pdf
[oracle@saperp soft]$ cd fbo_ggs_Linux_x64_shiphome/
[oracle@saperp fbo_ggs_Linux_x64_shiphome]$ ls
Disk1
[oracle@saperp fbo_ggs_Linux_x64_shiphome]$ cd Disk1/
[oracle@saperp Disk1]$ ls
install  response  runInstaller  stage
[oracle@saperp Disk1]$ pwd
/home/oracle/soft/fbo_ggs_Linux_x64_shiphome/Disk1
[oracle@saperp Disk1]$ ./runInstaller -silent -nowait -responseFile /home/oracle/soft/fbo_ggs_Linux_x64_shiphome/Disk1/response/oggcore.rsp
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB.   Actual 6114 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 4095 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2020-06-04_01-55-14PM. Please wait ...[oracle@saperp Disk1]$ You can find the log of this install session at:
 /home/db/oraInventory/logs/installActions2020-06-04_01-55-14PM.log
Successfully Setup Software.
The installation of Oracle GoldenGate Core was successful.
Please check '/home/db/oraInventory/logs/silentInstall2020-06-04_01-55-14PM.log' for more details.

[oracle@saperp Disk1]$ 
[oracle@saperp Disk1]$ 
[oracle@saperp Disk1]$ pwd
/home/oracle/soft/fbo_ggs_Linux_x64_shiphome/Disk1
[oracle@saperp Disk1]$ cd /home/oracle
[oracle@saperp ~]$ pwd
/home/oracle
[oracle@saperp ~]$ vi .bash_profile 
# .bash_profile

# Get the aliases and functions
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH
export ORACLE_BASE=/home/db/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export ORACLE_SID=erp
export LANG=en_US.UTF-8
export NLS_LANG=american_america.ZHS16GBK
export NLS_DATE_FORMAT="yyyy-mm-dd hh24:mi:ss"
export PATH=.:${PATH}:$HOME/bin:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch
export PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
export PATH=${PATH}:$ORACLE_BASE/common/oracle/bin:/home/oracle/run
export ORACLE_TERM=xterm
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
export CLASSPATH=$ORACLE_HOME/JRE
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export THREADS_FLAG=native
export TEMP=/tmp
export TMPDIR=/tmp
umask 022
export TMOUT=0
alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'
alias lsnrctl='rlwrap lsnrctl'
export GG_HOME=/ogg/19c
export PATH=$JAVA_HOME/bin:$GG_HOME:$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GG_HOME:$ORACLE_HOME/lib:/lib:/usr/lib:$GG_ADAPTER_HOME

~
~
".bash_profile" 41L, 1363C written                                                                                                                                                                                         
[oracle@saperp ~]$ source .bash_profile
[oracle@saperp ~]$ ldd ggsci
ldd: ./ggsci: No such file or directory
[oracle@saperp ~]$ cd /ogg/19c
[oracle@saperp 19c]$ ldd ggsci
        linux-vdso.so.1 =>  (0x00007ffff7ffa000)
        librt.so.1 => /lib64/librt.so.1 (0x00007ffff7233000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007ffff702f000)
        libgglog.so => /ogg/19c/./libgglog.so (0x00007ffff6cc9000)
        libggutil.so => /ogg/19c/./libggutil.so (0x00007ffff6aad000)
        libggrepo.so => /ogg/19c/./libggrepo.so (0x00007ffff67f4000)
        libdb-6.1.so => /ogg/19c/./libdb-6.1.so (0x00007ffff63de000)
        liblmdb.so => /ogg/19c/./liblmdb.so (0x00007ffff61c9000)
        libggperf.so => /ogg/19c/./libggperf.so (0x00007ffff5f97000)
        libggparam.so => /ogg/19c/./libggparam.so (0x00007ffff487e000)
        libicui18n.so.62 => /ogg/19c/./libicui18n.so.62 (0x00007ffff4399000)
        libicuuc.so.62 => /ogg/19c/./libicuuc.so.62 (0x00007ffff3f98000)
        libicudata.so.62 => /ogg/19c/./libicudata.so.62 (0x00007ffff1f80000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ffff1d64000)
        libxerces-c-3.2.so => /ogg/19c/./libxerces-c-3.2.so (0x00007ffff16f0000)
        libantlr3c.so => /ogg/19c/./libantlr3c.so (0x00007ffff14d5000)
        libnnz11.so => /home/db/oracle/product/11.2.0/db_1/lib/libnnz11.so (0x00007ffff0d4e000)
        libclntsh.so.11.1 => /home/db/oracle/product/11.2.0/db_1/lib/libclntsh.so.11.1 (0x00007fffee2dd000)
        libggnnzitp.so => /ogg/19c/./libggnnzitp.so (0x00007fffed80b000)
        libstdc++.so.6 => /ogg/19c/./libstdc++.so.6 (0x00007fffed474000)
        libm.so.6 => /lib64/libm.so.6 (0x00007fffed172000)
        libgcc_s.so.1 => /ogg/19c/./libgcc_s.so.1 (0x00007fffecf5c000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fffecb8e000)
        /lib64/ld-linux-x86-64.so.2 (0x00007ffff7ddb000)
        libnsl.so.1 => /lib64/libnsl.so.1 (0x00007fffec974000)
        libaio.so.1 => /lib64/libaio.so.1 (0x00007fffec772000)
[oracle@saperp 19c]$ ldd ggsci|grep not
[oracle@saperp 19c]$ ggsci

Oracle GoldenGate Command Interpreter for Oracle
Version 19.1.0.0.4 OGGCORE_19.1.0.0.0_PLATFORMS_191017.1054_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Oct 17 2019 23:13:12
Operating system character set identified as UTF-8.

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

GGSCI (saperp) 1> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     STOPPED                                           


GGSCI (saperp) 2> exit
[oracle@saperp 19c]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Jun 4 13:58:38 2020

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> select username,default_tablespace from dba_users order by created desc;

USERNAME                       DEFAULT_TABLESPACE
------------------------------ ------------------------------
TEST                           TESTTBS1
JYC                            JYCTBS
WEB01                          APEX_1706321139930175
APEX01                         APEX_1301369653334498
ORDS_METADATA                  SYSAUX
ORDS_PUBLIC_USER               USERS
APEX_LISTENER                  SYSTEM
APEX_REST_PUBLIC_USER          SYSTEM
APEX_INSTANCE_ADMIN_USER       SYSTEM
APEX_PUBLIC_USER               SYSTEM
FLOWS_FILES                    SYSAUX

USERNAME                       DEFAULT_TABLESPACE
------------------------------ ------------------------------
APEX_190200                    SYSAUX
XS$NULL                        SYSTEM
ANONYMOUS                      SYSAUX
XDB                            SYSAUX
SAPERP                         JYCTBS
MGMT_VIEW                      SYSTEM
SYSMAN                         SYSAUX
APPQOSSYS                      SYSAUX
DBSNMP                         SYSAUX
ORACLE_OCM                     SYSTEM
DIP                            SYSTEM

USERNAME                       DEFAULT_TABLESPACE
------------------------------ ------------------------------
SYS                            SYSTEM
SYSTEM                         SYSTEM
OUTLN                          SYSTEM

25 rows selected.

SQL> conn jyc/jyc
Connected.
SQL> select table_name from user_tables;

TABLE_NAME
------------------------------
T1
T2
T3

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@saperp 19c]$ cd $ORACLE_HOME/network/admin
[oracle@saperp admin]$ ls
listener.ora  samples  shrept.lst  sqlnet.ora  tnsnames.ora
[oracle@saperp admin]$ more tnsnames.ora 
erp =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.52.155)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = erp)
    )
  )
[oracle@saperp admin]$ tnsping erp

TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 04-JUN-2020 14:04:02

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

Used parameter files:
/home/db/oracle/product/11.2.0/db_1/network/admin/sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.52.155)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = erp)))
TNS-12541: TNS:no listener
[oracle@saperp admin]$ lsnrctl start

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 04-JUN-2020 14:04:05

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

Starting /home/db/oracle/product/11.2.0/db_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.4.0 - Production
System parameter file is /home/db/oracle/product/11.2.0/db_1/network/admin/listener.ora
Log messages written to /home/db/oracle/diag/tnslsnr/saperp/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=saperp)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                04-JUN-2020 14:04:05
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /home/db/oracle/product/11.2.0/db_1/network/admin/listener.ora
Listener Log File         /home/db/oracle/diag/tnslsnr/saperp/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=saperp)(PORT=1521)))
The listener supports no services
The command completed successfully
[oracle@saperp admin]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Jun 4 14:04:10 2020

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> create tablespace ogg_tbs datafile '+DT' size 100m AUTOEXTEND on;
create tablespace ogg_tbs datafile '+DT' size 100m AUTOEXTEND on
*
ERROR at line 1:
ORA-01119: error in creating database file '+DT'
ORA-17502: ksfdcre:4 Failed to create file +DT
ORA-15001: diskgroup "DT" does not exist or is not mounted
ORA-15077: could not locate ASM instance serving a required diskgroup
ORA-29701: unable to connect to Cluster Synchronization Service


SQL> select name from v$datafile;

NAME
--------------------------------------------------------------------------------
/home/db/oracle/oradata/erp/system01.dbf
/home/db/oracle/oradata/erp/sysaux01.dbf
/home/db/oracle/oradata/erp/undotbs1.dbf
/home/db/oracle/oradata/erp/PARTTBS103.dbf
/home/db/oracle/oradata/erp/PARTTBS102.dbf
/home/db/oracle/oradata/erp/PARTTBS101.dbf
/home/db/oracle/oradata/erp/USERS01.dbf
/home/db/oracle/oradata/erp/JYCTBS03.dbf
/home/db/oracle/oradata/erp/JYCTBS02.dbf
/home/db/oracle/oradata/erp/JYCTBS01.dbf
/home/db/oracle/oradata/erp/TESTTBS103.dbf

NAME
--------------------------------------------------------------------------------
/home/db/oracle/oradata/erp/TESTTBS102.dbf
/home/db/oracle/oradata/erp/TESTTBS101.dbf
/home/db/oracle/oradata/erp/TESTTBS202.dbf
/home/db/oracle/oradata/erp/TESTTBS201.dbf
/home/db/oracle/oradata/erp/APEX_1301369653334498.dbf
/home/db/oracle/oradata/erp/APEX_1706321139930175.dbf

17 rows selected.

SQL>  create tablespace ogg_tbs datafile '/home/db/oracle/oradata/erp/ogg.dbf'  size 100m AUTOEXTEND on;

Tablespace created.

SQL> create user ggadm identified by 123456 default tablespace ogg_tbs;

User created.

SQL> grant dba to ggadm;

Grant succeeded.

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@saperp admin]$ ggsci

Oracle GoldenGate Command Interpreter for Oracle
Version 19.1.0.0.4 OGGCORE_19.1.0.0.0_PLATFORMS_191017.1054_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Oct 17 2019 23:13:12
Operating system character set identified as UTF-8.

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

GGSCI (saperp) 1> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     STOPPED                                           


GGSCI (saperp) 2> create subdirs

Creating subdirectories under current directory /home/db/oracle/product/11.2.0/db_1/network/admin

Parameter file                 /ogg/19c/dirprm: created.
Report file                    /ogg/19c/dirrpt: created.
Checkpoint file                /ogg/19c/dirchk: created.
Process status files           /ogg/19c/dirpcs: created.
SQL script files               /ogg/19c/dirsql: created.
Database definitions files     /ogg/19c/dirdef: created.
Extract data files             /ogg/19c/dirdat: created.
Temporary files                /ogg/19c/dirtmp: created.
Credential store files         /ogg/19c/dircrd: created.
Masterkey wallet files         /ogg/19c/dirwlt: created.
Dump files                     /ogg/19c/dirdmp: created.


GGSCI (saperp) 3> add credentialstore

Credential store created.

GGSCI (saperp) 4> alter credentialstore add user ggadm@erp,password 123456 alias oggsourceadm

Credential store altered.

GGSCI (saperp) 13> alter credentialstore delete user oggsourceadm

Credential store altered.

GGSCI (saperp) 14> alter credentialstore delete userggadm@erp,password 123456 alias oggtargetadm

ERROR: Invalid argument 'userggadm@erp'.

GGSCI (saperp) 15> alter credentialstore add userggadm@erp,password 123456 alias oggtargetadm

ERROR: Invalid argument 'userggadm@erp'.

GGSCI (saperp) 16> alter credentialstore add user ggadm@erp,password 123456 alias oggtargetadm

Credential store altered.

GGSCI (saperp) 17> dblogin alias oggtargetadm
ERROR: Unrecognized parameter (ALIAS), expected USERID/USERIDALIAS.

GGSCI (saperp) 18> dblogin useridalias oggtargetadm
Successfully logged into database.

GGSCI (saperp as ggadm@erp) 19> edit param ./GLOBALS
--For Performance Monitor:
--ENABLEMONITORING
--CHECKPOINTTABLE ggadm.checkpoint
-- For DDL :
GGSCHEMA ggadm

~
"./GLOBALS" [New] 6L, 110C written


GGSCI (saperp as ggadm@erp) 20> edit param mgr

~
"/ogg/19c/dirprm/mgr.prm" [New] 9L, 245C written


GGSCI (saperp as ggadm@erp) 21> view param mgr

PORT 7809
DYNAMICPORTLIST 7810-7830
--AUTOSTART ER *
AUTORESTART EXTRACT *,RETRIES 5,WAITMINUTES 3
PURGEOLDEXTRACTS ./dirdat/*,usecheckpoints, minkeepdays 7
LAGREPORTHOURS 1
LAGINFOMINUTES 30
LAGCRITICALMINUTES 45
ACCESSRULE, PROG SERVER, ALLOW


GGSCI (saperp as ggadm@erp) 22> info all    

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     STOPPED                                           


GGSCI (saperp as ggadm@erp) 23> start mgr
Process creation error: Cannot find executable file './mgr'


GGSCI (saperp as ggadm@erp) 24> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     STOPPED                                           


GGSCI (saperp as ggadm@erp) 25> view param mgr

PORT 7809
DYNAMICPORTLIST 7810-7830
--AUTOSTART ER *
AUTORESTART EXTRACT *,RETRIES 5,WAITMINUTES 3
PURGEOLDEXTRACTS ./dirdat/*,usecheckpoints, minkeepdays 7
LAGREPORTHOURS 1
LAGINFOMINUTES 30
LAGCRITICALMINUTES 45
ACCESSRULE, PROG SERVER, ALLOW


GGSCI (saperp as ggadm@erp) 26> exit
[oracle@saperp admin]$ cd /ogg/19c
[oracle@saperp 19c]$ ggsci

Oracle GoldenGate Command Interpreter for Oracle
Version 19.1.0.0.4 OGGCORE_19.1.0.0.0_PLATFORMS_191017.1054_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Oct 17 2019 23:13:12
Operating system character set identified as UTF-8.

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

GGSCI (saperp) 1> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     STOPPED                                           


GGSCI (saperp) 2> start mgr
Manager started.


GGSCI (saperp) 3> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING                                           


GGSCI (saperp) 4> view param mgr

PORT 7809
DYNAMICPORTLIST 7810-7830
--AUTOSTART ER *
AUTORESTART EXTRACT *,RETRIES 5,WAITMINUTES 3
PURGEOLDEXTRACTS ./dirdat/*,usecheckpoints, minkeepdays 7
LAGREPORTHOURS 1
LAGINFOMINUTES 30
LAGCRITICALMINUTES 45
ACCESSRULE, PROG SERVER, ALLOW


GGSCI (saperp) 5> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING                                           


GGSCI (saperp) 6> exit
[oracle@saperp 19c]$ cd dirdat
[oracle@saperp dirdat]$ ls
fz000000000
[oracle@saperp dirdat]$ pwd
/ogg/19c/dirdat
[oracle@saperp dirdat]$ ll
total 4
-rw-r----- 1 oracle oinstall 1545 Jun  4 14:54 fz000000000
[oracle@saperp dirdat]$ cd ..
[oracle@saperp 19c]$ ggsci

Oracle GoldenGate Command Interpreter for Oracle
Version 19.1.0.0.4 OGGCORE_19.1.0.0.0_PLATFORMS_191017.1054_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Oct 17 2019 23:13:12
Operating system character set identified as UTF-8.

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

GGSCI (saperp) 1> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING                                           


GGSCI (saperp) 2> add replicat fz, integrated exttrail ./dirdat/fz
REPLICAT (Integrated) added.


GGSCI (saperp) 3> edit param fz
~
"dirprm/fz.prm" [New] 11L, 255C written


GGSCI (saperp) 4> view param fz

replicat fz
setenv (ORACLE_SID = erp)
setenv (NLS_LANG = AMERICAN_AMERICA.ZHS16GBK)
USERIDALIAS oggtargetadm
reperror default,abend
discardfile ./dirdat/fz.dsc,append, megabytes 100
assumetargetdefs
dynamicresolution
gettruncates
MAP jyc.*,TARGET jyc.*;

GGSCI (saperp) 5> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING                                           
REPLICAT    STOPPED     FZ          00:00:00      00:00:54    


GGSCI (saperp) 6> start fz

Sending START request to MANAGER ...
REPLICAT FZ starting


GGSCI (saperp) 7> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING                                           
REPLICAT    STOPPED     FZ          00:00:00      00:00:59    


GGSCI (saperp) 8> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING                                           
REPLICAT    STOPPED     FZ          00:00:00      00:01:01    


GGSCI (saperp) 9> info fz

REPLICAT   FZ        Initialized   2020-06-04 14:55   Status STOPPED
INTEGRATED
Checkpoint Lag       00:00:00 (updated 00:01:06 ago)
Log Read Checkpoint  File ./dirdat/fz000000000
                     First Record  RBA 0


GGSCI (saperp) 10> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING                                           
REPLICAT    STOPPED     FZ          00:00:00      00:01:27    


GGSCI (saperp) 11> start fz

Sending START request to MANAGER ...
REPLICAT FZ starting


GGSCI (saperp) 12> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING                                           
REPLICAT    STOPPED     FZ          00:00:00      00:01:33    


GGSCI (saperp) 13> view report fz


***********************************************************************
                 Oracle GoldenGate Delivery for Oracle
    Version 19.1.0.0.4 OGGCORE_19.1.0.0.0_PLATFORMS_191017.1054_FBO
   Linux, x64, 64bit (optimized), Oracle 11g on Oct 17 2019 23:13:43
 
Copyright (C) 1995, 2019, Oracle and/or its affiliates. All rights reserved.

                    Starting at 2020-06-04 14:56:54
***********************************************************************

Operating System Version:
Linux
Version #1 SMP Tue Mar 17 23:49:17 UTC 2020, Release 3.10.0-1062.18.1.el7.x86_64
Node: saperp
Machine: x86_64
                         soft limit   hard limit
Address Space Size   :    unlimited    unlimited
Heap Size            :    unlimited    unlimited
File Size            :    unlimited    unlimited
CPU Time             :    unlimited    unlimited

Process id: 7053

Description: 

2020-06-04 14:56:54  WARNING OGG-02904  Replication of PARTIAL XML containing NCHAR/NVARCHAR/NCLOB data may cause divergence.

***********************************************************************
**            Running with the following parameters                  **
***********************************************************************

2020-06-04 14:56:54  INFO    OGG-03059  Operating system character set identified as UTF-8.

2020-06-04 14:56:54  INFO    OGG-02695  ANSI SQL parameter syntax is used for parameter parsing.

2020-06-04 14:56:54  INFO    OGG-02095  Successfully set environment variable ORACLE_SID=erp.

2020-06-04 14:56:54  INFO    OGG-02095  Successfully set environment variable NLS_LANG=AMERICAN_AMERICA.ZHS16GBK.

2020-06-04 14:56:54  WARNING OGG-10173  (fz.prm) line 8: Parsing error, [dynamicresolution] is deprecated.

2020-06-04 14:56:54  INFO    OGG-01360  REPLICAT is running in Integrated mode.
replicat fz
setenv (ORACLE_SID = erp)
setenv (NLS_LANG = AMERICAN_AMERICA.ZHS16GBK)
USERIDALIAS oggtargetadm

Source Context :
  SourceModule            : [ggdb.ora.OraRepConnUtil]
  SourceID                : [../gglib/ggdbora/OraRepConnUtil.cpp]
  SourceMethod            : [openDataSource]
  SourceLine              : [130]
  ThreadBacktrace         : [13] elements
                          : [/ogg/19c/libgglog.so(CMessageContext::AddThreadContext())]
                          : [/ogg/19c/libgglog.so(CMessageFactory::CreateMessage(CSourceContext*, unsigned int, ...))]
                          : [/ogg/19c/libgglog.so(_MSG_(CSourceContext*, int, CMessageFactory::MessageDisposition))]
                          : [/ogg/19c/replicat()]
                          : [/ogg/19c/replicat(odbc_param(char*, char*, ggs::gglib::ggapp::ReplicationContextParams const&))]
                          : [/ogg/19c/replicat(get_infile_params(ggs::gglib::ggapp::ReplicationContextParams&, ggs::gglib::ggdatasource::DataSourceParams&, ggs::gglib::ggdatatarget::DataTargetParams&, ggs::gglib::ggmetadata::MetadataCont
ext&))]
                          : [/ogg/19c/replicat()]
                          : [/ogg/19c/replicat(ggs::gglib::MultiThreading::MainThread::ExecMain())]
                          : [/ogg/19c/replicat(ggs::gglib::MultiThreading::Thread::RunThread(ggs::gglib::MultiThreading::Thread::ThreadArgs*))]
                          : [/ogg/19c/replicat(ggs::gglib::MultiThreading::MainThread::Run(int, char**))]
                          : [/ogg/19c/replicat(main)]
                          : [/lib64/libc.so.6(__libc_start_main)]
                          : [/ogg/19c/replicat()]

2020-06-04 14:56:54  ERROR   OGG-02091  Operation not supported because enable_goldengate_replication is not set to true.

2020-06-04 14:56:54  ERROR   OGG-01668  PROCESS ABENDING.


GGSCI (saperp) 14> exit
[oracle@saperp 19c]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Jun 4 14:57:07 2020

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> alter system set enable_goldengate_replication=true scope=both sid='*';

System altered.

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@saperp 19c]$ ggsci

Oracle GoldenGate Command Interpreter for Oracle
Version 19.1.0.0.4 OGGCORE_19.1.0.0.0_PLATFORMS_191017.1054_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Oct 17 2019 23:13:12
Operating system character set identified as UTF-8.

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

GGSCI (saperp) 1> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING                                           
REPLICAT    STOPPED     FZ          00:00:00      00:02:07    


GGSCI (saperp) 2> start fz

Sending START request to MANAGER ...
REPLICAT FZ starting


GGSCI (saperp) 3> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING                                           
REPLICAT    RUNNING     FZ          00:00:00      00:02:10    


GGSCI (saperp) 4> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING                                           
REPLICAT    RUNNING     FZ          00:00:00      00:00:00    


GGSCI (saperp) 5> info fz 

REPLICAT   FZ        Last Started 2020-06-04 14:57   Status RUNNING
INTEGRATED
Checkpoint Lag       00:00:00 (updated 00:00:04 ago)
Process ID           7104
Log Read Checkpoint  File /ogg/19c/dirdat/fz000000000
                     2020-06-04 13:49:10.854319  RBA 1545


GGSCI (saperp) 6> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING                                           
REPLICAT    RUNNING     FZ          00:00:00      00:00:08    


GGSCI (saperp) 7> view param fz

replicat fz
setenv (ORACLE_SID = erp)
setenv (NLS_LANG = AMERICAN_AMERICA.ZHS16GBK)
USERIDALIAS oggtargetadm
reperror default,abend
discardfile ./dirdat/fz.dsc,append, megabytes 100
assumetargetdefs
dynamicresolution
gettruncates
MAP jyc.*,TARGET jyc.*;

GGSCI (saperp) 8> info fz

REPLICAT   FZ        Last Started 2020-06-04 14:57   Status RUNNING
INTEGRATED
Checkpoint Lag       00:00:00 (updated 00:00:00 ago)
Process ID           7104
Log Read Checkpoint  File /ogg/19c/dirdat/fz000000000
                     2020-06-04 13:49:10.854319  RBA 1545


GGSCI (saperp) 9> info fz

REPLICAT   FZ        Last Started 2020-06-04 14:57   Status RUNNING
INTEGRATED
Checkpoint Lag       00:00:00 (updated 00:00:04 ago)
Process ID           7104
Log Read Checkpoint  File /ogg/19c/dirdat/fz000000000
                     2020-06-04 13:49:10.854319  RBA 1545


GGSCI (saperp) 10> info al
ERROR: Invalid command.

GGSCI (saperp) 11> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING                                           
REPLICAT    RUNNING     FZ          00:00:00      00:00:08    


GGSCI (saperp) 12> info fz

REPLICAT   FZ        Last Started 2020-06-04 14:57   Status RUNNING
INTEGRATED
Checkpoint Lag       00:00:00 (updated 00:00:00 ago)
Process ID           7104
Log Read Checkpoint  File /ogg/19c/dirdat/fz000000000
                     2020-06-04 13:49:10.854319  RBA 1545


GGSCI (saperp) 13> info fz

REPLICAT   FZ        Last Started 2020-06-04 14:57   Status RUNNING
INTEGRATED
Checkpoint Lag       00:03:12 (updated 00:00:09 ago)
Process ID           7104
Log Read Checkpoint  File /ogg/19c/dirdat/fz000000000
                     2020-06-04 15:12:42.853775  RBA 2903


GGSCI (saperp) 14> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING                                           
REPLICAT    RUNNING     FZ          00:00:00      00:00:00    


GGSCI (saperp) 15> exit
[oracle@saperp 19c]$ ggsci

Oracle GoldenGate Command Interpreter for Oracle
Version 19.1.0.0.4 OGGCORE_19.1.0.0.0_PLATFORMS_191017.1054_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Oct 17 2019 23:13:12
Operating system character set identified as UTF-8.

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

GGSCI (saperp) 1> info fz

REPLICAT   FZ        Last Started 2020-06-04 14:57   Status RUNNING
INTEGRATED
Checkpoint Lag       00:00:00 (updated 00:00:02 ago)
Process ID           7104
Log Read Checkpoint  File /ogg/19c/dirdat/fz000000000
                     2020-06-04 15:12:57.853775  RBA 3372


GGSCI (saperp) 2> view param fz

replicat fz
setenv (ORACLE_SID = erp)
setenv (NLS_LANG = AMERICAN_AMERICA.ZHS16GBK)
USERIDALIAS oggtargetadm
reperror default,abend
discardfile ./dirdat/fz.dsc,append, megabytes 100
assumetargetdefs
dynamicresolution
gettruncates
MAP jyc.*,TARGET jyc.*;

GGSCI (saperp) 3> info fz

REPLICAT   FZ        Last Started 2020-06-04 14:57   Status RUNNING
INTEGRATED
Checkpoint Lag       00:00:00 (updated 00:00:00 ago)
Process ID           7104
Log Read Checkpoint  File /ogg/19c/dirdat/fz000000000
                     2020-06-04 15:12:57.853775  RBA 3372


GGSCI (saperp) 4> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING                                           
REPLICAT    RUNNING     FZ          00:00:00      00:00:03    


GGSCI (saperp) 5> exit
[oracle@saperp 19c]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Jun 4 15:17:58 2020

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> conn  jyc/jyc
Connected.
SQL> select * from test1;

        ID
----------
         1

SQL> select * from test2;
select * from test2
              *
ERROR at line 1:
ORA-00942: table or view does not exist


SQL> /
select * from test2
              *
ERROR at line 1:
ORA-00942: table or view does not exist


SQL> /
select * from test2
              *
ERROR at line 1:
ORA-00942: table or view does not exist


SQL> /
select * from test2
              *
ERROR at line 1:
ORA-00942: table or view does not exist

SQL> select count(*) from test2;

  COUNT(*)
----------
        42

SQL> /

  COUNT(*)
----------
         0

SQL> select count(*) from test3;

  COUNT(*)
----------
         2

SQL> /

  COUNT(*)
----------
         1

SQL> select * from test3;

        ID NAME
---------- --------------------
         2 bbb

SQL> select * from test3;

        ID NAME
---------- --------------------
         2 bbb
         4 aaa
         3 aav

SQL> select * from test1;

        ID C2
---------- ----------
         1 1
         2 a

SQL> /

        ID C2
---------- ----------
         1 1
         2 a
         3 b

SQL> /

        ID C2
---------- ----------
         1 c
         2 a
         3 b

你可能感兴趣的:(ogg)