Zero Downtime Installation Guide for Oracle

Zero Downtime Installation Guide for Oracle

Prepare the Oracle Databases

Prepare the Oracle Databases

Use Oracle SQL*Plus (
sqlplus
) to run the SQL scripts and the wrapped source code files. Prepare the databases on the source and target systems. Before you begin, ensure that you open the ports that Oracle GoldenGate requires, and the source and target schemas are the same.
Configure the Oracle databases with directory permissions, and then enable replication and logging on the databases. From the Hub Console, enable ZDT on the source and target schemas. A DBA must grant execute permissions to the GoldenGate user on both the source and target systems. Do not insert or update data in either database until you finish installing and configuring ZDT successfully.
If you must update GoldenGate Manager data in the source database while installing ZDT, use system change number (SCN) during the data export. Oracle GoldenGate can use the SCNs to replicate the changes after the installation is complete. For more information, see the Oracle GoldenGate documentation.
  1. As the SYSDBA user, enable replication on the source and target databases.
    ALTER SYSTEM SET enable_goldengate_replication=true;
  2. Open the repository database
    C_REPOS_DATABASE
    , and set the
    GLOBAL_NOLOGGING_IND
    to
    0
    on the source and target databases.
  3. As the schema user, enable logging for all tables in the schema. Repeat on both databases.
    1. Create a
      nologging.sql
      file in the current directory.
    2. In the command prompt, enter the following command:
      spool nologging.sql set pagesize 5000 select 'ALTER TABLE ' || TABLE_NAME || ' LOGGING;' from user_tables where LOGGING != 'YES' and TABLE_NAME like 'C^_%' ESCAPE '^'; exit
    3. After the script completes its run, open the
      nologging.sql
      file, remove headers, and save.
    4. At an sqlplus prompt, log in to the schema as the ORS user and run the edited
      nologging.sql
      file.
      SQL> @nologgging.sql
    5. For each base object in
      C_REPOS_TABLE
      , set the
      NOLOGGING_IND
      indicator to
      0
      . Repeat on both databases.
      Exclude all table names ending with _STRP. The _STRP tables must have
      NOLOGGING_IND
      set to
      1
      for the metadata validation to succeed.
      For example, replace
      C_REPOS_TABLE
      in the following sample script with the name of a base object and run the script:
      UPDATE C_REPOS_TABLE SET NOLOGGING_IND = 0 WHERE NOLOGGING_IND = 1 and table_name != 'C_RBO_CLASS' and table_name != 'C_RBO_HIERARCHY' and table_name != 'C_RBO_REL_TYPE';
  4. As a schema user, open the Hub Console, and enable the ZDT mode for both schemas.
  5. Optionally, to verify that the settings are correct, open the repository table
    C_REPOS_DB_RELEASE
    as the schema user and verify the following settings:
    • ZDT_IND
      is set to
      1
      .
    • GLOBAL_NOLOGGING_IND
      is set to
      0
      .
  6. As the SYSDBA user, add supplemental log data for the source database.
    Optional. The
    ALTER DATABASE ADD SUPPLEMENTAL LOG DATA
    command adds supplemental log data to the source database.
    C:> sqlplus connect sys as sysdba; SQL> -- make sure you had previously shutdown normally SQL> STARTUP MOUNT; SQL> ALTER DATABASE ARCHIVELOG; SQL> ALTER DATABASE OPEN; SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA; SQL> ALTER SYSTEM SWITCH LOGFILE; SQL> EXIT
  7. As the SYSDBA user, create a user for GoldenGate replication and grant execute permissions to the GoldenGate user on both the source and target systems.
    grant create session, connect, resource, dba to ggadmin; grant select any dictionary to ggadmin; grant create view to ggadmin; grant execute on dbms_lock to ggadmin; exec dbms_goldengate_auth.grant_admin_privilege ('GGADMIN'); grant flashback any table to ggadmin;
    To use Oracle GoldenGate for Oracle version 12.3.0.14 or later, you must grant these execute permissions.

0 COMMENTS

We’d like to hear from you!