Académique Documents
Professionnel Documents
Culture Documents
The following technical notes shows how to install and create 11g R2 database on CentOS. You can use this a guide to install Oracle 11.2.0.2 software on
a VMWare.
http://www.mydbanotes.com/2011/05/oracle-11g-installation-on-64-bit.html
From the above document, we are assuming that the following directories are created and oracle:oinstall has the correct permissions. If not create and
grant proper permission as below:
mkdir -p /u01 /u02 /u03 /u04 /u05 /u14 /u15 /u16 /u17 /u18 /u99
chown -R oracle:oinstall /u01/app/oracle
chmod -R 775 /u01/app/oracle
chown -R oracle:oinstall /u01 /u02 /u03 /u04 /u05 /u14 /u15 /u16 /u17 /u18 /u99
chmod -R 775 /u02 /u03 /u04 /u05 /u14 /u15 /u16 /u17 /u18 /u99
Download 11.2.0.2 Software for 64-bit Linux and install Oracle Software Only.
mkdir -p /u99/software/DB/11g/11.2.0.2/64-bit/
scp 192.168.0.223:/u99/software/DB/11g/11.2.0.2/64-bit/* /u99/software/DB/11g/11.2.0.2/64-bit/.
cd /u99/software/DB/11g/11.2.0.2/64-bit/
Download 11g GG Software.
mkdir -p /u99/software/GoldenGate/11g/64-bit
scp oracle@192.168.0.223:/u99/software/GoldenGate/11g/64-bit /u99/software/GoldenGate/11g/64-bit/.
Trail files are created as needed during processing, and they are aged automatically to allow processing to continue without interruption for file
maintenance. By default, each file in a trail is 10 MB in size.
Checkpoints: Checkpoints store the current read and write positions of a process to disk for recovery purposes. These checkpoints ensure that data
changes that are marked for synchronization actually are extracted by Extract and replicated by Replicat, and they prevent redundant processing. They
provide fault tolerance by preventing the loss of data should the system, the network, or an Oracle GoldenGate process need to be restarted.
Manager: Manager is the control process of Oracle GoldenGate. Manager must be running on each system in the Oracle GoldenGate configuration
before Extract or Replicat can be started, and Manager must remain running while those processes are running so that resource management functions
are performed. Manager performs the following functions:
Collector: Collector is a process that runs in the background on the target system. Collector receives extracted database changes that are sent across
the TCP/IP network, and it writes them to a trail or extract file. Typically, Manager starts Collector automatically when a network connection is required.
When Manager starts Collector, the process is known as a dynamic Collector, and Oracle GoldenGate users generally do not interact with it. However, you
can run Collector manually. This is known as a static Collector. Not all Oracle GoldenGate configurations use a Collector process.
spool /tmp/gg_setup.rtf
@$GGATE/marker_setup.sql
Enter GoldenGate schema name:ggate
@$GGATE/ddl_setup.sql
Enter mode of installation:INITIALSETUP
@$GGATE/role_setup.sql
grant GGS_GGSUSER_ROLE to ggate;
@$GGATE/ddl_enable.sql
exit;
Source Server:
---------------Create test schemas for replication. I will create a replication from schema sender to schema receiver
sq
create user sender identified by abc123 default tablespace users temporary tablespace temp;
grant connect,resource,unlimited tablespace to sender;
Destination DB:
--------------sq
create user ggate identified by abc123 default tablespace users temporary tablespace temp;
grant connect,resource,unlimited tablespace to ggate;
grant execute on utl_file to ggate;
create user receiver identified by abc123 default tablespace users temporary tablespace temp;
grant connect,resource,unlimited tablespace to receiver;
exit;
@$GGATE/marker_setup.sql
@$GGATE/ddl_setup.sql
@$GGATE/role_setup.sql
grant GGS_GGSUSER_ROLE to ggate;
@$GGATE/ddl_enable.sql
Source DB:
---------cd $GGATE
./ggsci
--to check the status of Manager process. The Manager process must be running on both the source as well as target systems before the Extract or
Replicat process can be started and performs a number of functions including monitoring and starting other GoldenGate processes, managing the trail files
and also reporting.
info all
--add the port# for manager to start the process. 7809 is default.
edit params mgr
PORT 7809
autostart ER *
PURGEOLDEXTRACTS /u01/app/oracle/product/11.2.0/gg/dirdat/*, USECHECKPOINTS, MINKEEPHOURS 4
start manager
DBLOGIN USERID ggate, PASSWORD abc123
DBLOGIN USERID sender, PASSWORD abc123
exit
Destination DB:
--------------cd $GGATE
ggsci
info all
edit params mgr
PORT 7809
autostart ER *
PURGEOLDEXTRACTS /u01/app/oracle/product/11.2.0/gg/dirdat/*, USECHECKPOINTS, MINKEEPHOURS 4
start manager
info all
exit
--Create Parameter file for replicat. Add the following lines in the parameter file.
--Replicat group Name
replicat rep1
-------------------------------ggsci
start extract ext1
info all
Verification:
--------------On Source Server
sq
create table sender.emp as select * from scott.emp;
DECLARE
v_count number := 0;
BEGIN
LOOP
EXIT WHEN v_count > 16;
INSERT INTO sender.emp
SELECT * FROM sender.emp;
COMMIT;
v_count := v_count + 1;
END LOOP;
END;
/
select count(*) from sender.emp;
--On Destination Server
sq
That's it. You just created Uni-Directional Replication using Oracle GoldenGate.
commands
--------history
show all
info all
start manager
DBLOGIN USERID ggs_owner, PASSWORD ggs_owner
stop manager
fc --> same like fc -l of unix?
help add extract
help add replicat
stop replicat rep1
stop stop extract ext1
SEND EXTRACT EXT1, FORCESTOP
stop manager
edit params mgr
edit params ext1
edit params rep1
Error logs
view ggsevt
vi $GGATE/ggserr.log
tail -f $GGATE/ggserr.log
$GGATE/dirrpt/EXT1.rpt --Extract logs are here.
view report mgr
view report ext1
view report rep1
References:
Oracle Main GoldenGate Documentation:
http://www.oracle.com/technetwork/middleware/goldengate/documentation/index.html
Oracle GoldenGate Documentation:
http://download.oracle.com/docs/cd/E18101_01/index.htm
GG Administrators Guide
http://download.oracle.com/docs/cd/E18101_01/doc.1111/e17341.pdf
GG installation on SQL Server:
http://download.oracle.com/docs/cd/E18101_01/index.htm
GG installation on Oracle:
http://download.oracle.com/docs/cd/E18101_01/doc.1111/e17799.pdf