iis服务器助手广告广告
返回顶部
首页 > 资讯 > 数据库 >Oracle ogg11 安装配置文档
  • 155
分享到

Oracle ogg11 安装配置文档

2024-04-02 19:04:59 155人浏览 泡泡鱼
摘要

一.用RMAN初始化数据库:配置好目标数据库的参数文件:OGG1.__db_cache_size=318767104OGG1.__java_pool_size=4194304OGG1.__large_poo

一.用RMAN初始化数据库

  1. 配置好目标数据库的参数文件:

    OGG1.__db_cache_size=318767104

    OGG1.__java_pool_size=4194304

    OGG1.__large_pool_size=16777216

    OGG1.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment

    OGG1.__pga_aggregate_target=293601280

    OGG1.__sga_target=545259520

    OGG1.__shared_io_pool_size=0

    OGG1.__shared_pool_size=192937984

    OGG1.__streams_pool_size=0

    *._optimizer_ignore_hints=FALSE

    *.audit_file_dest='/u01/app/oracle/admin/OGG1/adump'

    *.audit_trail='db'

    *.compatible='11.2.0.4.0'

    *.control_files='+DATA1/ogg1/controlfile/control01.dbf','+DATA1/ogg1/controlfile/control02.dbf'#Restore Controlfile

    *.db_block_size=8192

    *.DB_FILE_NAME_CONVERT='+DATA/phub/datafile/','+DATA1/ogg1/datafile'

    *.LOG_FILE_NAME_CONVERT='+DATA/phub/onlinelog/','+DATA1/ogg1/onlinelog/'

    *.db_create_file_dest='+DATA1'

    *.db_domain=''

    *.db_flashback_retention_target=120

    *.db_name='OGG1'

    *.db_recovery_file_dest='+DATA1'

    *.db_recovery_file_dest_size=10737418240

    *.DB_UNIQUE_NAME='OGG1'

    *.diagnostic_dest='/u01/app/oracle'

    *.dispatchers='(PROTOCOL=tcp) (SERVICE=OGG1XDB)'

    *.memory_target=838860800

    *.open_cursors=300

    *.processes=150

    *.remote_login_passWordfile='EXCLUSIVE'

    *.undo_tablespace='UNDOTBS1'

[oracle@cwogg admin]$ rman target sys/123123@PHUB auxiliary sys/123123@OGG1 nocatalog

Recovery Manager: Release 11.2.0.4.0 - Production on Mon Oct 26 16:53:15 2015

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: PHUB (DBID=536511065)

using target database control file instead of recovery catalog

connected to auxiliary database: OGG1 (not mounted)

RMAN> duplicate target database to OGG1 from active database nofilenamecheck;

Starting Duplicate Db at 26-OCT-15

allocated channel: ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: SID=131 device type=DISK

allocated channel: ORA_AUX_DISK_2

channel ORA_AUX_DISK_2: SID=192 device type=DISK

contents of Memory Script:

{

   sql clone "create spfile from memory";

}

executing Memory Script

sql statement: create spfile from memory

contents of Memory Script:

{

   shutdown clone immediate;

   startup clone nomount;

}

executing Memory Script

Oracle instance shut down

connected to auxiliary database (not started)

Oracle instance started

Total System Global Area     835104768 bytes

Fixed Size                     2257840 bytes

Variable Size                511708240 bytes

Database Buffers             314572800 bytes

Redo Buffers                   6565888 bytes

contents of Memory Script:

{

   sql clone "alter system set  db_name = 

 ''PHUB'' comment=

 ''Modified by RMAN duplicate'' scope=spfile";

   sql clone "alter system set  db_unique_name = 

 ''OGG1'' comment=

 ''Modified by RMAN duplicate'' scope=spfile";

   shutdown clone immediate;

   startup clone force nomount

   backup as copy current controlfile auxiliary fORMat  '+DATA1/ogg1/controlfile/control01.dbf';

   restore clone controlfile to  '+DATA1/ogg1/controlfile/control02.dbf' from 

 '+DATA1/ogg1/controlfile/control01.dbf';

   alter clone database mount;

}

executing Memory Script

sql statement: alter system set  db_name =  ''PHUB'' comment= ''Modified by RMAN duplicate'' scope=spfile

sql statement: alter system set  db_unique_name =  ''OGG1'' comment= ''Modified by RMAN duplicate'' scope=spfile

Oracle instance shut down

Oracle instance started

Total System Global Area     835104768 bytes

Fixed Size                     2257840 bytes

Variable Size                511708240 bytes

Database Buffers             314572800 bytes

Redo Buffers                   6565888 bytes

Starting backup at 26-OCT-15

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=398 device type=DISK

