@@ -10,13 +10,12 @@ Configure Migration Prerequisites for Oracle
10
10
:depth: 1
11
11
:class: singlecol
12
12
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:
20
19
21
20
.. include:: /includes/fact-short-sync-job-desc.rst
22
21
@@ -28,13 +27,15 @@ About this Task
28
27
29
28
- If you're migrating from an Oracle 12c instance, you must run commands as
30
29
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.
38
39
39
40
Steps
40
41
-----
61
62
62
63
.. include:: /includes/fact-data-prep-oracle-step1.rst
63
64
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.
66
69
67
70
.. code-block:: sql
68
71
:copyable: true
@@ -86,46 +89,48 @@ Steps
86
89
GRANT SELECT ON V$ARCHIVED_LOG TO <user>;
87
90
GRANT SELECT ON V$ARCHIVE_DEST_STATUS TO <user>;
88
91
GRANT SELECT ON V$TRANSACTION TO <user>;
92
+ GRANT SELECT ON V_$MYSTAT TO <user>;
93
+ GRANT SELECT ON V_$STATNAME TO <user>;
89
94
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
106
96
107
- .. tip::
97
+ a. To see if archive logging is already enabled, run the following query:
98
+
99
+ .. code-block:: sql
100
+ :copyable: true
108
101
109
- To check if ``LogMiner`` is already enabled, run the
110
- following query:
102
+ SELECT LOG_MODE FROM V$DATABASE;
111
103
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
114
116
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;
116
123
117
124
.. step:: Enable supplemental logging
118
125
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:
121
127
122
128
.. code-block:: sql
123
129
:copyable: true
124
130
125
131
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
126
132
127
- #. You must also enable supplemental logging for every
128
- table in the migration:
133
+ #. Enable supplemental logging for every table in the migration:
129
134
130
135
.. code-block:: sql
131
136
:copyable: true
0 commit comments