@@ -10,13 +10,12 @@ Configure Migration Prerequisites for Oracle
1010 :depth: 1
1111 :class: singlecol
1212
13- To run migration jobs from an Oracle source database, the database may require
14- some configuration changes. If Relational Migrator determines the
15- database needs configuration changes, it automatically generates a
16- SQL script with the required changes. It is recommended to have a
17- Database Administrator (DBA) review the commands in this script and
18- perform their execution on the database server. The
19- Oracle configurations depend on the type of migration job:
13+ When you migrate data from an Oracle source database, Relational Migrator
14+ automatically checks your database for needed configuration changes and
15+ generates a SQL script to implement them. Have a Database Administrator (DBA)
16+ review the script and run the commands on the database server.
17+
18+ Oracle configuration depends on the type of migration job:
2019
2120.. include:: /includes/fact-short-sync-job-desc.rst
2221
@@ -28,13 +27,15 @@ About this Task
2827
2928- If you're migrating from an Oracle 12c instance, you must run commands as
3029 the SYSDBA role.
31- - In Oracle 12c the concept of a pluggable database was introduced. Some
32- of these commands can be run on PDB(plugable database) while commands
33- such as enabling ``ARCHIVELOG`` must be run on the
34- CDB(container/master database). For details on each architecture,
35- see `Overview of Container Databases and Pluggable Databases
36- <https://oracle-base.com/articles/12c/multitenant-overview-container-database-cdb-12cr1>`__.
37- - Supplemental logging is not allowed in Oracle Express editions.
30+ - Oracle 12c introduced the concept of a pluggable database (PDB). Some
31+ commands can be run on a PDB, while commands like enabling ``ARCHIVELOG``
32+ must be run on the container/master database (CDB). For details on each
33+ architecture, see `Overview of Container Databases and Pluggable Databases <https://oracle-base.com/articles/12c/multitenant-overview-container-database-cdb-12cr1>`__.
34+ - Some commands differ based on whether the database is single or
35+ multi-tenant. In a multi-tenant database, permissions must
36+ include the suffix ``CONTAINER=ALL``.
37+ - You can't run a continuous migration job against Oracle Database Express
38+ Edition (XE), because XE doesn't support the necessary logs.
3839
3940Steps
4041-----
6162
6263 .. include:: /includes/fact-data-prep-oracle-step1.rst
6364
64- c. Grant additional permissions to the service account
65- to run continuous migration jobs:
65+ d. Grant additional permissions to the service account
66+ to run continuous migration jobs.
67+
68+ Append ``CONTAINER=ALL`` if you're migrating a multi-tenant container database.
6669
6770 .. code-block:: sql
6871 :copyable: true
@@ -86,46 +89,48 @@ Steps
8689 GRANT SELECT ON V$ARCHIVED_LOG TO <user>;
8790 GRANT SELECT ON V$ARCHIVE_DEST_STATUS TO <user>;
8891 GRANT SELECT ON V$TRANSACTION TO <user>;
92+ GRANT SELECT ON V_$MYSTAT TO <user>;
93+ GRANT SELECT ON V_$STATNAME TO <user>;
8994
90- .. step:: Turn on ``LogMiner`` at the database level
91-
92- To run continous jobs against Oracle, you must enable
93- ``LogMiner`` at the database level. The following code-block
94- is an example of automatically-generated code, which you
95- can run manually by substituting your database name:
96-
97- .. code-block:: sql
98- :copyable: true
99-
100- ALTER SYSTEM SET db_recovery_file_dest_size = 10G;
101- ALTER SYSTEM SET db_recovery_file_dest = '/opt/oracle/oradata/recovery_area' SCOPE=spfile;
102- SHUTDOWN IMMEDIATE;
103- STARTUP MOUNT
104- ALTER DATABASE ARCHIVELOG;
105- ALTER DATABASE OPEN;
95+ .. step:: Turn on archive logging
10696
107- .. tip::
97+ a. To see if archive logging is already enabled, run the following query:
98+
99+ .. code-block:: sql
100+ :copyable: true
108101
109- To check if ``LogMiner`` is already enabled, run the
110- following query:
102+ SELECT LOG_MODE FROM V$DATABASE;
111103
112- .. code-block:: sql
113- :copyable: true
104+ This outputs ``ARCHIVELOG`` if logging is enabled, or
105+ ``NOARCHIVELOG`` if it isn't.
106+
107+ #. If archive logging isn't already enabled, enable it.
108+
109+ Relational Migrator can automatically generate code to enable
110+ logging. The following code is an example. If you're migrating a
111+ multi-tenant database, run these commands on the container/
112+ master database.
113+
114+ .. code-block:: sql
115+ :copyable: true
114116
115- SELECT LOG_MODE FROM V$DATABASE;
117+ ALTER SYSTEM SET db_recovery_file_dest_size = 10G;
118+ ALTER SYSTEM SET db_recovery_file_dest = '/opt/oracle/oradata/recovery_area' scope=spfile;
119+ SHUTDOWN IMMEDIATE;
120+ STARTUP MOUNT
121+ ALTER DATABASE ARCHIVELOG;
122+ ALTER DATABASE OPEN;
116123
117124 .. step:: Enable supplemental logging
118125
119- a. To run continuous migration jobs against Oracle, you must
120- enable supplemental logging at the database level:
126+ a. Enable supplemental logging on the database:
121127
122128 .. code-block:: sql
123129 :copyable: true
124130
125131 ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
126132
127- #. You must also enable supplemental logging for every
128- table in the migration:
133+ #. Enable supplemental logging for every table in the migration:
129134
130135 .. code-block:: sql
131136 :copyable: true
0 commit comments