06.01. Creating Oracle database DownStream

                                                    <<< Back   Next >>>
1. Preparing the downstream database parameters file
[oracle@ogg-sqv]$>
vi $ORACLE_HOME/dbs/initds.ora
*.audit_file_dest='/u01/app/oracle/admin/ds/adump'
*.audit_trail='db'
*.compatible='19.0.0'
*.control_files='/u01/oradata/ds/control01.ctl','/u01/oradata/ds/control02.ctl'
*.db_block_size=8192
*.db_name='ds'
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=dsXDB)'
*.nls_language='AMERICAN'
*.nls_territory='AMERICA'
*.open_cursors=300
*.pga_aggregate_target=100m
*.processes=300
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=3100m
*.undo_tablespace='UNDOTBS1'

2. Creating the Downstream database
[oracle@ogg-sqv]$>
sqlplus / as sysdba

-- startup database
startup nomount;
-- creation controlfile
CREATE DATABASE ds
MAXINSTANCES 8
MAXLOGHISTORY 1
MAXLOGFILES 16
MAXLOGMEMBERS 2
MAXDATAFILES 300
DATAFILE '/u01/oradata/ds/system01.dbf' SIZE 2G REUSE AUTOEXTEND ON NEXT 1G MAXSIZE UNLIMITED
EXTENT MANAGEMENT LOCAL
SYSAUX DATAFILE '/u01/oradata/ds/sysaux01.dbf' SIZE 2G REUSE AUTOEXTEND ON NEXT 1G MAXSIZE UNLIMITED
SMALLFILE DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE '/u01/oradata/ds/temp01.tmp' SIZE 4G REUSE AUTOEXTEND ON NEXT 1G MAXSIZE UNLIMITED
SMALLFILE UNDO TABLESPACE "UNDOTBS1" DATAFILE '/u01/oradata/ds/undotbs01.dbf' SIZE 2G REUSE AUTOEXTEND ON NEXT 1G MAXSIZE UNLIMITED
CHARACTER SET AL32UTF8
NATIONAL CHARACTER SET UTF8
LOGFILE
GROUP 1 ('/u01/oradata/ds/prm_redo01.log') SIZE 100m,
GROUP 2 ('/u01/oradata/ds/prm_redo02.log') SIZE 100m,
GROUP 3 ('/u01/oradata/ds/prm_redo03.log') SIZE 100m
USER SYS IDENTIFIED BY "***" USER SYSTEM IDENTIFIED BY "***";
-- add standby logfiles
alter database add standby logfile group 11 ('/u01/oradata/ds/stb_redo10.log') SIZE 100m;
alter database add standby logfile group 12 ('/u01/oradata/ds/stb_redo11.log') SIZE 100m;
alter database add standby logfile group 13 ('/u01/oradata/ds/stb_redo12.log') SIZE 100m;
alter database add standby logfile group 14 ('/u01/oradata/ds/stb_redo13.log') SIZE 100m;
-- creation metadata
@$ORACLE_HOME/rdbms/admin/catalog.sql;
@$ORACLE_HOME/rdbms/admin/catproc.sql;
@$ORACLE_HOME/rdbms/admin/catblock.sql;
@$ORACLE_HOME/rdbms/admin/catoctk.sql;
@$ORACLE_HOME/rdbms/admin/owminst.plb;
connect "SYSTEM"/"&&systemPassword"
@$ORACLE_HOME/sqlplus/admin/pupbld.sql;
exit;

3. creation user ggadmin (for replication)
[oracle@ogg-sqv]$>
sqlplus / as sysdba

create tablespace gg_data datafile '/u01/oradata/ds/gg_data_01.dbf' size 100m autoextend on next 100m maxsize unlimited;
create user ggadmin identified by *** default tablespace gg_data temporary tablespace temp;
grant connect,resource,create session, alter session to ggadmin;
grant select any dictionary, select any table,create table to ggadmin;
grant alter any table to ggadmin;
grant execute on utl_file to ggadmin;
grant flashback any table to ggadmin;
grant execute on dbms_flashback to ggadmin;
grant execute on utl_file to ggadmin;
--Doc ID 1628986.1
grant alter system to ggadmin;
GRANT UNLIMITED TABLESPACE TO ggadmin;
alter user ggadminquota unlimited on GG_DATA;
grant select on system.logmnr_session$ to ggadmin;
begin
dbms_goldengate_auth.grant_admin_privilege('GGADMIN');
end;
/

4.Changing the database parameters
[oracle@ogg-sqv]$>
sqlplus / as sysdba

alter system set log_archive_config='dg_config=(dbquik01,dbquik02,ds)';
alter system set enable_goldengate_replication=true;

5. Adding aliases to the tnsnames.ora file
vi $ORACLE_HOME/network/admin/tnsnames.ora
dbquik01 = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = db-quik01.oracak.com)(PORT = 1521)))(CONNECT_DATA = (SERVICE_NAME = dbquik01)))
dbquik02 = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = db-quik02.oracak.com)(PORT = 1521)))(CONNECT_DATA = (SERVICE_NAME = dbquik02)))
ds = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = ogg-srv.oracak.com)(PORT = 1521)))(CONNECT_DATA = (SERVICE_NAME = ds)))

6. Creating a directory for receiving archive logs with the receiver database
[oracle@ogg-sqv]$>
mkdir -p /u01/oradata/downstream/

                                                     <<< Back   Next >>>