allocated channel: ORA_DISK_2

channel ORA_DISK_2: SID=25 device type=DISK

channel ORA_DISK_1: starting datafile copy

copying current control file

output file name=/u01/app/oracle/product/11.2.0/db_1/dbs/snapcf_PHUB.f tag=TAG20151026T165351 RECID=13 STAMP=894128033

channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03

Finished backup at 26-OCT-15

Starting restore at 26-OCT-15

allocated channel: ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: SID=69 device type=DISK

allocated channel: ORA_AUX_DISK_2

channel ORA_AUX_DISK_2: SID=131 device type=DISK

channel ORA_AUX_DISK_2: skipped, AUTOBACKUP already found

channel ORA_AUX_DISK_1: copied control file copy

Finished restore at 26-OCT-15

database mounted

RMAN-05529: WARNING: DB_FILE_NAME_CONVERT resulted in invalid ASM names; names changed to disk group only.

contents of Memory Script:

{

   set newname for datafile  1 to 

 "+data1";

   set newname for datafile  2 to 

 "+data1";

   set newname for datafile  3 to 

 "+data1";

   set newname for datafile  4 to 

 "+data1";

   set newname for datafile  5 to 

 "+data1";

   set newname for datafile  6 to 

 "+DATA1/ogg1/datafilellc01.dbf";

   set newname for datafile  7 to 

 "+DATA1/ogg1/datafileidx01.dbf";

   backup as copy reuse

   datafile  1 auxiliary format 

 "+data1"   datafile 

 2 auxiliary format 

 "+data1"   datafile 

 3 auxiliary format 

 "+data1"   datafile 

 4 auxiliary format 

 "+data1"   datafile 

 5 auxiliary format 

 "+data1"   datafile 

 6 auxiliary format 

 "+DATA1/ogg1/datafilellc01.dbf"   datafile 

 7 auxiliary format 

 "+DATA1/ogg1/datafileidx01.dbf"   ;

   sql 'alter system arcHive log current';

}

executing Memory Script

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting backup at 26-OCT-15

using channel ORA_DISK_1

using channel ORA_DISK_2

channel ORA_DISK_1: starting datafile copy

input datafile file number=00006 name=+DATA/phub/datafile/llc01.dbf

channel ORA_DISK_2: starting datafile copy

input datafile file number=00002 name=+DATA/phub/datafile/sysaux.272.891340857

output file name=+DATA1/ogg1/datafilellc01.dbf tag=TAG20151026T165410

channel ORA_DISK_1: datafile copy complete, elapsed time: 00:01:15

channel ORA_DISK_1: starting datafile copy

input datafile file number=00007 name=+DATA/phub/datafile/idx01.dbf

output file name=+DATA1/ogg1/datafile/sysaux.261.894128051 tag=TAG20151026T165410

channel ORA_DISK_2: datafile copy complete, elapsed time: 00:04:21

channel ORA_DISK_2: starting datafile copy

input datafile file number=00001 name=+DATA/phub/datafile/system.271.891340857

output file name=+DATA1/ogg1/datafileidx01.dbf tag=TAG20151026T165410

channel ORA_DISK_1: datafile copy complete, elapsed time: 00:03:30

channel ORA_DISK_1: starting datafile copy

input datafile file number=00004 name=+DATA/phub/datafile/users.269.891340843

output file name=+DATA1/ogg1/datafile/system.259.894128311 tag=TAG20151026T165410

channel ORA_DISK_2: datafile copy complete, elapsed time: 00:02:40

channel ORA_DISK_2: starting datafile copy

input datafile file number=00005 name=+DATA/phub/datafile/example.287.891340843

output file name=+DATA1/ogg1/datafile/users.258.894128337 tag=TAG20151026T165410

channel ORA_DISK_1: datafile copy complete, elapsed time: 00:02:23

channel ORA_DISK_1: starting datafile copy

input datafile file number=00003 name=+DATA/phub/datafile/undotbs1.260.891340857

output file name=+DATA1/ogg1/datafile/undotbs1.264.894128479 tag=TAG20151026T165410

channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:35

output file name=+DATA1/ogg1/datafile/example.263.894128473 tag=TAG20151026T165410

channel ORA_DISK_2: datafile copy complete, elapsed time: 00:01:02

Finished backup at 26-OCT-15

sql statement: alter system archive log current

contents of Memory Script:

{

   backup as copy reuse

   archivelog like  "+DATA/phub/archivelog/2015_10_26/thread_1_seq_398.284.894128537" auxiliary format 

 "+DATA1"   ;

   catalog clone start with  "+DATA1";

   switch clone datafile all;

}

executing Memory Script

Starting backup at 26-OCT-15

