1.主机规划:
cat /etc/hosts
127.0.0.1 localhost
192.168.1.87 dg1
192.168.1.88 dg2
dg1 上安装有基于文件系统的单实例数据库,归档模式
dg2 上安装有基于文件系统的单实例数据库,ALO模式可以只安装客户端即可,goldengate 软件安装在dg2上完成数据的抽取
2.首先配置dg1上的nfs服务,dg2上挂载dg1的online redo和archive log的目录
[oracle@dg1 ~]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.4.0 Production on Wed Oct 11 08:10:35 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
SQL> connect /as sysDBA
Connected.
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 3
Next log sequence to archive 5
Current log sequence 5
SQL> show parameter db_recovery
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string /u01/app/oracle/fast_recovery_
area
db_recovery_file_dest_size big integer 4182M
SQL>
[oracle@dg1 oracle]$ mkdir arch
[oracle@dg1 oracle]$ cd arch
[oracle@dg1 arch]$ pwd
/u01/app/oracle/arch
[oracle@dg1 oracle]$ ls -l | grep arch
drwxr-xr-x. 2 oracle oinstall 4096 Oct 11 08:08 arch
ALTER SYSTEM SET log_archive_dest_1='location=/u01/app/oracle/arch/' SCOPE=spfile;
show parameter log_archive_format
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_format string %t_%s_%r.dbf
shutdonw immediate;
startup
archvie log list;
dg1上配置:
root:
vi /etc/exports
/u01/app/oracle * (rw,no_root_squash,no_all_squash,sync)
save and exit
exportfs -r
linux 6.X
service nfs start
service rpcbind start
dg2:
root:
[root@dg2 ~]# mkdir -p /u02/app/oracle
[root@dg2 ~]# chown -R oracleinstall /u02/
[root@dg2 ~]# chmod -R 775 /u02/
[root@dg2 ~]# mount -t nfs dg1:/u01/app/oracle /u02/app/oracle/
3.配置dg2到dg1的tnsname解析:
dg2: netca orcl1
[oracle@dg2 ~]$ cd $ORACLE_HOME/network/admin
[oracle@dg2 admin]$ cat tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
ORCL1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = dg2)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl1)
)
)
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = dg1)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)
4.dg2安装goldengate 12.2.0.1 for oracle on linux 平台软件:
调整Oracle用户环境变量
[root@dg2 ~]# pwd
/root
[root@dg2 ~]# su - oracle
[oracle@dg2 ~]$ cat .bash_profile
# ---------------------------------------------------
# OS User: oracle
# Application: Oracle Database Software Owner
# Version: Oracle 11g release 2
# ---------------------------------------------------
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
export GGHOME=/u01/app/ogg
ORACLE_SID=orcl1; export ORACLE_SID #another is dgh2
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1; export ORACLE_HOME
ORACLE_TERM=xterm; export ORACLE_TERM
NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"; export NLS_DATE_FORMAT
TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN
PATH=.{JAVA_HOME}/bin{PATH}HOME/binORACLE_HOME/bin
PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
PATH=${PATH}:/u01/app/common/oracle/bin
export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}ORACLE_HOME/oracm/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE
CLASSPATH=${CLASSPATH}ORACLE_HOME/jlib
CLASSPATH=${CLASSPATH}ORACLE_HOME/rdbms/jlib
CLASSPATH=${CLASSPATH}ORACLE_HOME/network/jlib
export CLASSPATH
THREADS_FLAG=native; export THREADS_FLAG
export TEMP=/tmp
export TMPDIR=/tmp
# ---------------------------------------------------
# UMASK
# ---------------------------------------------------
# Set the default file mode creation mask
# (umask) to 022 to ensure that the user performing
# the Oracle software installation creates files
# with 644 permissions.
# ---------------------------------------------------
umask 022
[oracle@dg2 ~]$source .bash_profile
[oracle@dg2 ~]$ echo $GGHOME
/u01/app/ogg
创建goldengate 安装目录,并调整权限
[oracle@dg2 ~]$ mkdir -p /u01/app/ogg
[oracle@dg2 ~]$ #### upload goldengate 12.2.0.1.1 soft V100692-01.zip to /u01/app/ogg directory
[oracle@dg2 ~]$
上传goldengate软件并安装截图参考同级截图文件夹
[oracle@dg2 ~]$ cd /u01/app/ogg
[oracle@dg2 ogg]$ ls -l
total 464468
-rw-r--r--. 1 root root 475611228 Feb 3 2016 V100692-01.zip
[oracle@dg2 ogg]$ unzip V100692-01.zip
Archive: V100692-01.zip
creating: fbo_ggs_Linux_x64_shiphome/
creating: fbo_ggs_Linux_x64_shiphome/Disk1/
inflating: fbo_ggs_Linux_x64_shiphome/Disk1/runInstaller
creating: fbo_ggs_Linux_x64_shiphome/Disk1/stage/
......中间内容略...........
inflating: OGG-12.2.0.1-README.txt
inflating: OGG-12.2.0.1.1-ReleaseNotes.pdf
[oracle@dg2 ogg]$ ls -l
total 464752
drwxr-xr-x. 3 oracle oinstall 4096 Dec 12 2015 fbo_ggs_Linux_x64_shiphome
-rw-r--r--. 1 oracle oinstall 282294 Jan 18 2016 OGG-12.2.0.1.1-ReleaseNotes.pdf
-rw-r--r--. 1 oracle oinstall 1559 Jan 18 2016 OGG-12.2.0.1-README.txt
-rw-r--r--. 1 root root 475611228 Feb 3 2016 V100692-01.zip
[oracle@dg2 ogg]$ pwd
/u01/app/ogg
[oracle@dg2 ogg]$ pwd
/u01/app/ogg
[oracle@dg2 ogg]$ cd
[oracle@dg2 ~]$ exit
logout
[root@dg2 ~]# export DISPLAY=192.168.1.1:0.0
[root@dg2 ~]# xhost +
access control disabled, clients can connect from any host
[root@dg2 ~]# su - oracle
[oracle@dg2 ~]$ xhost +
access control disabled, clients can connect from any host
[oracle@dg2 ~]$
[oracle@dg2 ~]$
[oracle@dg2 ~]$
[oracle@dg2 ~]$
[oracle@dg2 ~]$
[oracle@dg2 ~]$
[oracle@dg2 ~]$ cd $GGHOME
[oracle@dg2 ogg]$ ls
fbo_ggs_Linux_x64_shiphome OGG-12.2.0.1.1-ReleaseNotes.pdf OGG-12.2.0.1-README.txt V100692-01.zip
[oracle@dg2 ogg]$ cd fbo_ggs_Linux_x64_shiphome/
[oracle@dg2 fbo_ggs_Linux_x64_shiphome]$ pwd
/u01/app/ogg/fbo_ggs_Linux_x64_shiphome
[oracle@dg2 fbo_ggs_Linux_x64_shiphome]$ ls -l
total 4
drwxr-xr-x. 5 oracle oinstall 4096 Dec 12 2015 Disk1
[oracle@dg2 fbo_ggs_Linux_x64_shiphome]$ cd Disk1/
[oracle@dg2 Disk1]$ pwd
/u01/app/ogg/fbo_ggs_Linux_x64_shiphome/Disk1
[oracle@dg2 Disk1]$ ls -l
total 16
drwxr-xr-x. 4 oracle oinstall 4096 Dec 12 2015 install
drwxrwxr-x. 2 oracle oinstall 4096 Dec 12 2015 response
-rwxr-xr-x. 1 oracle oinstall 918 Dec 12 2015 runInstaller
drwxr-xr-x. 11 oracle oinstall 4096 Dec 12 2015 stage
[oracle@dg2 Disk1]$ ./runInstaller
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB. Actual 23871 MB Passed
Checking swap space: must be greater than 150 MB. Actual 1999 MB Passed
Checking monitor: must be configured to display at least 256 colors
>>> Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLAY variable is set. Failed <<<<
Some requirement checks failed. You must fulfill these requirements before
continuing with the installation,
Continue? (y/n) [n] y
>>> Ignoring required pre-requisite failures. Continuing...
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2017-10-11_09-15-48AM. Please wait ...[oracle@dg2 Disk1]$ You can find the log of this install session at:
/u01/app/oraInventory/logs/installActions2017-10-11_09-15-48AM.log
[oracle@dg2 Disk1]$
[oracle@dg2 Disk1]$
[oracle@dg2 Disk1]$
[oracle@dg2 Disk1]$ #OUI install capture picture reference another file
[oracle@dg2 Disk1]$
[oracle@dg2 Disk1]$
5. 登录ggsci确认mgr进程状态及参数并创建相关目录
[oracle@dg2 Disk1]$ cd $GGHOME
[oracle@dg2 ogg]$ ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 12.2.0.1.1 OGGCORE_12.2.0.1.0_PLATFORMS_151211.1401_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Dec 12 2015 00:54:38
Operating system character set identified as UTF-8.
Copyright (C) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
GGSCI (dg2) 1> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
GGSCI (dg2) 2> view params mgr
PORT 7809
GGSCI (dg2) 3> exit
[oracle@dg2 ogg]$ ls -l | grep dir*
[oracle@dg2 ogg]$ ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 12.2.0.1.1 OGGCORE_12.2.0.1.0_PLATFORMS_151211.1401_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Dec 12 2015 00:54:38
Operating system character set identified as UTF-8.
Copyright (C) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
GGSCI (dg2) 1> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
GGSCI (dg2) 2> create subdirs
Creating subdirectories under current directory /u01/app/ogg
Parameter files /u01/app/ogg/dirprm: already exists
Report files /u01/app/ogg/dirrpt: already exists
Checkpoint files /u01/app/ogg/dirchk: already exists
Process status files /u01/app/ogg/dirpcs: already exists
SQL script files /u01/app/ogg/dirsql: already exists
Database definitions files /u01/app/ogg/dirdef: already exists
Extract data files /u01/app/ogg/dirdat: already exists
Temporary files /u01/app/ogg/dirtmp: already exists
Credential store files /u01/app/ogg/dircrd: already exists
Masterkey wallet files /u01/app/ogg/dirwlt: already exists
Dump files /u01/app/ogg/dirdmp: already exists
GGSCI (dg2) 4> exit
6.调整位于dg1上的数据库实例orcl配置使其满足goldengate 软件需求,这里为sqlplus 连接串连接至源端数据库:
[oracle@dg2 ogg]$
[oracle@dg2 ogg]$
[oracle@dg2 ogg]$ ######source database orcl modify ,sqlplus remote connect to orcl
[oracle@dg2 ogg]$ tnsping orcl
TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 11-OCT-2017 09:23:02
Copyright (c) 1997, 2013, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = dg1)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = orcl)))
OK (0 msec)
[oracle@dg2 ogg]$
[oracle@dg2 ogg]$
[oracle@dg2 ogg]$
[oracle@dg2 ogg]$
[oracle@dg2 ogg]$ sqlplus system/oracle@orcl
SQL*Plus: Release 11.2.0.4.0 Production on Wed Oct 11 09:23:18 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
ERROR:
ORA-28002: the password will expire within 7 days
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>
SQL>
SQL> archive log list;
ORA-01031: insufficient privileges
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@dg2 ogg]$ sqlplus sys/oracle@orcl as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Wed Oct 11 09:23:45 2017
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 Archive Mode
Automatic archival Enabled
Archive destination /u01/app/oracle/arch/
Oldest online log sequence 7
Next log sequence to archive 9
Current log sequence 9
SQL>
SQL>
SQL> desc v$instance;
Name Null? Type
----------------------------------------- -------- ----------------------------
INSTANCE_NUMBER NUMBER
INSTANCE_NAME VARCHAR2(16)
HOST_NAME VARCHAR2(64)
VERSION VARCHAR2(17)
STARTUP_TIME DATE
STATUS VARCHAR2(12)
PARALLEL VARCHAR2(3)
THREAD# NUMBER
ARCHIVER VARCHAR2(7)
LOG_SWITCH_WAIT VARCHAR2(15)
LOGINS VARCHAR2(10)
SHUTDOWN_PENDING VARCHAR2(3)
DATABASE_STATUS VARCHAR2(17)
INSTANCE_ROLE VARCHAR2(18)
ACTIVE_STATE VARCHAR2(9)
BLOCKED VARCHAR2(3)
1* select host_name,instance_name from v$instance
SQL> /
HOST_NAME INSTANCE_NAME
-------------------- ----------------
dg1 orcl
SQL>
SQL>
SQL>
SQL> select username from dba_users;
USERNAME
------------------------------
SCOTT
SQL>
SQL>
SQL>
SQL> 这里选择样例用户scott为复制测试用户
SQL>
SQL> select log_mode,force_logging from v$database;
LOG_MODE FOR
------------ ---
ARCHIVELOG NO
SQL> alter database force logging;
Database altered.
SQL> select force_logging from v$database;
FOR
---
YES
SQL> alter database add supplemental log data;
Database altered.
SQL> select log_mode,force_logging from v$database;
LOG_MODE FOR
------------ ---
ARCHIVELOG YES
SQL> alter system switch logfile;
System altered.
SQL> show parameter goldengate
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
enable_goldengate_replication boolean FALSE
SQL> alter system set enable_goldengate_replication = true;
System altered.
SQL> show parameter enable_goldengate_replication
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
enable_goldengate_replication boolean TRUE
SQL>
SQL>
SQL>
7.源端数据库创建goldengate管理用户ogg:
SQL> create user ogg identified by oracle account unlock;
User created.
SQL> grant resource,dba,connect to ogg identified by oracle;
Grant succeeded.
SQL> exec dbms_streams_auth.grant_admin_privilege('ogg');
PL/SQL procedure successfully completed.
SQL> grant become user to ogg;
Grant succeeded.
SQL> exit
8.开启复制用户相关表的表级别附加日志
[oracle@dg2 admin]$ cd $GGHOME
[oracle@dg2 ogg]$ ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 12.2.0.1.1 OGGCORE_12.2.0.1.0_PLATFORMS_151211.1401_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Dec 12 2015 00:54:38
Operating system character set identified as UTF-8.
Copyright (C) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
GGSCI (dg2) 1> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
GGSCI (dg2) 2> dblogin userid ogg@orcl,password oracle
Successfully logged into database.
GGSCI (dg2 as ogg@orcl) 3> add trandata scott.*
2017-10-11 11:21:14 WARNING OGG-06439 No unique key is defined for table BONUS. All viable columns will be used to represent the key, but may not guarantee uniqueness. KEYCOLS may be used to define the key.
Logging of supplemental redo data enabled for table SCOTT.BONUS.
TRANDATA for scheduling columns has been added on table 'SCOTT.BONUS'.
TRANDATA for instantiation CSN has been added on table 'SCOTT.BONUS'.
Logging of supplemental redo data enabled for table SCOTT.DEPT.
TRANDATA for scheduling columns has been added on table 'SCOTT.DEPT'.
TRANDATA for instantiation CSN has been added on table 'SCOTT.DEPT'.
Logging of supplemental redo data enabled for table SCOTT.EMP.
TRANDATA for scheduling columns has been added on table 'SCOTT.EMP'.
TRANDATA for instantiation CSN has been added on table 'SCOTT.EMP'.
2017-10-11 11:21:14 WARNING OGG-06439 No unique key is defined for table SALGRADE. All viable columns will be used to represent the key, but may not guarantee uniqueness. KEYCOLS may be used to define the key.
Logging of supplemental redo data enabled for table SCOTT.SALGRADE.
TRANDATA for scheduling columns has been added on table 'SCOTT.SALGRADE'.
TRANDATA for instantiation CSN has been added on table 'SCOTT.SALGRADE'.
GGSCI (dg2 as ogg@orcl) 4>
GGSCI (dg2 as ogg@orcl) 4>
GGSCI (dg2 as ogg@orcl) 4>
GGSCI (dg2 as ogg@orcl) 4>
GGSCI (dg2 as ogg@orcl) 4>
GGSCI (dg2 as ogg@orcl) 4> info trandata scott.*
Logging of supplemental redo log data is enabled for table SCOTT.BONUS.
Columns supplementally logged for table SCOTT.BONUS: COMM, ENAME, JOB, SAL.
Prepared CSN for table SCOTT.BONUS: 1017688
Logging of supplemental redo log data is enabled for table SCOTT.DEPT.
Columns supplementally logged for table SCOTT.DEPT: DEPTNO.
Prepared CSN for table SCOTT.DEPT: 1017730
Logging of supplemental redo log data is enabled for table SCOTT.EMP.
Columns supplementally logged for table SCOTT.EMP: EMPNO.
Prepared CSN for table SCOTT.EMP: 1017772
Logging of supplemental redo log data is enabled for table SCOTT.SALGRADE.
Columns supplementally logged for table SCOTT.SALGRADE: GRADE, HISAL, LOSAL.
Prepared CSN for table SCOTT.SALGRADE: 1017814
GGSCI (dg2 as ogg@orcl) 5>
GGSCI (dg2 as ogg@orcl) 5>
GGSCI (dg2 as ogg@orcl) 5>
GGSCI (dg2 as ogg@orcl) 5>
GGSCI (dg2 as ogg@orcl) 5>
GGSCI (dg2 as ogg@orcl) 5>
9. 配置ALO抽取进程:
GGSCI (dg2 as ogg@orcl) 5> edit params ext_alo
GGSCI (dg2 as ogg@orcl) 8> view params ext_alo
extract EXT_ALO
SETENV (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)
USERID ogg@orcl, PASSWORD oracle
discardfile ./dirrpt/EXT_ALO.dsc, purge, megabytes 200
statoptions reportfetch
exTTRAIL ./dirdat/lt
TRANLOGOPTIONS ARCHIVEDLOGONLY
TRANLOGOPTIONS ALTARCHIVEDLOGFORMAT %t_%s_%r.dbf
TRANLOGOPTIONS ALTARCHIVELOGDEST primary /u02/app/oracle/arch
table SCOTT.*;
GGSCI (dg2 as ogg@orcl) 9>
GGSCI (dg2 as ogg@orcl) 9>
GGSCI (dg2 as ogg@orcl) 9>
GGSCI (dg2 as ogg@orcl) 9>
GGSCI (dg2 as ogg@orcl) 21> ADD EXTRACT EXT_ALO, TRANLOG, BEGIN NOW
EXTRACT added.
GGSCI (dg2 as ogg@orcl) 22> add exttrail ./dirdat/lt,extract ext_alo,megabytes 5
EXTTRAIL added.
GGSCI (dg2 as ogg@orcl) 23> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EXT1 00:00:00 00:00:06
EXTRACT STOPPED EXT_ALO 00:00:00 00:00:12
GGSCI (dg2 as ogg@orcl) 24> info ext_alo
EXTRACT EXT_ALO Initialized 2017-10-11 11:29 Status STOPPED
Checkpoint Lag 00:00:00 (updated 00:00:17 ago)
Log Read Checkpoint Oracle Redo Logs
2017-10-11 11:29:01 Thread 1, Seqno 0, RBA 0
SCN 0.0 (0)
GGSCI (dg2 as ogg@orcl) 25> start ext_alo
Sending START request to MANAGER ...
EXTRACT EXT_ALO starting
GGSCI (dg2 as ogg@orcl) 26> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EXT1 00:00:00 00:00:06
EXTRACT STOPPED EXT_ALO 00:00:00 00:00:23
GGSCI (dg2 as ogg@orcl) 27> view report ext_alo
***********************************************************************
Oracle GoldenGate Capture for Oracle
Version 12.2.0.1.1 OGGCORE_12.2.0.1.0_PLATFORMS_151211.1401_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Dec 12 2015 01:10:08
Copyright (C) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
Starting at 2017-10-11 11:29:23
***********************************************************************
Operating System Version:
Linux
Version #1 SMP Tue Jan 29 11:47:41 EST 2013, Release 2.6.32-358.el6.x86_64
Node: dg2
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: 11277
Description:
***********************************************************************
** Running with the following parameters **
***********************************************************************
2017-10-11 11:29:23 INFO OGG-03059 Operating system character set identified as US-ASCII.
2017-10-11 11:29:23 INFO OGG-02695 ANSI SQL parameter syntax is used for parameter parsing.
2017-10-11 11:29:23 INFO OGG-02095 Successfully set environment variable NLS_LANG=AMERICAN_AMERICA.ZHS16GBK.
extract EXT_ALO
SETENV (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)
USERID ogg@orcl, PASSWORD oracle
discardfile ./dirrpt/EXT_ALO.dsc, purge, megabytes 200
statoptions reportfetch
exTTRAIL ./dirdat/lt
TRANLOGOPTIONS ARCHIVEDLOGONLY
TRANLOGOPTIONS ALTARCHIVEDLOGFORMAT %t_%s_%r.dbf
TRANLOGOPTIONS ALTARCHIVELOGDEST primary /u02/app/oracle/arch
table SCOTT.*
Source Context :
SourceModule : [ggparam.util]
SourceID : [/scratch/aime/adestore/views/aime_adc4150408/oggcore/OpenSys/src/gglib/ggparam/paramutil.cpp]
SourceFunction : [generate_msg]
SourceLine : [759]
ThreadBacktrace : [14] elements
: [/u01/app/ogg/libgglog.so(CMessageContext::AddThreadContext()+0x1b) [0x7f1ca6437f1b]]
: [/u01/app/ogg/libgglog.so(CMessageFactory::CreateMessage(CSourceContext*, unsigned int, ...)+0x134) [0x7f1ca64320a4]]
: [/u01/app/ogg/libgglog.so(_MSG_ERR_GGPARAM_SYNTAX_ERROR(CSourceContext*, char const*, unsigned int, unsigned int, char const*, CMessageFactory::M
essageDisposition)+0x4e) [0x7f1ca63f6495]]
: [/u01/app/ogg/libggparam.so(ggs::ggparam::error::generate_msg(unsigned long)+0x5c5) [0x7f1ca6c5646d]]
: [/u01/app/ogg/libggparam.so(ggs::ggparam::error::issue(bool)+0x90) [0x7f1ca6c54bf0]]
: [/u01/app/ogg/libggparam.so(ggs::ggparam::dict::read(ggs::ggparam::config, char const*, bool, bool, bool)+0x643) [0x7f1ca6c4dd33]]
: [/u01/app/ogg/extract(get_infile_params(time_elt_def*, time_elt_def*, char**, ggs::gglib::ggdatasource:ataSourceParams&, ggs::Heartbeat::MapGen
eratorParams&)+0x1ff) [0x5c098f]]
: [/u01/app/ogg/extract() [0x5f39ca]]
: [/u01/app/ogg/extract(ggs::gglib::MultiThreading::MainThread::ExecMain()+0x60) [0x6d05b0]]
: [/u01/app/ogg/extract(ggs::gglib::MultiThreading::Thread::RunThread(ggs::gglib::MultiThreading::Thread::ThreadArgs*)+0x14d) [0x6d179d]]
: [/u01/app/ogg/extract(ggs::gglib::MultiThreading::MainThread::Run(int, char**)+0xb1) [0x6d1881]]
: [/u01/app/ogg/extract(main+0x3b) [0x5f50eb]]
: [/lib64/libc.so.6(__libc_start_main+0xfd) [0x33e281ecdd]]
: [/u01/app/ogg/extract() [0x563159]]
2017-10-11 11:29:23 ERROR OGG-10141 (ext_alo.prm) line 8 column 37: Parsing error, value "'%'" syntax error.
Source Context :
SourceModule : [ggparam.util]
SourceID : [/scratch/aime/adestore/views/aime_adc4150408/oggcore/OpenSys/src/gglib/ggparam/paramutil.cpp]
SourceFunction : [generate_msg]
SourceLine : [829]
ThreadBacktrace : [14] elements
: [/u01/app/ogg/libgglog.so(CMessageContext::AddThreadContext()+0x1b) [0x7f1ca6437f1b]]
: [/u01/app/ogg/libgglog.so(CMessageFactory::CreateMessage(CSourceContext*, unsigned int, ...)+0x134) [0x7f1ca64320a4]]
: [/u01/app/ogg/libgglog.so(_MSG_ERR_GGPARAM_MISSING_OPT_VALUE(CSourceContext*, char const*, unsigned int, char const*, char const*, CMessageFactor
y::MessageDisposition)+0x4e) [0x7f1ca63f6242]]
: [/u01/app/ogg/libggparam.so(ggs::ggparam::error::generate_msg(unsigned long)+0xb70) [0x7f1ca6c56a18]]
: [/u01/app/ogg/libggparam.so(ggs::ggparam::error::issue(bool)+0x90) [0x7f1ca6c54bf0]]
: [/u01/app/ogg/libggparam.so(ggs::ggparam::dict::read(ggs::ggparam::config, char const*, bool, bool, bool)+0x643) [0x7f1ca6c4dd33]]
: [/u01/app/ogg/extract(get_infile_params(time_elt_def*, time_elt_def*, char**, ggs::gglib::ggdatasource:ataSourceParams&, ggs::Heartbeat::MapGen
eratorParams&)+0x1ff) [0x5c098f]]
: [/u01/app/ogg/extract() [0x5f39ca]]
: [/u01/app/ogg/extract(ggs::gglib::MultiThreading::MainThread::ExecMain()+0x60) [0x6d05b0]]
: [/u01/app/ogg/extract(ggs::gglib::MultiThreading::Thread::RunThread(ggs::gglib::MultiThreading::Thread::ThreadArgs*)+0x14d) [0x6d179d]]
: [/u01/app/ogg/extract(ggs::gglib::MultiThreading::MainThread::Run(int, char**)+0xb1) [0x6d1881]]
: [/u01/app/ogg/extract(main+0x3b) [0x5f50eb]]
: [/lib64/libc.so.6(__libc_start_main+0xfd) [0x33e281ecdd]]
: [/u01/app/ogg/extract() [0x563159]]
2017-10-11 11:29:23 ERROR OGG-10149 (ext_alo.prm) line 8: Parsing error, option [altarchivedlogformat] for parameter [tranlogoptions] is missing a required value.
2017-10-11 11:29:23 ERROR OGG-01668 PROCESS ABENDING.
备注:
TRANLOGOPTIONS ALTARCHIVEDLOGFORMAT %t_%s_%r.dbf 调整为 "%t_%s_%r.dbf"后启动RUNNING但是extrba not move,怀疑是bug,调整为非%开头格式测试则可以,但官方文档
上并未说明此问题,仍是上面的%t_%s_%r.dbf格式
[oracle@dg2 ogg]$ sqlplus sys/oracle@orcl as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Wed Oct 11 13:17:38 2017
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> show parameter log_for
SQL> show parameter log_
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
audit_syslog_level string
commit_logging string
db_create_online_log_dest_1 string
db_create_online_log_dest_2 string
db_create_online_log_dest_3 string
db_create_online_log_dest_4 string
db_create_online_log_dest_5 string
enable_ddl_logging boolean FALSE
log_archive_config string
log_archive_dest string
log_archive_dest_1 string location=/u01/app/oracle/arch/
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_10 string
log_archive_dest_11 string
log_archive_dest_12 string
log_archive_dest_13 string
log_archive_dest_14 string
log_archive_dest_15 string
log_archive_dest_16 string
log_archive_dest_17 string
log_archive_dest_18 string
log_archive_dest_19 string
log_archive_dest_2 string
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_20 string
log_archive_dest_21 string
log_archive_dest_22 string
log_archive_dest_23 string
log_archive_dest_24 string
log_archive_dest_25 string
log_archive_dest_26 string
log_archive_dest_27 string
log_archive_dest_28 string
log_archive_dest_29 string
log_archive_dest_3 string
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_30 string
log_archive_dest_31 string
log_archive_dest_4 string
log_archive_dest_5 string
log_archive_dest_6 string
log_archive_dest_7 string
log_archive_dest_8 string
log_archive_dest_9 string
log_archive_dest_state_1 string enable
log_archive_dest_state_10 string enable
log_archive_dest_state_11 string enable
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_state_12 string enable
log_archive_dest_state_13 string enable
log_archive_dest_state_14 string enable
log_archive_dest_state_15 string enable
log_archive_dest_state_16 string enable
log_archive_dest_state_17 string enable
log_archive_dest_state_18 string enable
log_archive_dest_state_19 string enable
log_archive_dest_state_2 string enable
log_archive_dest_state_20 string enable
log_archive_dest_state_21 string enable
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_state_22 string enable
log_archive_dest_state_23 string enable
log_archive_dest_state_24 string enable
log_archive_dest_state_25 string enable
log_archive_dest_state_26 string enable
log_archive_dest_state_27 string enable
log_archive_dest_state_28 string enable
log_archive_dest_state_29 string enable
log_archive_dest_state_3 string enable
log_archive_dest_state_30 string enable
log_archive_dest_state_31 string enable
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_state_4 string enable
log_archive_dest_state_5 string enable
log_archive_dest_state_6 string enable
log_archive_dest_state_7 string enable
log_archive_dest_state_8 string enable
log_archive_dest_state_9 string enable
log_archive_duplex_dest string
log_archive_format string %t_%s_%r.dbf
log_archive_local_first boolean TRUE
log_archive_max_processes integer 4
log_archive_min_succeed_dest integer 1
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_start boolean FALSE
log_archive_trace integer 0
log_buffer integer 6995968
log_checkpoint_interval integer 0
log_checkpoint_timeout integer 1800
log_checkpoints_to_alert boolean FALSE
log_file_name_convert string
remote_login_passwordfile string EXCLUSIVE
sec_case_sensitive_logon boolean TRUE
sec_max_failed_login_attempts integer 10
SQL> alter system set log_archive_format='test_%t_%s_%r.dbf';
alter system set log_archive_format='test_%t_%s_%r.dbf'
*
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modified
SQL> alter system set log_archive_format='test_%t_%s_%r.dbf' scope=spfile;
System altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 1603411968 bytes
Fixed Size 2253664 bytes
Variable Size 1006636192 bytes
Database Buffers 587202560 bytes
Redo Buffers 7319552 bytes
Database mounted.
Database opened.
SQL> show parameter log
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
audit_syslog_level string
commit_logging string
db_create_online_log_dest_1 string
db_create_online_log_dest_2 string
db_create_online_log_dest_3 string
db_create_online_log_dest_4 string
db_create_online_log_dest_5 string
enable_ddl_logging boolean FALSE
log_archive_config string
log_archive_dest string
log_archive_dest_1 string location=/u01/app/oracle/arch/
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_10 string
log_archive_dest_11 string
log_archive_dest_12 string
log_archive_dest_13 string
log_archive_dest_14 string
log_archive_dest_15 string
log_archive_dest_16 string
log_archive_dest_17 string
log_archive_dest_18 string
log_archive_dest_19 string
log_archive_dest_2 string
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_20 string
log_archive_dest_21 string
log_archive_dest_22 string
log_archive_dest_23 string
log_archive_dest_24 string
log_archive_dest_25 string
log_archive_dest_26 string
log_archive_dest_27 string
log_archive_dest_28 string
log_archive_dest_29 string
log_archive_dest_3 string
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_30 string
log_archive_dest_31 string
log_archive_dest_4 string
log_archive_dest_5 string
log_archive_dest_6 string
log_archive_dest_7 string
log_archive_dest_8 string
log_archive_dest_9 string
log_archive_dest_state_1 string enable
log_archive_dest_state_10 string enable
log_archive_dest_state_11 string enable
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_state_12 string enable
log_archive_dest_state_13 string enable
log_archive_dest_state_14 string enable
log_archive_dest_state_15 string enable
log_archive_dest_state_16 string enable
log_archive_dest_state_17 string enable
log_archive_dest_state_18 string enable
log_archive_dest_state_19 string enable
log_archive_dest_state_2 string enable
log_archive_dest_state_20 string enable
log_archive_dest_state_21 string enable
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_state_22 string enable
log_archive_dest_state_23 string enable
log_archive_dest_state_24 string enable
log_archive_dest_state_25 string enable
log_archive_dest_state_26 string enable
log_archive_dest_state_27 string enable
log_archive_dest_state_28 string enable
log_archive_dest_state_29 string enable
log_archive_dest_state_3 string enable
log_archive_dest_state_30 string enable
log_archive_dest_state_31 string enable
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_state_4 string enable
log_archive_dest_state_5 string enable
log_archive_dest_state_6 string enable
log_archive_dest_state_7 string enable
log_archive_dest_state_8 string enable
log_archive_dest_state_9 string enable
log_archive_duplex_dest string
log_archive_format string test_%t_%s_%r.dbf
log_archive_local_first boolean TRUE
log_archive_max_processes integer 4
log_archive_min_succeed_dest integer 1
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_start boolean FALSE
log_archive_trace integer 0
log_buffer integer 6995968
log_checkpoint_interval integer 0
log_checkpoint_timeout integer 1800
log_checkpoints_to_alert boolean FALSE
log_file_name_convert string
remote_login_passwordfile string EXCLUSIVE
sec_case_sensitive_logon boolean TRUE
sec_max_failed_login_attempts integer 10
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@dg2 ogg]$ ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 12.2.0.1.1 OGGCORE_12.2.0.1.0_PLATFORMS_151211.1401_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Dec 12 2015 00:54:38
Operating system character set identified as UTF-8.
Copyright (C) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
GGSCI (dg2) 1> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT ABENDED EXT1 00:00:00 00:01:04
EXTRACT STOPPED EXT_ALO 00:00:00 00:21:17
GGSCI (dg2) 2> start ext1
Sending START request to MANAGER ...
EXTRACT EXT1 starting
GGSCI (dg2) 3> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EXT1 00:00:00 00:00:01
EXTRACT STOPPED EXT_ALO 00:00:00 00:21:24
GGSCI (dg2) 4> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EXT1 00:00:00 00:00:08
EXTRACT STOPPED EXT_ALO 00:00:00 00:21:41
GGSCI (dg2) 5> view params ext1
EXTRACT ext1
EXTTRAIL ./dirdat/er
userid ogg@orcl, password oracle
WILDCARDRESOLVE DYNAMIC
DYNAMICRESOLUTION
TRANLOGOPTIONS LOGSOURCE LINUX, PATHMAP /u01/app/oracle/oradata/orcl /u02/app/oracle/oradata/orcl
--TRANLOGOPTIONS LOGSOURCE LINUX, PATHMAP /u01/app/oracle/oradata/orcl /u02/app/oracle/oradata/orcl1 PATHMAP /u01/app/oracle/arch /u02/app/oracle/arch
TRANLOGOPTIONS ALTARCHIVELOGDEST /u02/app/oracle/arch
table hr.*;
GGSCI (dg2) 6>
GGSCI (dg2) 6>
GGSCI (dg2) 6> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EXT1 00:00:00 00:00:00
EXTRACT STOPPED EXT_ALO 00:00:00 00:21:56
GGSCI (dg2) 7> start ext_alo
Sending START request to MANAGER ...
EXTRACT EXT_ALO starting
GGSCI (dg2) 8> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EXT1 00:00:00 00:00:09
EXTRACT STOPPED EXT_ALO 00:00:00 00:22:05
GGSCI (dg2) 9> view params ext_alo
EXTRACT ext_alo
setenv (ORACLE_SID=orcl)
EXTTRAIL ./dirdat/lr
userid ogg@orcl, password oracle
--WILDCARDRESOLVE DYNAMICDYNAMICRESOLUTION
TRANLOGOPTIONS ARCHIVEDLOGONLY
TRANLOGOPTIONS ALTARCHIVELOGDEST PRIMARY /u02/app/oracle/arch
TRANLOGOPTIONS ALTARCHIVEDLOGFORMAT %t_%s_%r.dbf
FETCHOPTIONS, NOUSESNAPSHOT, NOUSELATESTVERSION, MISSINGROW REPORT
STATOPTIONS REPORTFETCH
table scott.*;
GGSCI (dg2) 10> view report ext_alo
***********************************************************************
Oracle GoldenGate Capture for Oracle
Version 12.2.0.1.1 OGGCORE_12.2.0.1.0_PLATFORMS_151211.1401_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Dec 12 2015 01:10:08
Copyright (C) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
Starting at 2017-10-11 13:22:15
***********************************************************************
Operating System Version:
Linux
Version #1 SMP Tue Jan 29 11:47:41 EST 2013, Release 2.6.32-358.el6.x86_64
Node: dg2
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: 13609
Description:
***********************************************************************
** Running with the following parameters **
***********************************************************************
2017-10-11 13:22:15 INFO OGG-03059 Operating system character set identified as US-ASCII.
2017-10-11 13:22:15 INFO OGG-02695 ANSI SQL parameter syntax is used for parameter parsing.
2017-10-11 13:22:15 INFO OGG-02095 Successfully set environment variable ORACLE_SID=orcl.
EXTRACT ext_alo
setenv (ORACLE_SID=orcl)
EXTTRAIL ./dirdat/lr
userid ogg@orcl, password oracle
TRANLOGOPTIONS ARCHIVEDLOGONLY
TRANLOGOPTIONS ALTARCHIVELOGDEST PRIMARY /u02/app/oracle/arch
TRANLOGOPTIONS ALTARCHIVEDLOGFORMAT %t_%s_%r.dbf
FETCHOPTIONS, NOUSESNAPSHOT, NOUSELATESTVERSION, MISSINGROW REPORT
STATOPTIONS REPORTFETCH
table scott.*
Source Context :
SourceModule : [ggparam.util]
SourceID : [/scratch/aime/adestore/views/aime_adc4150408/oggcore/OpenSys/src/gglib/ggparam/paramutil.cpp]
SourceFunction : [generate_msg]
SourceLine : [759]
ThreadBacktrace : [14] elements
: [/u01/app/ogg/libgglog.so(CMessageContext::AddThreadContext()+0x1b) [0x7f9f20616f1b]]
: [/u01/app/ogg/libgglog.so(CMessageFactory::CreateMessage(CSourceContext*, unsigned int, ...)+0x134) [0x7f9f206110a4]]
: [/u01/app/ogg/libgglog.so(_MSG_ERR_GGPARAM_SYNTAX_ERROR(CSourceContext*, char const*, unsigned int, unsigned int, char const*, CMessageFactory::MessageDisposition)+0x4e) [0x7f9f205d5495]
]
: [/u01/app/ogg/libggparam.so(ggs::ggparam::error::generate_msg(unsigned long)+0x5c5) [0x7f9f20e3546d]]
: [/u01/app/ogg/libggparam.so(ggs::ggparam::error::issue(bool)+0x90) [0x7f9f20e33bf0]]
: [/u01/app/ogg/libggparam.so(ggs::ggparam::dict::read(ggs::ggparam::config, char const*, bool, bool, bool)+0x643) [0x7f9f20e2cd33]]
: [/u01/app/ogg/extract(get_infile_params(time_elt_def*, time_elt_def*, char**, ggs::gglib::ggdatasource:ataSourceParams&, ggs::Heartbeat::MapGeneratorParams&)+0x1ff) [0x5c098f]]
: [/u01/app/ogg/extract() [0x5f39ca]]
: [/u01/app/ogg/extract(ggs::gglib::MultiThreading::MainThread::ExecMain()+0x60) [0x6d05b0]]
: [/u01/app/ogg/extract(ggs::gglib::MultiThreading::Thread::RunThread(ggs::gglib::MultiThreading::Thread::ThreadArgs*)+0x14d) [0x6d179d]]
: [/u01/app/ogg/extract(ggs::gglib::MultiThreading::MainThread::Run(int, char**)+0xb1) [0x6d1881]]
: [/u01/app/ogg/extract(main+0x3b) [0x5f50eb]]
: [/lib64/libc.so.6(__libc_start_main+0xfd) [0x33e281ecdd]]
: [/u01/app/ogg/extract() [0x563159]]
2017-10-11 13:22:15 ERROR OGG-10141 (ext_alo.prm) line 8 column 37: Parsing error, value "'%'" syntax error.
Source Context :
SourceModule : [ggparam.util]
SourceID : [/scratch/aime/adestore/views/aime_adc4150408/oggcore/OpenSys/src/gglib/ggparam/paramutil.cpp]
SourceFunction : [generate_msg]
SourceLine : [829]
ThreadBacktrace : [14] elements
: [/u01/app/ogg/libgglog.so(CMessageContext::AddThreadContext()+0x1b) [0x7f9f20616f1b]]
: [/u01/app/ogg/libgglog.so(CMessageFactory::CreateMessage(CSourceContext*, unsigned int, ...)+0x134) [0x7f9f206110a4]]
: [/u01/app/ogg/libgglog.so(_MSG_ERR_GGPARAM_MISSING_OPT_VALUE(CSourceContext*, char const*, unsigned int, char const*, char const*, CMessageFactory::MessageDisposition)+0x4e) [0x7f9f205d5
242]]
: [/u01/app/ogg/libggparam.so(ggs::ggparam::error::generate_msg(unsigned long)+0xb70) [0x7f9f20e35a18]]
: [/u01/app/ogg/libggparam.so(ggs::ggparam::error::issue(bool)+0x90) [0x7f9f20e33bf0]]
: [/u01/app/ogg/libggparam.so(ggs::ggparam::dict::read(ggs::ggparam::config, char const*, bool, bool, bool)+0x643) [0x7f9f20e2cd33]]
: [/u01/app/ogg/extract(get_infile_params(time_elt_def*, time_elt_def*, char**, ggs::gglib::ggdatasource:ataSourceParams&, ggs::Heartbeat::MapGeneratorParams&)+0x1ff) [0x5c098f]]
: [/u01/app/ogg/extract() [0x5f39ca]]
: [/u01/app/ogg/extract(ggs::gglib::MultiThreading::MainThread::ExecMain()+0x60) [0x6d05b0]]
: [/u01/app/ogg/extract(ggs::gglib::MultiThreading::Thread::RunThread(ggs::gglib::MultiThreading::Thread::ThreadArgs*)+0x14d) [0x6d179d]]
: [/u01/app/ogg/extract(ggs::gglib::MultiThreading::MainThread::Run(int, char**)+0xb1) [0x6d1881]]
: [/u01/app/ogg/extract(main+0x3b) [0x5f50eb]]
: [/lib64/libc.so.6(__libc_start_main+0xfd) [0x33e281ecdd]]
: [/u01/app/ogg/extract() [0x563159]]
2017-10-11 13:22:15 ERROR OGG-10149 (ext_alo.prm) line 8: Parsing error, option [altarchivedlogformat] for parameter [tranlogoptions] is missing a required value.
2017-10-11 13:22:15 ERROR OGG-01668 PROCESS ABENDING.
GGSCI (dg2) 11> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EXT1 00:00:00 00:00:10
EXTRACT STOPPED EXT_ALO 00:00:00 00:22:49
GGSCI (dg2) 13> view params ext_alo
EXTRACT ext_alo
setenv (ORACLE_SID=orcl)
EXTTRAIL ./dirdat/lr
userid ogg@orcl, password oracle
--WILDCARDRESOLVE DYNAMICDYNAMICRESOLUTION
TRANLOGOPTIONS ARCHIVEDLOGONLY
TRANLOGOPTIONS ALTARCHIVELOGDEST PRIMARY /u02/app/oracle/arch
TRANLOGOPTIONS ALTARCHIVEDLOGFORMAT test_%t_%s_%r.dbf
FETCHOPTIONS, NOUSESNAPSHOT, NOUSELATESTVERSION, MISSINGROW REPORT
STATOPTIONS REPORTFETCH
table scott.*;
GGSCI (dg2) 14> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EXT1 00:00:00 00:00:09
EXTRACT STOPPED EXT_ALO 00:00:00 00:23:42
GGSCI (dg2) 15> start ext_alo
Sending START request to MANAGER ...
EXTRACT EXT_ALO starting
GGSCI (dg2) 16> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EXT1 00:00:00 00:00:04
EXTRACT STOPPED EXT_ALO 00:00:00 00:24:30
GGSCI (dg2) 17> view report ext_alo
***********************************************************************
Oracle GoldenGate Capture for Oracle
Version 12.2.0.1.1 OGGCORE_12.2.0.1.0_PLATFORMS_151211.1401_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Dec 12 2015 01:10:08
Copyright (C) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
Starting at 2017-10-11 13:24:01
***********************************************************************
Operating System Version:
Linux
Version #1 SMP Tue Jan 29 11:47:41 EST 2013, Release 2.6.32-358.el6.x86_64
Node: dg2
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: 13667
Description:
***********************************************************************
** Running with the following parameters **
***********************************************************************
2017-10-11 13:24:01 INFO OGG-03059 Operating system character set identified as US-ASCII.
2017-10-11 13:24:01 INFO OGG-02695 ANSI SQL parameter syntax is used for parameter parsing.
2017-10-11 13:24:01 INFO OGG-02095 Successfully set environment variable ORACLE_SID=orcl.
EXTRACT ext_alo
setenv (ORACLE_SID=orcl)
EXTTRAIL ./dirdat/lr
userid ogg@orcl, password ***
2017-10-11 13:24:01 INFO OGG-01971 The previous message, 'INFO OGG-02095', repeated 1 times.
2017-10-11 13:24:01 INFO OGG-03522 Setting session time zone to source database time zone 'GMT'.
TRANLOGOPTIONS ARCHIVEDLOGONLY
TRANLOGOPTIONS ALTARCHIVELOGDEST PRIMARY /u02/app/oracle/arch
TRANLOGOPTIONS ALTARCHIVEDLOGFORMAT test_%t_%s_%r.dbf
FETCHOPTIONS, NOUSESNAPSHOT, NOUSELATESTVERSION, MISSINGROW REPORT
STATOPTIONS REPORTFETCH
table scott.*;
2017-10-11 13:24:01 INFO OGG-01635 BOUNDED RECOVERY: reset to initial or altered checkpoint.
2017-10-11 13:24:01 INFO OGG-01815 Virtual Memory Facilities for: BR
anon alloc: mmap(MAP_ANON) anon free: munmap
file alloc: mmap(MAP_SHARED) file free: munmap
target directories:
/u01/app/ogg/BR/EXT_ALO.
Bounded Recovery Parameter:
BRINTERVAL = 4HOURS
BRDIR = /u01/app/ogg
2017-10-11 13:24:01 INFO OGG-01851 filecaching started: thread ID: 139816631867136.
2017-10-11 13:24:01 INFO OGG-01815 Virtual Memory Facilities for: COM
anon alloc: mmap(MAP_ANON) anon free: munmap
file alloc: mmap(MAP_SHARED) file free: munmap
target directories:
/u01/app/ogg/dirtmp.
CACHEMGR virtual memory values (may have been adjusted)
CACHEPAGEOUTSIZE (default): 8M
PROCESS VM AVAIL FROM OS (min): 128G
CACHESIZEMAX (strict force to disk): 96G
Database Version:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
CORE 11.2.0.4.0 Production
TNS for Linux: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production
Database Language and Character Set:
NLS_LANGUAGE = "AMERICAN"
NLS_TERRITORY = "AMERICA"
NLS_CHARACTERSET = "ZHS16GBK"
2017-10-11 13:24:01 WARNING OGG-01830 LOGRETENTION is disabled by default in ARCHIVEDLOGONLY mode.
2017-10-11 13:24:01 INFO OGG-02089 Source redo compatibility version is: 11.2.0.4.0.
2017-10-11 13:24:01 INFO OGG-01513 Positioning to Sequence 15, RBA 0, SCN 0.0 (0).
Source Context :
SourceModule : [gglib.ggdatasource.DataSource]
SourceID : [/scratch/aime/adestore/views/aime_adc4150408/oggcore/OpenSys/src/gglib/ggdatasource/DataSource.cpp]
SourceFunction : [establishStartPoint]
SourceLine : [175]
ThreadBacktrace : [11] elements
: [/u01/app/ogg/libgglog.so(CMessageContext::AddThreadContext()+0x1b) [0x7f29a22b6f1b]]
: [/u01/app/ogg/libgglog.so(CMessageFactory::CreateMessage(CSourceContext*, unsigned int, ...)+0x134) [0x7f29a22b10a4]]
: [/u01/app/ogg/libgglog.so(_MSG_ERR_CHECKPOINT_GENERIC(CSourceContext*, char const*, CMessageFactory::MessageDisposition)+0x30) [0x7f29a229e788]]
: [/u01/app/ogg/extract(ggs::gglib::ggdatasource:ataSource::establishStartPoint(time_elt_def&, time_elt_def&)+0xef) [0x883f9f]]
: [/u01/app/ogg/extract() [0x5f3c71]]
: [/u01/app/ogg/extract(ggs::gglib::MultiThreading::MainThread::ExecMain()+0x60) [0x6d05b0]]
: [/u01/app/ogg/extract(ggs::gglib::MultiThreading::Thread::RunThread(ggs::gglib::MultiThreading::Thread::ThreadArgs*)+0x14d) [0x6d179d]]
: [/u01/app/ogg/extract(ggs::gglib::MultiThreading::MainThread::Run(int, char**)+0xb1) [0x6d1881]]
: [/u01/app/ogg/extract(main+0x3b) [0x5f50eb]]
: [/lib64/libc.so.6(__libc_start_main+0xfd) [0x33e281ecdd]]
: [/u01/app/ogg/extract() [0x563159]]
2017-10-11 13:24:21 ERROR OGG-00446 Could not find archived log for sequence 15 thread 1 under alternative destinations. SQL <>. Last alternative log tried /u02/app/oracle/arch/test_1_15_887190070.dbf. Failed t
o open redo file /u02/app/oracle/arch/test_1_15_887190070.dbf for sequence 15 during initial positioning. Not able to establish initial position for sequence 15, rba 0.
2017-10-11 13:24:21 ERROR OGG-01668 PROCESS ABENDING.
备注:报错原因为调整参数log_archive_format 为 test_%t_%s_%r.dbf 格式后原有开始点的归档日志的名称不匹配现有格式参数,源端切换日志生产新格式的归档文件
GGSCI (dg2) 18> shell ls -l /u02/app/oracle/arch/
total 491732
-rwxrwxr-x. 1 oracle oinstall 39781888 Oct 11 10:31 1_10_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 4096 Oct 11 10:32 1_11_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 77312 Oct 11 10:32 1_12_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 35073024 Oct 11 10:35 1_13_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 1024 Oct 11 10:35 1_14_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 77312 Oct 11 10:35 1_15_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 302592 Oct 11 10:47 1_16_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 1024 Oct 11 10:47 1_17_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 50181632 Oct 11 10:50 1_18_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 50181632 Oct 11 10:50 1_19_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 50181632 Oct 11 10:50 1_20_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 50181632 Oct 11 10:50 1_21_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 50041856 Oct 11 10:50 1_22_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 50181632 Oct 11 10:50 1_23_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 50181632 Oct 11 10:50 1_24_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 12222976 Oct 11 10:51 1_25_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 69632 Oct 11 10:51 1_26_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 23040 Oct 11 10:51 1_27_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 2552320 Oct 11 11:31 1_28_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 1024 Oct 11 11:31 1_29_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 2048 Oct 11 11:32 1_30_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 1024 Oct 11 11:32 1_31_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 5632 Oct 11 11:32 1_32_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 1024 Oct 11 11:32 1_33_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 1536 Oct 11 11:32 1_34_887190070.dbf
-rw-r-----. 1 oracle oinstall 229888 Oct 11 11:46 1_35_887190070.dbf
-rw-r-----. 1 oracle oinstall 1024 Oct 11 11:46 1_36_887190070.dbf
-rw-r-----. 1 oracle oinstall 1536 Oct 11 11:46 1_37_887190070.dbf
-rw-r-----. 1 oracle oinstall 2239488 Oct 11 12:00 1_38_887190070.dbf
-rw-r-----. 1 oracle oinstall 1024 Oct 11 12:00 1_39_887190070.dbf
-rw-r-----. 1 oracle oinstall 245760 Oct 11 12:15 1_40_887190070.dbf
-rw-r-----. 1 oracle oinstall 1024 Oct 11 12:15 1_41_887190070.dbf
-rw-r-----. 1 oracle oinstall 1536 Oct 11 12:15 1_42_887190070.dbf
-rw-r-----. 1 oracle oinstall 121344 Oct 11 12:38 1_43_887190070.dbf
-rw-r-----. 1 oracle oinstall 1024 Oct 11 12:38 1_44_887190070.dbf
-rw-r-----. 1 oracle oinstall 15360 Oct 11 12:39 1_45_887190070.dbf
-rw-r-----. 1 oracle oinstall 1536 Oct 11 12:39 1_46_887190070.dbf
-rw-r-----. 1 oracle oinstall 1536 Oct 11 12:39 1_47_887190070.dbf
-rw-r-----. 1 oracle oinstall 19968 Oct 11 12:43 1_48_887190070.dbf
-rw-r-----. 1 oracle oinstall 1024 Oct 11 12:44 1_49_887190070.dbf
-rw-r-----. 1 oracle oinstall 1536 Oct 11 12:44 1_50_887190070.dbf
-rw-r-----. 1 oracle oinstall 1024 Oct 11 12:44 1_51_887190070.dbf
-rw-r-----. 1 oracle oinstall 220160 Oct 11 12:51 1_52_887190070.dbf
-rw-r-----. 1 oracle oinstall 1024 Oct 11 12:51 1_53_887190070.dbf
-rw-r-----. 1 oracle oinstall 2048 Oct 11 12:51 1_54_887190070.dbf
-rw-r-----. 1 oracle oinstall 1024 Oct 11 12:51 1_55_887190070.dbf
-rw-r-----. 1 oracle oinstall 1024 Oct 11 12:51 1_56_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 25519104 Oct 11 08:14 1_5_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 1024 Oct 11 08:14 1_6_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 31486464 Oct 11 08:50 1_7_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 1024 Oct 11 08:50 1_8_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 1964544 Oct 11 09:27 1_9_887190070.dbf
GGSCI (dg2) 19> exit
[oracle@dg2 ogg]$ sqlplus sys/oracle@orcl as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Wed Oct 11 13:25:31 2017
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 switch logfile;
System altered.
SQL> /
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@dg2 ogg]$ ls -l /u02/app/oracle/arch/
total 494008
-rwxrwxr-x. 1 oracle oinstall 39781888 Oct 11 10:31 1_10_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 4096 Oct 11 10:32 1_11_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 77312 Oct 11 10:32 1_12_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 35073024 Oct 11 10:35 1_13_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 1024 Oct 11 10:35 1_14_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 77312 Oct 11 10:35 1_15_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 302592 Oct 11 10:47 1_16_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 1024 Oct 11 10:47 1_17_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 50181632 Oct 11 10:50 1_18_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 50181632 Oct 11 10:50 1_19_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 50181632 Oct 11 10:50 1_20_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 50181632 Oct 11 10:50 1_21_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 50041856 Oct 11 10:50 1_22_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 50181632 Oct 11 10:50 1_23_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 50181632 Oct 11 10:50 1_24_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 12222976 Oct 11 10:51 1_25_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 69632 Oct 11 10:51 1_26_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 23040 Oct 11 10:51 1_27_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 2552320 Oct 11 11:31 1_28_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 1024 Oct 11 11:31 1_29_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 2048 Oct 11 11:32 1_30_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 1024 Oct 11 11:32 1_31_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 5632 Oct 11 11:32 1_32_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 1024 Oct 11 11:32 1_33_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 1536 Oct 11 11:32 1_34_887190070.dbf
-rw-r-----. 1 oracle oinstall 229888 Oct 11 11:46 1_35_887190070.dbf
-rw-r-----. 1 oracle oinstall 1024 Oct 11 11:46 1_36_887190070.dbf
-rw-r-----. 1 oracle oinstall 1536 Oct 11 11:46 1_37_887190070.dbf
-rw-r-----. 1 oracle oinstall 2239488 Oct 11 12:00 1_38_887190070.dbf
-rw-r-----. 1 oracle oinstall 1024 Oct 11 12:00 1_39_887190070.dbf
-rw-r-----. 1 oracle oinstall 245760 Oct 11 12:15 1_40_887190070.dbf
-rw-r-----. 1 oracle oinstall 1024 Oct 11 12:15 1_41_887190070.dbf
-rw-r-----. 1 oracle oinstall 1536 Oct 11 12:15 1_42_887190070.dbf
-rw-r-----. 1 oracle oinstall 121344 Oct 11 12:38 1_43_887190070.dbf
-rw-r-----. 1 oracle oinstall 1024 Oct 11 12:38 1_44_887190070.dbf
-rw-r-----. 1 oracle oinstall 15360 Oct 11 12:39 1_45_887190070.dbf
-rw-r-----. 1 oracle oinstall 1536 Oct 11 12:39 1_46_887190070.dbf
-rw-r-----. 1 oracle oinstall 1536 Oct 11 12:39 1_47_887190070.dbf
-rw-r-----. 1 oracle oinstall 19968 Oct 11 12:43 1_48_887190070.dbf
-rw-r-----. 1 oracle oinstall 1024 Oct 11 12:44 1_49_887190070.dbf
-rw-r-----. 1 oracle oinstall 1536 Oct 11 12:44 1_50_887190070.dbf
-rw-r-----. 1 oracle oinstall 1024 Oct 11 12:44 1_51_887190070.dbf
-rw-r-----. 1 oracle oinstall 220160 Oct 11 12:51 1_52_887190070.dbf
-rw-r-----. 1 oracle oinstall 1024 Oct 11 12:51 1_53_887190070.dbf
-rw-r-----. 1 oracle oinstall 2048 Oct 11 12:51 1_54_887190070.dbf
-rw-r-----. 1 oracle oinstall 1024 Oct 11 12:51 1_55_887190070.dbf
-rw-r-----. 1 oracle oinstall 1024 Oct 11 12:51 1_56_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 25519104 Oct 11 08:14 1_5_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 1024 Oct 11 08:14 1_6_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 31486464 Oct 11 08:50 1_7_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 1024 Oct 11 08:50 1_8_887190070.dbf
-rwxrwxr-x. 1 oracle oinstall 1964544 Oct 11 09:27 1_9_887190070.dbf
-rw-r-----. 1 oracle oinstall 2323968 Oct 11 13:25 test_1_57_887190070.dbf
-rw-r-----. 1 oracle oinstall 1024 Oct 11 13:25 test_1_58_887190070.dbf
[oracle@dg2 ogg]$ ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 12.2.0.1.1 OGGCORE_12.2.0.1.0_PLATFORMS_151211.1401_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Dec 12 2015 00:54:38
Operating system character set identified as UTF-8.
Copyright (C) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
GGSCI (dg2) 1> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EXT1 00:00:00 00:00:05
EXTRACT STOPPED EXT_ALO 00:00:00 00:25:46
GGSCI (dg2) 2> start ext_alo
Sending START request to MANAGER ...
EXTRACT EXT_ALO starting
GGSCI (dg2) 3> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EXT1 00:00:00 00:00:00
EXTRACT STOPPED EXT_ALO 00:00:00 00:26:26
GGSCI (dg2) 4> shell tail -20 ggserr.log
2017-10-11 13:26:07 INFO OGG-01971 Oracle GoldenGate Capture for Oracle, ext_alo.prm: The previous message, 'INFO OGG-02095', repeated 1 times.
2017-10-11 13:26:07 INFO OGG-03522 Oracle GoldenGate Capture for Oracle, ext_alo.prm: Setting session time zone to source database time zone 'GMT'.
2017-10-11 13:26:07 INFO OGG-01635 Oracle GoldenGate Capture for Oracle, ext_alo.prm: BOUNDED RECOVERY: reset to initial or altered checkpoint.
2017-10-11 13:26:07 INFO OGG-01815 Oracle GoldenGate Capture for Oracle, ext_alo.prm: Virtual Memory Facilities for: BR
anon alloc: mmap(MAP_ANON) anon free: munmap
file alloc: mmap(MAP_SHARED) file free: munmap
target directories:
/u01/app/ogg/BR/EXT_ALO.
2017-10-11 13:26:07 INFO OGG-01851 Oracle GoldenGate Capture for Oracle, ext_alo.prm: filecaching started: thread ID: 139814908700416.
2017-10-11 13:26:07 INFO OGG-01815 Oracle GoldenGate Capture for Oracle, ext_alo.prm: Virtual Memory Facilities for: COM
anon alloc: mmap(MAP_ANON) anon free: munmap
file alloc: mmap(MAP_SHARED) file free: munmap
target directories:
/u01/app/ogg/dirtmp.
2017-10-11 13:26:07 WARNING OGG-01830 Oracle GoldenGate Capture for Oracle, ext_alo.prm: LOGRETENTION is disabled by default in ARCHIVEDLOGONLY mode.
2017-10-11 13:26:07 INFO OGG-02089 Oracle GoldenGate Capture for Oracle, ext_alo.prm: Source redo compatibility version is: 11.2.0.4.0.
2017-10-11 13:26:07 INFO OGG-01513 Oracle GoldenGate Capture for Oracle, ext_alo.prm: Positioning to Sequence 15, RBA 0, SCN 0.0 (0).
2017-10-11 13:26:27 ERROR OGG-00446 Oracle GoldenGate Capture for Oracle, ext_alo.prm: Could not find archived log for sequence 15 thread 1 under alternative destinations. SQL <>. Last alternative log tried /u02/app/oracle/arch/test_1_15_887190070.dbf. Failed to open redo file /u02/app/oracle/arch/test_1_15_887190070.dbf for sequence 15 during initial positioning. Not able to establish initial position for sequence 15, rba 0.
2017-10-11 13:26:27 ERROR OGG-01668 Oracle GoldenGate Capture for Oracle, ext_alo.prm: PROCESS ABENDING.
2017-10-11 13:26:41 INFO OGG-00987 Oracle GoldenGate Command Interpreter for Oracle: GGSCI command (oracle): info all.
处理:调整抽取进程开始extseqno 、extrba 从新的位置开始抽取
GGSCI (dg2) 5> alter ext_alo,extseqno 57,extrba 0
EXTRACT altered.
GGSCI (dg2) 6> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EXT1 00:00:00 00:00:02
EXTRACT STOPPED EXT_ALO 00:00:00 00:00:02
GGSCI (dg2) 7> info ext_alo
EXTRACT EXT_ALO Initialized 2017-10-11 13:27 Status STOPPED
Checkpoint Lag 00:00:00 (updated 00:00:08 ago)
Log Read Checkpoint Oracle Redo Logs
First Record Seqno 57, RBA 0
SCN 0.0 (0)
GGSCI (dg2) 8> start ext_alo
Sending START request to MANAGER ...
EXTRACT EXT_ALO starting
GGSCI (dg2) 9> info ext_alo
EXTRACT EXT_ALO Last Started 2017-10-11 13:27 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:01 ago)
Process ID 13741
Log Read Checkpoint Oracle Redo Logs
2017-10-11 13:25:34 Seqno 58, RBA 1024
SCN 0.1023595 (1023595)
GGSCI (dg2) 10> info ext_alo
EXTRACT EXT_ALO Last Started 2017-10-11 13:27 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:07 ago)
Process ID 13741
Log Read Checkpoint Oracle Redo Logs
2017-10-11 13:25:34 Seqno 58, RBA 1024
SCN 0.1023595 (1023595)
GGSCI (dg2) 11> exit
[oracle@dg2 ogg]$ ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 12.2.0.1.1 OGGCORE_12.2.0.1.0_PLATFORMS_151211.1401_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Dec 12 2015 00:54:38
Operating system character set identified as UTF-8.
Copyright (C) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
GGSCI (dg2) 1> view params ext_alo
EXTRACT ext_alo
setenv (ORACLE_SID=orcl)
EXTTRAIL ./dirdat/lr
userid ogg@orcl, password oracle
--WILDCARDRESOLVE DYNAMICDYNAMICRESOLUTION
TRANLOGOPTIONS ARCHIVEDLOGONLY
TRANLOGOPTIONS ALTARCHIVELOGDEST PRIMARY /u02/app/oracle/arch
TRANLOGOPTIONS ALTARCHIVEDLOGFORMAT test_%t_%s_%r.dbf
FETCHOPTIONS, NOUSESNAPSHOT, NOUSELATESTVERSION, MISSINGROW REPORT
STATOPTIONS REPORTFETCH
table scott.*;
GGSCI (dg2) 2> exit
SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
[oracle@dg2 ogg]$ sqlplus scott/oracle@orcl
SQL*Plus: Release 11.2.0.4.0 Production on Wed Oct 11 13:29:01 2017
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 tname from tab;
TNAME
------------------------------
BONUS
DEPT
EMP
SALGRADE
SQL> select count(*) from dept;
COUNT(*)
----------
0
SQL> desc dept;
Name Null? Type
----------------------------------------- -------- ----------------------------
DEPTNO NOT NULL NUMBER(2)
DNAME VARCHAR2(14)
LOC VARCHAR2(13)
SQL> insert into dept values (6,'aaa','bbb');
1 row created.
SQL> commit;
Commit complete.
SQL> connect /as sysdba
Connected.
SQL> alter system switch logfile;
System altered.
SQL> /
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@dg2 ogg]$ ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 12.2.0.1.1 OGGCORE_12.2.0.1.0_PLATFORMS_151211.1401_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Dec 12 2015 00:54:38
Operating system character set identified as UTF-8.
Copyright (C) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
GGSCI (dg2) 1> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EXT1 00:00:00 00:00:10
EXTRACT RUNNING EXT_ALO 00:00:00 00:00:08
GGSCI (dg2) 2> info ext_alo
EXTRACT EXT_ALO Last Started 2017-10-11 13:27 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:03 ago)
Process ID 13741
Log Read Checkpoint Oracle Redo Logs
2017-10-11 13:25:34 Seqno 58, RBA 1024
SCN 0.1023595 (1023595)
GGSCI (dg2) 3> stats ext_alo
Sending STATS request to EXTRACT EXT_ALO ...
No active extraction maps.
GGSCI (dg2) 4> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EXT1 00:00:00 00:00:00
EXTRACT RUNNING EXT_ALO 00:00:00 00:00:05
GGSCI (dg2) 5> stats ext_alo
Sending STATS request to EXTRACT EXT_ALO ...
No active extraction maps.
GGSCI (dg2) 7> send ext_alo,showtrans
Sending SHOWTRANS request to EXTRACT EXT_ALO ...
No transactions found
Oldest redo log file necessary to restart Extract is:
Redo Log Sequence Number 58, RBA 0.
GGSCI (dg2) 8> info ext_alo
EXTRACT EXT_ALO Last Started 2017-10-11 13:27 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:08 ago)
Process ID 13741
Log Read Checkpoint Oracle Redo Logs
2017-10-11 13:25:34 Seqno 58, RBA 1024
SCN 0.1023595 (1023595)
测试发现抽取进程还是没有抽取数据,rba not move
处理:
登录源端数据库关闭归档模式,然后开启归档模式后,调整抽取进程从当前时间点开始抽取
GGSCI (dg2) 9> alter ext_alo,begin now
^C
2017-10-11 13:33:18 ERROR OGG-01117 Received signal: Program interrupt (2).
GGSCI (dg2) 10> stop ext_alo
Sending STOP request to EXTRACT EXT_ALO ...
Request processed.
GGSCI (dg2) 11> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EXT1 00:00:00 00:00:09
EXTRACT STOPPED EXT_ALO 00:00:00 00:00:27
GGSCI (dg2) 12> alter ext_alo,begin now
EXTRACT altered.
GGSCI (dg2) 13> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EXT1 00:00:00 00:00:09
EXTRACT STOPPED EXT_ALO 00:00:00 00:00:04
GGSCI (dg2) 14> start ext_alo
Sending START request to MANAGER ...
EXTRACT EXT_ALO starting
GGSCI (dg2) 15> stats ext_alo
Sending STATS request to EXTRACT EXT_ALO ...
No active extraction maps.
GGSCI (dg2) 20> info ext_alo
EXTRACT EXT_ALO Last Started 2017-10-11 13:34 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:08 ago)
Process ID 13874
Log Read Checkpoint Oracle Redo Logs
2017-10-11 13:33:57 Seqno 0, RBA 0
SCN 0.0 (0)
GGSCI (dg2) 21> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EXT1 00:00:00 00:00:05
EXTRACT RUNNING EXT_ALO 00:00:00 00:00:07
GGSCI (dg2) 22> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EXT1 00:00:00 00:00:07
EXTRACT RUNNING EXT_ALO 00:00:00 00:00:00
此时源端执行dml 操作并执行alter system switch logfile 归档相关事务日志
GGSCI (dg2) 27> stats ext_alo
Sending STATS request to EXTRACT EXT_ALO ...
Start of Statistics at 2017-10-11 13:39:53.
Output to ./dirdat/lr:
Extracting from SCOTT.DEPT to SCOTT.DEPT:
*** Total statistics since 2017-10-11 13:39:28 ***
Total inserts 0.00
Total updates 0.00
Total deletes 1.00
Total discards 0.00
Total operations 1.00
*** Daily statistics since 2017-10-11 13:39:28 ***
Total inserts 0.00
Total updates 0.00
Total deletes 1.00
Total discards 0.00
Total operations 1.00
*** Hourly statistics since 2017-10-11 13:39:28 ***
Total inserts 0.00
Total updates 0.00
Total deletes 1.00
Total discards 0.00
Total operations 1.00
*** Latest statistics since 2017-10-11 13:39:28 ***
Total inserts 0.00
Total updates 0.00
Total deletes 1.00
Total discards 0.00
Total operations 1.00
End of Statistics.
GGSCI (dg2) 28> view params ext_alo
EXTRACT ext_alo
setenv (ORACLE_SID=orcl)
EXTTRAIL ./dirdat/lr
userid ogg@orcl, password oracle
--WILDCARDRESOLVE DYNAMICDYNAMICRESOLUTION
TRANLOGOPTIONS ARCHIVEDLOGONLY
TRANLOGOPTIONS ALTARCHIVELOGDEST PRIMARY /u02/app/oracle/arch
TRANLOGOPTIONS ALTARCHIVEDLOGFORMAT test_%t_%s_%r.dbf
FETCHOPTIONS, NOUSESNAPSHOT, NOUSELATESTVERSION, MISSINGROW REPORT
STATOPTIONS REPORTFETCH
table scott.*;
GGSCI (dg2) 29> stats ext_alo
Sending STATS request to EXTRACT EXT_ALO ...
Start of Statistics at 2017-10-11 13:42:29.
Output to ./dirdat/lr:
Extracting from SCOTT.DEPT to SCOTT.DEPT:
*** Total statistics since 2017-10-11 13:39:28 ***
Total inserts 0.00
Total updates 0.00
Total deletes 1.00
Total discards 0.00
Total operations 1.00
*** Daily statistics since 2017-10-11 13:39:28 ***
Total inserts 0.00
Total updates 0.00
Total deletes 1.00
Total discards 0.00
Total operations 1.00
*** Hourly statistics since 2017-10-11 13:39:28 ***
Total inserts 0.00
Total updates 0.00
Total deletes 1.00
Total discards 0.00
Total operations 1.00
*** Latest statistics since 2017-10-11 13:39:28 ***
Total inserts 0.00
Total updates 0.00
Total deletes 1.00
Total discards 0.00
Total operations 1.00
End of Statistics.
GGSCI (dg2) 30> info ext_alo,detail
EXTRACT EXT_ALO Last Started 2017-10-11 13:39 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:02 ago)
Process ID 13986
Log Read Checkpoint Oracle Redo Logs
2017-10-11 13:38:45 Seqno 60, RBA 1024
SCN 0.1025593 (1025593)
Target Extract Trails:
Trail Name Seqno RBA Max MB Trail Type
./dirdat/lr 7 2034 500 EXTTRAIL
Extract Source Begin End
/u02/app/oracle/arch/test_1_60_887190070.dbf 2017-10-11 13:33 2017-10-11 13:38
/u02/app/oracle/arch/test_1_58_887190070.dbf 2017-10-11 13:33 2017-10-11 13:33
/u02/app/oracle/arch/test_1_58_887190070.dbf 2017-10-11 13:33 2017-10-11 13:33
/u02/app/oracle/arch/test_1_58_887190070.dbf * Initialized * 2017-10-11 13:33
/u02/app/oracle/arch/test_1_58_887190070.dbf * Initialized * 2017-10-11 13:33
/u02/app/oracle/arch/test_1_58_887190070.dbf * Initialized * 2017-10-11 13:25
Not Available * Initialized * First Record
Not Available * Initialized * First Record
Not Available * Initialized * First Record
Not Available * Initialized * First Record
Not Available * Initialized * First Record
Not Available * Initialized * First Record
Not Available * Initialized * First Record
Not Available 2017-10-11 12:50 2017-10-11 12:50
Not Available 2017-10-11 12:50 2017-10-11 12:50
Not Available 2017-10-11 12:50 2017-10-11 12:50
Not Available * Initialized * 2017-10-11 12:50
Not Available * Initialized * 2017-10-11 12:50
Not Available 2017-10-11 12:28 2017-10-11 12:28
Not Available 2017-10-11 12:28 2017-10-11 12:28
Not Available 2017-10-11 12:28 2017-10-11 12:28
Not Available 2017-10-11 12:28 2017-10-11 12:28
Not Available 2017-10-11 12:28 2017-10-11 12:28
Not Available * Initialized * 2017-10-11 12:28
Not Available * Initialized * 2017-10-11 12:28
Not Available * Initialized * 2017-10-11 12:28
Current directory /u01/app/ogg
Report file /u01/app/ogg/dirrpt/EXT_ALO.rpt
Parameter file /u01/app/ogg/dirprm/ext_alo.prm
Checkpoint file /u01/app/ogg/dirchk/EXT_ALO.cpe
Process file /u01/app/ogg/dirpcs/EXT_ALO.pce
Error log /u01/app/ogg/ggserr.log
GGSCI (dg2) 31>
GGSCI (dg2) 31>
GGSCI (dg2) 31>
GGSCI (dg2) 31> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EXT1 00:00:00 00:00:07
EXTRACT RUNNING EXT_ALO 00:00:00 00:00:07
GGSCI (dg2) 32> stop *
Sending STOP request to EXTRACT EXT1 ...
Request processed.
Sending STOP request to EXTRACT EXT_ALO ...
Request processed.
GGSCI (dg2) 33> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT STOPPED EXT1 00:00:00 00:00:05
EXTRACT STOPPED EXT_ALO 00:00:00 00:00:05
GGSCI (dg2) 34> stop mgr
Manager process is required by other GGS processes.
Are you sure you want to stop it (y/n)?y
Sending STOP request to MANAGER ...
Request processed.
Manager stopped.
GGSCI (dg2) 35> exit
[oracle@dg2 ogg]$ exit
logout
[root@dg2 ~]# shutdown -h now
Broadcast message from root@dg2
(/dev/pts/0) at 13:46 ...
The system is going down for halt NOW!
|
|