using channel ORA_DISK_1

using channel ORA_DISK_2

channel ORA_DISK_1: starting archived log copy

input archived log thread=1 sequence=398 RECID=784 STAMP=894128536

output file name=+DATA1/ogg1/archivelog/2015_10_26/thread_1_seq_398.265.894128539 RECID=0 STAMP=0

channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01

Finished backup at 26-OCT-15

searching for all files that match the pattern +DATA1

List of Files Unknown to the Database

=====================================

File Name: +data1/OGG1/datafilellc01.dbf

File Name: +data1/OGG1/datafileidx01.dbf

File Name: +data1/OGG1/ARCHIVELOG/2015_10_26/thread_1_seq_398.265.894128539

File Name: +data1/OGG1/datafile/SYSAUX.261.894128051

File Name: +data1/OGG1/datafile/SYSTEM.259.894128311

File Name: +data1/OGG1/datafile/USERS.258.894128337

File Name: +data1/OGG1/datafile/EXAMPLE.263.894128473

File Name: +data1/OGG1/datafile/UNDOTBS1.264.894128479

File Name: +data1/ASM/ASMPARAMETERFILE/REGISTRY.253.894123127

cataloging files...

cataloging done

List of Cataloged Files

=======================

File Name: +data1/OGG1/datafilellc01.dbf

File Name: +data1/OGG1/datafileidx01.dbf

File Name: +data1/OGG1/ARCHIVELOG/2015_10_26/thread_1_seq_398.265.894128539

File Name: +data1/OGG1/datafile/SYSAUX.261.894128051

File Name: +data1/OGG1/datafile/SYSTEM.259.894128311

File Name: +data1/OGG1/datafile/USERS.258.894128337

File Name: +data1/OGG1/datafile/EXAMPLE.263.894128473

File Name: +data1/OGG1/datafile/UNDOTBS1.264.894128479

List of Files Which Where Not Cataloged

=======================================

File Name: +data1/ASM/ASMPARAMETERFILE/REGISTRY.253.894123127

  RMAN-07518: Reason: Foreign database file DBID: 0  Database Name: 

datafile 1 switched to datafile copy

input datafile copy RECID=20 STAMP=894128541 file name=+DATA1/ogg1/datafile/system.259.894128311

datafile 2 switched to datafile copy

input datafile copy RECID=21 STAMP=894128542 file name=+DATA1/ogg1/datafile/sysaux.261.894128051

datafile 3 switched to datafile copy

input datafile copy RECID=22 STAMP=894128542 file name=+DATA1/ogg1/datafile/undotbs1.264.894128479

datafile 4 switched to datafile copy

input datafile copy RECID=23 STAMP=894128542 file name=+DATA1/ogg1/datafile/users.258.894128337

datafile 5 switched to datafile copy

input datafile copy RECID=24 STAMP=894128542 file name=+DATA1/ogg1/datafile/example.263.894128473

datafile 6 switched to datafile copy

input datafile copy RECID=25 STAMP=894128542 file name=+DATA1/ogg1/datafilellc01.dbf

datafile 7 switched to datafile copy

input datafile copy RECID=26 STAMP=894128543 file name=+DATA1/ogg1/datafileidx01.dbf

contents of Memory Script:

{

   set until scn  6109815;

   recover

   clone database

    delete archivelog

   ;

}

executing Memory Script

executing command: SET until clause

Starting recover at 26-OCT-15

using channel ORA_AUX_DISK_1

using channel ORA_AUX_DISK_2

starting media recovery

archived log for thread 1 with sequence 398 is already on disk as file +DATA1/ogg1/archivelog/2015_10_26/thread_1_seq_398.265.894128539

archived log file name=+DATA1/ogg1/archivelog/2015_10_26/thread_1_seq_398.265.894128539 thread=1 sequence=398

media recovery complete, elapsed time: 00:00:02

Finished recover at 26-OCT-15

Oracle instance started

Total System Global Area     835104768 bytes

Fixed Size                     2257840 bytes

Variable Size                511708240 bytes

Database Buffers             314572800 bytes

Redo Buffers                   6565888 bytes

contents of Memory Script:

{

   sql clone "alter system set  db_name = 

 ''OGG1'' comment=

 ''Reset to original value by RMAN'' scope=spfile";

   sql clone "alter system reset  db_unique_name scope=spfile";

   shutdown clone immediate;

   startup clone nomount;

}

executing Memory Script

sql statement: alter system set  db_name =  ''OGG1'' comment= ''Reset to original value by RMAN'' scope=spfile

sql statement: alter system reset  db_unique_name scope=spfile

Oracle instance shut down

connected to auxiliary database (not started)

Oracle instance started

Total System Global Area     835104768 bytes

Fixed Size                     2257840 bytes

Variable Size                511708240 bytes

Database Buffers             314572800 bytes

Redo Buffers                   6565888 bytes

sql statement: CREATE CONTROLFILE REUSE SET DATABASE "OGG1" RESETLOGS ARCHIVELOG 

  MAXLOGFILES     16

  MAXLOGMEMBERS      3

  MAXDATAFILES      100

  MAXINSTANCES     8

  MAXLOGHISTORY      292

 LOGFILE

  GROUP   1 ( '+data1', '+data1' ) SIZE 50 M  REUSE,

  GROUP   2 ( '+data1', '+data1' ) SIZE 50 M  REUSE,

  GROUP   3 ( '+data1', '+data1' ) SIZE 50 M  REUSE

 DATAFILE

  '+DATA1/ogg1/datafile/system.259.894128311'

 CHARACTER SET AL32UTF8

contents of Memory Script:

{

   set newname for tempfile  1 to 

 "+data";

   set newname for tempfile  2 to 

 "+DATA/phub/tempfile/tmp01.dbf";

   switch clone tempfile all;

   catalog clone datafilecopy  "+DATA1/ogg1/datafile/sysaux.261.894128051", 

 "+DATA1/ogg1/datafile/undotbs1.264.894128479", 

 "+DATA1/ogg1/datafile/users.258.894128337", 

 "+DATA1/ogg1/datafile/example.263.894128473", 

 "+DATA1/ogg1/datafilellc01.dbf", 

 "+DATA1/ogg1/datafileidx01.dbf";

   switch clone datafile all;

}

executing Memory Script

executing command: SET NEWNAME

executing command: SET NEWNAME

renamed tempfile 1 to +data in control file

renamed tempfile 2 to +DATA/phub/tempfile/tmp01.dbf in control file

cataloged datafile copy

datafile copy file name=+DATA1/ogg1/datafile/sysaux.261.894128051 RECID=1 STAMP=894128569

cataloged datafile copy

datafile copy file name=+DATA1/ogg1/datafile/undotbs1.264.894128479 RECID=2 STAMP=894128569

cataloged datafile copy

datafile copy file name=+DATA1/ogg1/datafile/users.258.894128337 RECID=3 STAMP=894128569

cataloged datafile copy

datafile copy file name=+DATA1/ogg1/datafile/example.263.894128473 RECID=4 STAMP=894128569

cataloged datafile copy

datafile copy file name=+DATA1/ogg1/datafilellc01.dbf RECID=5 STAMP=894128569

cataloged datafile copy

datafile copy file name=+DATA1/ogg1/datafileidx01.dbf RECID=6 STAMP=894128569

datafile 2 switched to datafile copy

input datafile copy RECID=1 STAMP=894128569 file name=+DATA1/ogg1/datafile/sysaux.261.894128051

datafile 3 switched to datafile copy

input datafile copy RECID=2 STAMP=894128569 file name=+DATA1/ogg1/datafile/undotbs1.264.894128479

datafile 4 switched to datafile copy

input datafile copy RECID=3 STAMP=894128569 file name=+DATA1/ogg1/datafile/users.258.894128337

datafile 5 switched to datafile copy

input datafile copy RECID=4 STAMP=894128569 file name=+DATA1/ogg1/datafile/example.263.894128473

datafile 6 switched to datafile copy

input datafile copy RECID=5 STAMP=894128569 file name=+DATA1/ogg1/datafilellc01.dbf

datafile 7 switched to datafile copy

input datafile copy RECID=6 STAMP=894128569 file name=+DATA1/ogg1/datafileidx01.dbf

contents of Memory Script:

{

   Alter clone database open resetlogs;

}

executing Memory Script

database opened

Finished Duplicate Db at 26-OCT-15

一定记得处理一下临时表空间:

SQL> alter database tempfile '+DATA/phub/tempfile/tmp01.dbf' drop;

Database altered.

SQL> alter tablespace temp add tempfile '+DATA1/ogg1/tempfile/tmp01.dbf' size 1024M;

Tablespace altered.

注册数据到crs:

[oracle@ogg1 ~]$ srvctl status listener -l listener

Listener LISTENER is enabled

Listener LISTENER is running on node(s): ogg1

[oracle@ogg1 ~]$ srvctl add database -d OGG1 -o /u01/app/oracle/product/11.2.0/db_1/

[oracle@ogg1 ~]$ srvctl status database -d OGG1

Database is not running.

[oracle@ogg1 ~]$ srvctl start database -d OGG1

[oracle@ogg1 ~]$ srvctl status database -d OGG1

Database is running.

[oracle@ogg1 ~]$ su - grid

Password: 

[grid@ogg1 ~]$ crsctl stat res -t

--------------------------------------------------------------------------------

NAME           TARGET  STATE        SERVER                   STATE_DETAILS       

--------------------------------------------------------------------------------

Local Resources

--------------------------------------------------------------------------------

ora.DATA1.dg

               ONLINE  ONLINE       ogg1                                         

ora.LISTENER.lsnr

               ONLINE  ONLINE       ogg1                                         

ora.asm

               ONLINE  ONLINE       ogg1                     Started             

ora.ons

               OFFLINE OFFLINE      ogg1                                         

--------------------------------------------------------------------------------

Cluster Resources

--------------------------------------------------------------------------------

ora.CSSd

      1        ONLINE  ONLINE       ogg1                                         

ora.diskmon

      1        OFFLINE OFFLINE                                                   

ora.evmd

      1        ONLINE  ONLINE       ogg1                                         

ora.ogg1.db

      1        ONLINE  ONLINE       ogg1                     Open  

以下操作在源库和目标库都要执行:

安装GoldenGate软件

[oracle@cwogg ~]$ mkdir -p /u01/ogg/

[oracle@cwogg u01]$ cd ogg/

[oracle@cwogg ogg]$ ls

ogg112101_fbo_ggs_linux_x64_ora11g_64bit.zip

[oracle@cwogg ogg]$ unzip ogg112101_fbo_ggs_Linux_x64_ora11g_64bit.zip 

[oracle@cwogg ogg]$ unzip ogg112101_fbo_ggs_Linux_x64_ora11g_64bit.zip 

Archive:  ogg112101_fbo_ggs_Linux_x64_ora11g_64bit.zip

  inflating: fbo_ggs_Linux_x64_ora11g_64bit.tar  

  inflating: OGG_WinUnix_Rel_Notes_11.2.1.0.1.pdf  

  inflating: Oracle GoldenGate 11.2.1.0.1 README.txt  

  inflating: Oracle GoldenGate 11.2.1.0.1 README.doc  

[oracle@cwogg ogg]$ tar -xvf fbo_ggs_Linux_x64_ora11g_64bit.tar 

配置环境变量:

export PATH=/u01/ogg:$PATH

export LD_LIBRARY_PATH=/u01/ogg:$LD_LIBRARY_PATH

export GGATE=/u01/ogg

创建ogg目录:

GGSCI (cwogg) 1> create subdirs

Creating subdirectories under current directory /u01/ogg

Parameter files                /u01/ogg/dirprm: already exists

Report files                   /u01/ogg/dirrpt: created

Checkpoint files               /u01/ogg/dirchk: created

Process status files           /u01/ogg/dirpcs: created

SQL script files               /u01/ogg/dirsql: created

Database definitions files     /u01/ogg/dirdef: created

Extract data files             /u01/ogg/dirdat: created

Temporary files                /u01/ogg/dirtmp: created

Stdout files                   /u01/ogg/dirout: created

检查数据归档模式,附加日志,强制日志,

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup mount;

ORACLE instance started.


Total System Global Area  835104768 bytes

Fixed Size    2257840 bytes

Variable Size  662703184 bytes

Database Buffers  163577856 bytes

Redo Buffers    6565888 bytes

Database mounted.

SQL> alter database force logging;

Database altered.

SQL> alter database add supplemental log data;

Database altered.

SQL> alter database archivelog;

Database altered.

SQL> alter database open;

Database altered.

SQL> select log_mode,supplemental_log_data_min,force_logging from v$database;

LOG_MODE     SUPPLEME FOR

------------ -------- ---

ARCHIVELOG   YES      YES

创建存放DDL 信息的user并赋权

SQL> create user ogg identified by ogg default tablespace users temporary tablespace temp;

User created.

SQL> grant connect,resource to ogg;

Grant succeeded.

SQL> grant execute on utl_file to ogg;

Grant succeeded.

SQL> grant create table,create sequence to ogg;

Grant succeeded.

SQL> @marker_setup.sql

Marker setup script

You will be prompted for the name of a schema for the Oracle GoldenGate database objects.

NOTE: The schema must be created prior to running this script.

NOTE: Stop all DDL replication before starting this installation.

Enter Oracle GoldenGate schema name:ogg

Marker setup table script complete, running verification script...

Please enter the name of a schema for the GoldenGate database objects:

Setting schema name to OGG

MARKER TABLE

-------------------------------

OK

MARKER SEQUENCE

-------------------------------

OK

Script complete.

SQL> @ddl_setup.sql

Oracle GoldenGate DDL Replication setup script

Verifying that current user has privileges to install DDL Replication...

You will be prompted for the name of a schema for the Oracle GoldenGate database objects.

NOTE: For an Oracle 10g source, the system recycle bin must be disabled. For Oracle 11g and later, it can be enabled.

NOTE: The schema must be created prior to running this script.

NOTE: Stop all DDL replication before starting this installation.

Enter Oracle GoldenGate schema name:ogg

Working, please wait ...

Spooling to file ddl_setup_spool.txt

Checking for sessions that are holding locks on Oracle Golden Gate metadata tables ...

Check complete.

Using OGG as a Oracle GoldenGate schema name.

Working, please wait ...

DDL replication setup script complete, running verification script...

Please enter the name of a schema for the GoldenGate database objects:

Setting schema name to OGG

CLEAR_TRACE STATUS:

Line/pos Error

---------------------------------------- -----------------------------------------------------------------

No errors No errors

CREATE_TRACE STATUS:

Line/pos Error

---------------------------------------- -----------------------------------------------------------------

No errors No errors

TRACE_PUT_LINE STATUS:

Line/pos Error

---------------------------------------- -----------------------------------------------------------------

No errors No errors

INITIAL_SETUP STATUS:

Line/pos Error

---------------------------------------- -----------------------------------------------------------------

No errors No errors

DDLVERSIONSPECIFIC PACKAGE STATUS:

Line/pos Error

---------------------------------------- -----------------------------------------------------------------

No errors No errors

DDLREPLICATION PACKAGE STATUS:

Line/pos Error

---------------------------------------- -----------------------------------------------------------------

No errors No errors

DDLREPLICATION PACKAGE BODY STATUS:

Line/pos Error

---------------------------------------- -----------------------------------------------------------------

No errors No errors

DDL IGNORE TABLE

-----------------------------------

OK

DDL IGNORE LOG TABLE

-----------------------------------

OK

DDLAUXPACKAGE STATUS:

Line/pos Error

---------------------------------------- -----------------------------------------------------------------

No errors No errors

DDLAUX PACKAGE BODY STATUS:

Line/pos Error

---------------------------------------- -----------------------------------------------------------------

No errors No errors

SYS.DDLCTXINFOPACKAGE STATUS:

Line/pos Error

---------------------------------------- -----------------------------------------------------------------

No errors No errors

SYS.DDLCTXINFOPACKAGE BODY STATUS:

Line/pos Error

---------------------------------------- -----------------------------------------------------------------

No errors No errors

DDL HISTORY TABLE

-----------------------------------

OK

DDL HISTORY TABLE(1)

-----------------------------------

OK

DDL DUMP TABLES

-----------------------------------

OK

DDL DUMP COLUMNS

-----------------------------------

OK

DDL DUMP LOG GROUPS

-----------------------------------

OK

DDL DUMP PARTITIONS

-----------------------------------

OK

DDL DUMP PRIMARY KEYS

-----------------------------------

OK

DDL SEQUENCE

-----------------------------------

OK

GGS_TEMP_COLS

-----------------------------------

OK

GGS_TEMP_UK

-----------------------------------

OK

DDL TRIGGER CODE STATUS:

Line/pos Error

---------------------------------------- -----------------------------------------------------------------

No errors No errors

DDL TRIGGER INSTALL STATUS

-----------------------------------

OK

DDL TRIGGER RUNNING STATUS

------------------------------------------------------------------------------------------------------------------------

ENABLED

STAYMETADATA IN TRIGGER

------------------------------------------------------------------------------------------------------------------------

OFF

DDL TRIGGER SQL TRACING

------------------------------------------------------------------------------------------------------------------------

0

DDL TRIGGER TRACE LEVEL

------------------------------------------------------------------------------------------------------------------------

0

LOCATION OF DDL TRACE FILE

------------------------------------------------------------------------------------------------------------------------

/u01/app/oracle/diag/rdbms/phub/PHUB/trace/ggs_ddl_trace.log

Analyzing installation status...

STATUS OF DDL REPLICATION

------------------------------------------------------------------------------------------------------------------------

SUCCESSFUL installation of DDL Replication software components

Script complete.

SQL> @role_setup.sql

GGS Role setup script

This script will drop and recreate the role GGS_GGSUSER_ROLE

To use a different role name, quit this script and then edit the params.sql script to change the gg_role parameter to the preferred name. (Do not run the script.)

You will be prompted for the name of a schema for the GoldenGate database objects.

NOTE: The schema must be created prior to running this script.

NOTE: Stop all DDL replication before starting this installation.

Enter GoldenGate schema name:ogg

Wrote file role_setup_set.txt

PL/SQL procedure successfully completed.

Role setup script complete

Grant this role to each user assigned to the Extract, GGSCI, and Manager processes, by using the following SQL command:

GRANT GGS_GGSUSER_ROLE TO <loggedUser>

where <loggedUser> is the user assigned to the GoldenGate processes.

SQL> grant GGS_GGSUSER_ROLE to ogg;

Grant succeeded.

SQL> @ddl_enable.sql

Trigger altered.

测试goldengate  

3.1在Source 和Target 上配置Manager

GGSCI (cwogg) 6> view params mgr

port 7500

dynamicportlist 7500-7505

autorestart extract *,waitminutes 2 ,retries 5

GGSCI (cwogg) 3> start mgr

Manager started.

GGSCI (cwogg) 4> info mgr

Manager is running (IP port cwogg.7500).

 3.2 配置SourceDB 的复制队列(ASM管理)

GGSCI (cwogg) 2> view params ext1

extract ext1

setenv (NLS_LANG=AMERICAN_AMERICA.AL32UTF8)

userid ogg,password ogg

rmthost 172.16.30.226, mgrport 7500

rmttrail /u01/ogg/dirdat/ht

(TRANLOGOPTIONS ASMUSER SYS@ASM,ASMPASSWORD 123123

TRANLOGOPTIONS ALTARCHIVELOGDEST primary instance PHUB +DATA/phub/archivelog/)和下面参数等价,在11.2.0.4版本中

TRANLOGOPTIONS DBLOGREADER

ddl include mapped objname scott.*;

table scott.*;

增加抽取:

GGSCI (orcl1) 20>add extract ext1,tranlog, begin now
  GGSCI (orcl1) 20>add exttrail /u01/ogg/dirdat/lt, extract ext1

3.4  配置TargetDB 同步队列

  3.4.1 在Target 端添加checkpoint表:

GGSCI (ogg1) 1> edit params ./GLOBALS

CHECKPOINTTABLE ogg.CKPT_TABLE

GGSCI (ogg1) 2> dblogin userid ogg,password ogg

Successfully logged into database.

--说明,这个用户是在Source 库启用DDL 创建的,我在Target 库也创建了这个用户。

GGSCI (ogg1) 3> add checkpointtable ogg.CKPT_TABLE

Successfully created checkpoint table ogg.CKPT_TABLE.

3.4.2 创建同步队列 

GGSCI (ogg1) 8> view params rep1

replicat rep1

setenv (NLS_LANG=AMERICAN_AMERICA.AL32UTF8)

ASSUMETARGETDEFS

userid ogg,password ogg

discardfile /u01/ogg/dirdat/rep1_discard.txt,append, megabytes 10

DDL

map scott.*, target scott.*;

GGSCI (ogg1) 31> add replicat rep1,exttrail /u01/ogg/dirdat/ht, checkpointtable ogg.CKPT_TABLE

REPLICAT added.

验证dml同步:(源库)

SQL> select count(*) from t_emp;

  COUNT(*)

----------

28

SQL> insert into t_emp select * from t_emp;

28 rows created.

SQL> commit;

Commit complete.

目标库已同步:

SQL> select count(*) from t_emp;

  COUNT(*)

----------

56

DDL同步:

SQL> drop table t_emp;(源库)

Table dropped.

SQL> desc t_emp;

ERROR:

ORA-04043: object t_emp does not exist

目标库:

SQL> desc t_emp;

ERROR:

ORA-04043: object t_emp does not exist

日志信息:

2015-10-27 15:27:24  INFO    OGG-01407  Setting current schema for DDL operation to [SYS].


您可能感兴趣的文档:

--结束END--

本文标题: Oracle ogg11 安装配置文档

本文链接: https://www.lsjlt.com/news/37955.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • Zabbix安装配置文档-Part3.配
      一、             添加 Oracle监控 Oracle监控也参考zabbix wiki上如下的方法(调用zabora工具): http://www.zabbix.com/wiki/howto/m...
    99+
    2023-01-31
    文档 Zabbix
  • OEL安装RAC 配置DNS文档
    下边有完整的附件 完整 文档以及操作流程如下 [root@rac01 ~]# cd OracleLinux-R6-U6-Server-x86_64-dvd/ [root@rac0...
    99+
    2024-04-02
  • PXC安装文档
    一 环境准备 主机IP 主机名 操作系统 PXC版本 192.168.39.135 node1 CentOS 6.8 Percona-XtraDB-Cluster-57-5.7.21 ...
    99+
    2024-04-02
  • Oracle 11g 安装配置方法图文教程
    本教程为大家分享了Oracle 11g 安装配置方法图文教程,供大家参考,具体内容如下 环境:Windows 7  64位 背景:自己的电脑上很久没有下载过数据库了,4年前装过一次,后来重新做了很...
    99+
    2024-04-02
  • Oracle怎么配置归档日志文件
    这篇文章主要介绍“Oracle怎么配置归档日志文件”,在日常操作中,相信很多人在Oracle怎么配置归档日志文件问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”Oracle怎么...
    99+
    2024-04-02
  • Oracle 11g如何安装配置
    这篇文章给大家分享的是有关Oracle 11g如何安装配置的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。具体内容如下1、将两个文件一起解压到同一目录下的同一文件夹内,(建议新建一...
    99+
    2024-04-02
  • UBUNTU Oracle配置安装方法
    本篇内容主要讲解“UBUNTU Oracle配置安装方法”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“UBUNTU Oracle配置安装方法”吧!特别值得一提的是Express Edition有...
    99+
    2023-06-16
  • 如何安装配置Oracle 11g简体中文版
    这篇文章将为大家详细讲解有关如何安装配置Oracle 11g简体中文版,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。具体内容如下1.下载Oracle 11g 地址http...
    99+
    2024-04-02
  • ThinkPHP5文档学习——配置
    文章目录 一、配置目录二、配置格式PHP数组定义其它格式的支持二级配置 三、配置加载惯例配置应用配置拓展配置场景配置 四、读取配置参数五、动态配置设置配置参数 六、独立配置独立配置...
    99+
    2023-09-02
    学习 php 数据库
  • Oracle数据库安装及配置
    文章目录 下载Oracle安装Oracle配置Oracle 下载Oracle 下载地址:(Database Software Downloads | Oracle) 下载好像需要Oracle账号,只要有邮箱就能注册。 安装Ora...
    99+
    2023-08-19
    数据库 oracle 服务器
  • EBS R12.2.7如何安装文档
    小编给大家分享一下EBS R12.2.7如何安装文档,希望大家阅读完这篇文章之后都有所收获,下面让我们一起去探讨吧! 1 操作系统安装 1.1  参考官档 Oracle E-Busi...
    99+
    2024-04-02
  • hadoop安装文件配置教程
    这篇文章主要讲解了“hadoop安装文件配置教程”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“hadoop安装文件配置教程”吧! 目前只是单机环境,namenode和datanode都在一台...
    99+
    2023-06-03
  • oracle 在 Linux下安装环境配置
    1.查看内存情况 2.查看swap情况 3.查看磁盘空间 4./tmp目录空间大于400MB 1.创建用户组 2.创建用户 3.给oracle用户设定密...
    99+
    2024-04-02
  • Linux Oracle 11gR2的配置安装步骤
    这篇文章主要介绍“Linux Oracle 11gR2的配置安装步骤”,在日常操作中,相信很多人在Linux Oracle 11gR2的配置安装步骤问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方...
    99+
    2024-04-02
  • Windows10 x64安装、配置Oracle 11g过程记录(图文教程)
    备注:本想在自己电脑上安装个oracle练习用,但是害怕安装过程中出现问题,而oracle的卸载又是出了名的麻烦,所以用虚拟机搭建了一个跟本机一样的系统,同时记录下安装的每一步。 环境: windows10...
    99+
    2024-04-02
  • mysql 8.0.18 安装配置图文教程
    学习目标:学会使用windows系统安装MySQL数据库,供大家参考,具体内容如下 1.打开浏览器输入SQL官网的下载地址:下载链接 2.下载好MySQL软件压缩包后,在C盘下创建一个web 文件夹,...
    99+
    2024-04-02
  • MySQL 8.0.28 安装配置图文教程
    本文为大家分享了MySQL 8.0.28 安装配置图文教程,供大家参考,具体内容如下 一、下载并配置安装文件 1、进入官网下载mysql安装包 2、解压安装包,如下图所示 3、添...
    99+
    2024-04-02
  • mysql 8.0.26 安装配置图文教程
    本文为大家分享了mysql 8.0.26 安装配置教程,供大家参考,具体内容如下 第一步:首先进入官网下载 MySQL : Download MySQL Community Serv...
    99+
    2024-04-02
  • 一文学会 CentOS7 安装配置 Redis
    ✅作者简介:2022年博客新星 第八。热爱国学的Java后端开发者,修心和技术同步精进。 🍎个人主页:Java Fans的博客 🍊个人信条:不迁怒,不贰过。小知识,大智慧。 💞当前专栏:...
    99+
    2023-08-24
    redis java spring boot
  • Mysql WorkBench安装配置图文教程
    本文为大家分享了Mysql WorkBench安装配置图文教程,供大家参考,具体内容如下 workbench下载地址 下载到workbench下载包后按照默认提示安装。 如果需要切换workbench...
    99+
    2024-04-02
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作