Set up database for Cloud-hosted migration assistant

As preparation to move your data from your Data Center instance into Atlassian Cloud, you will need to set up your database for migration. Configuring your database helps the Migration connector app receive database change events. Read about Cloud-hosted migration assistant

The Cloud-hosted migration assistant is currently available only to a limited number of customers participating in an early access program. We are not enrolling new customers at this time, but we will keep you updated when we reopen enrollment.

Before you begin

Make sure to have the following information:

  • Access to your database and database manager

  • Information on the version of the database your company uses

To configure your database for migration, you will need to reboot it. Make sure you plan for downtime accordingly.

Follow the instructions based on your database. The steps listed below are similar to replicating your primary database. If you can’t find your database, follow the replication instructions provided by your database vendor to configure your database for migration.

Find instructions for:

Instructions for PostgreSQL

Supported versions: PostgreSQL 11 or later (standalone, RDS, or Aurora)

Setup instructions for standalone PostgreSQL and on RDS

To set up your PostgreSQL database:

  1. Back up your database and postgresql.conf file before making changes.

  2. Enable logical replication. Refer to your database vendor’s documentation for details.

    • Connect to your database using psql and check current settings:

show wal_level;
show max_replication_slots;
show max_wal_senders;
SELECT * FROM pg_replication_slots;
SELECT * FROM pg_publication;
SHOW config_file;


  • Add the following configurations to the bottom of your postgresql.conf file: 
-- Enables logical decoding of WAL for logical replication and change data capture scenarios
wal_level = logical

-- Sets the minimum message severity level that is logged; "warning" logs warnings and above
log_min_messages = warning

-- Sets the maximum number of replication slots for streaming changes to replicas or consumers 
max_replication_slots = 10

-- Sets the maximum number of concurrent connections sending WAL data for replication
max_wal_senders = 10

3. Enable Replica Identity as Full for the tables.

DO $$ 
DECLARE 
    r RECORD;
BEGIN
    FOR r IN 
        SELECT table_schema, table_name 
        FROM information_schema.tables 
        WHERE table_schema = 'public'
          AND table_type = 'BASE TABLE'
    LOOP
        EXECUTE format('ALTER TABLE %I.%I REPLICA IDENTITY FULL', r.table_schema, r.table_name);
    END LOOP;
END $$;

4. Restart PostgreSQL to apply changes:

sudo systemctl restart postgresql

5. Create a logical replication user with limited privileges: 

psql -h <DB-HOSTNAME> -p <DB-PORT> -U <DB-ADMIN-USER> -d <DB-NAME> -f sql_queries.sql

6. Create a publication by replacing atldb with your Jira database name if different: 

-- create replication publication
CREATE PUBLICATION dbz_publication FOR ALL TABLES;

-- create a user for replication role
CREATE USER replication_user WITH PASSWORD 'xxxxx';

-- grant replication permission
ALTER USER replication_user WITH REPLICATION;

-- grant connect to jira database
GRANT CONNECT ON DATABASE atldb TO replication_user;

-- grant read access for all jira tables
GRANT SELECT ON ALL TABLES IN SCHEMA public TO replication_user;

-- grant read access for newly created jira tables
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO replication_user

Setup instructions for standalone PostgreSQL in Aurora

To set up your PostgreSQL database:

  1. Back up your database and postgresql.conf file before making changes.

  2. Enable logical replication:

    • Connect to your database using psql and check current settings:

show wal_level;
show max_replication_slots;
show max_wal_senders;
SELECT * FROM pg_replication_slots;
SELECT * FROM pg_publication;
SHOW config_file;

Add the following configurations to the bottom of your postgresql.conf file:

-- Enables logical decoding of WAL for logical replication and change data capture scenarios
wal_level = logical

-- Sets the minimum message severity level that is logged; "warning" logs warnings and above
log_min_messages = warning

-- Sets the maximum number of replication slots for streaming changes to replicas or consumers 
max_replication_slots = 10

-- Sets the maximum number of concurrent connections sending WAL data for replication
max_wal_senders = 10

3. Create a new database cluster parameter group and set the following parameters:

-- Enables logical replication features, allowing streaming of data changes for replication or migration purposes
rds.logical_replication = 1 

-- Sets the minimum message severity level that is logged; "warning" logs warnings and above
log_min_messages = warning

-- Sets the maximum number of replication slots for streaming changes to replicas or consumers 
max_replication_slots = 10

-- Sets the maximum number of concurrent connections sending WAL data for replication
max_wal_senders = 10

4. Enable Replica Identity as Full for the tables.

DO $$ 
DECLARE 
    r RECORD;
BEGIN
    FOR r IN 
        SELECT table_schema, table_name 
        FROM information_schema.tables 
        WHERE table_schema = 'public'
          AND table_type = 'BASE TABLE'
    LOOP
        EXECUTE format('ALTER TABLE %I.%I REPLICA IDENTITY FULL', r.table_schema, r.table_name);
    END LOOP;
END $$;

5. Restart PostgreSQL to apply changes:

sudo systemctl restart postgresql

6. Create a logical replication user with limited privileges:

psql -h <DB-HOSTNAME> -p <DB-PORT> -U <DB-ADMIN-USER> -d <DB-NAME> -f sql_queries.sql

7. Create a publication by replacing atldb with your Jira database name if different:

-- create replication publication
CREATE PUBLICATION dbz_publication FOR ALL TABLES;

-- create a user for replication role
CREATE USER replication_user WITH PASSWORD 'xxxxx';

-- grant replication permission
ALTER USER replication_user WITH REPLICATION;

-- grant connect to jira database
GRANT CONNECT ON DATABASE atldb TO replication_user;

-- grant read access for all jira tables
GRANT SELECT ON ALL TABLES IN SCHEMA public TO replication_user;

-- grant read access for newly created jira tables
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO replication_user



Instructions for MySQL

Supported versions: MySQL 8.0.xx

Setup instructions for MySQL

To set up your MySQL database:

  1. Back up your database before making changes.

  2. Enable replication:

    • Check current settings:

-- log_bin should be ON which is required for replication
mysql> SHOW VARIABLES LIKE 'log_bin'; 
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| log_bin       | ON    |
+---------------+-------+

-- Expected Value: ROW (required for debezium)
mysql> SHOW VARIABLES LIKE 'binlog_format';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| binlog_format | ROW   |
+---------------+-------+
  
-- server_id must be set to a non-zero unique number for replication to work.
mysql> SHOW VARIABLES LIKE 'server_id';
+---------------+-----------+
| Variable_name | Value     |
+---------------+-----------+
| server_id     | 12321     |
+---------------+-----------+

mysql> SHOW VARIABLES LIKE 'binlog_row_image';
+------------------+-------+
| Variable_name    | Value |
+------------------+-------+
| binlog_row_image | FULL  |
+------------------+-------+

3. Create a custom mysql.conf file in /etc/mysql/ with the following configuration:

[mysqld]
log-bin=mysql-bin
binlog-format=ROW
binlog_row_image=FULL
server-id=1234
    • If using Docker-based MySQL: Create a custom mysql.conf file in /etc/mysql/ with following configuration: 

      [mysqld]
      log-bin=mysql-bin
      binlog-format=ROW
      binlog_row_image=FULL
      server-id=1234

4. Restart MySQL to apply changes.

5. Verify that the setup was done correctly: 

SHOW VARIABLES LIKE 'log_bin'; 
SHOW VARIABLES LIKE 'binlog_format';
SHOW VARIABLES LIKE 'server_id';
SHOW VARIABLES LIKE 'binlog_row_image';

6. Create a replication user: 

-- Create Replication User for MySQL
CREATE USER 'replication_user'@'%' IDENTIFIED BY 'xxxxx';

-- Granting permissions
GRANT RELOAD, REPLICATION CLIENT, SELECT, SHOW DATABASES, REPLICATION SLAVE ON *.* TO 'replication_user'@'%';

-- Apply the changes immediately (if needed)
FLUSH PRIVILEGES;

-- view permissions
SHOW GRANTS FOR 'replication_user'@'%';

Setup instructions for MySQL on Amazon RDS

To set up your MySQL database:

  1. Back up your database before making changes.

  2. Enable replication:

Check current settings:

-- log_bin should be ON which is required for replication
mysql> SHOW VARIABLES LIKE 'log_bin'; 
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| log_bin       | ON    |
+---------------+-------+

-- Expected Value: ROW (required for debezium)
mysql> SHOW VARIABLES LIKE 'binlog_format';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| binlog_format | ROW   |
+---------------+-------+
  
-- server_id must be set to a non-zero unique number for replication to work.
mysql> SHOW VARIABLES LIKE 'server_id';
+---------------+-----------+
| Variable_name | Value     |
+---------------+-----------+
| server_id     | 12321     |
+---------------+-----------+

mysql> SHOW VARIABLES LIKE 'binlog_row_image';
+------------------+-------+
| Variable_name    | Value |
+------------------+-------+
| binlog_row_image | FULL  |
+------------------+-------+

3. Enable automated backups for your database instance to enable binary logging.

    • If the database instance is not configured to perform automated backups, the binlog will be disabled, even if you apply the settings described in the previous steps.

    • Go to AWS console and search for “your-mysql-database-name” under RDS.

    • Enable automated backup required for binary logging.

    • Edit database parameter group and set (check if they are already enabled):

      • binlog-format=ROW

      • binlog_row_image=FULL

      • server-id=1234

4. Restart MySQL to apply changes.

5. Verify that the setup was done correctly:

SHOW VARIABLES LIKE 'log_bin'; 
SHOW VARIABLES LIKE 'binlog_format';
SHOW VARIABLES LIKE 'server_id';
SHOW VARIABLES LIKE 'binlog_row_image';

6. Create a replication user: 

-- Create Replication User for MySQL
CREATE USER 'replication_user'@'%' IDENTIFIED BY 'xxxxx';

-- Granting permissions
GRANT RELOAD, REPLICATION CLIENT, SELECT, SHOW DATABASES, REPLICATION SLAVE ON *.* TO 'replication_user'@'%';

-- Apply the changes immediately (if needed)
FLUSH PRIVILEGES;

-- view permissions
SHOW GRANTS FOR 'replication_user'@'%';



Instructions for MS SQL Server

Supported versions: 2017, 2019, 2022

Setup instructions for MS SQL Server

To set up your MS SQL Server database:

  1. Back up your database before making changes.

  2. Check if Change Data Capture (CDC) is enabled:

-- <database> - database name on which replication needs to be run. Default: atldb
SELECT name, is_cdc_enabled FROM sys.databases WHERE name = '<database>';

-- <atldb_table> - a table name on which replication needs to be run. Default: cwd_user
SELECT name, is_tracked_by_cdc FROM sys.tables WHERE name = '<atldb_table>';

3. If CDC is not enabled, using the following script to enable it. Note: Only a user with admin permissions can perform this action.

Expand for script...
-- Enable CDC on the User Database
USE atldb;

BEGIN

EXEC sys.sp_cdc_enable_db;

EXEC sys.sp_cdc_add_job
    @job_type = N'capture';

EXEC sys.sp_cdc_change_job
    @job_type = N'capture',
    @maxtrans = 50,  -- Maximum number of transactions to process in a single job run
    @maxscans = 2,  -- Maximum number of scans to perform in a single job run
    @pollinginterval = 10;  -- in seconds

-- Enable CDC on Specific Tables
DECLARE @schema_name NVARCHAR(128), @table_name NVARCHAR(128), @sql NVARCHAR(MAX);

DECLARE table_cursor CURSOR FOR
SELECT s.name, t.name
FROM sys.tables t
         JOIN sys.schemas s ON t.schema_id = s.schema_id
WHERE t.is_ms_shipped = 0;

OPEN table_cursor;
FETCH NEXT FROM table_cursor INTO @schema_name, @table_name;

WHILE @@FETCH_STATUS = 0
BEGIN
    PRINT 'Enabling CDC for table: ' + @schema_name + '.' + @table_name;
    BEGIN TRY
        SET @sql = N'EXEC sys.sp_cdc_enable_table ' +
                   N'@source_schema = N''' + @schema_name + ''', ' +
                   N'@source_name = N''' + @table_name + ''', ' +
                   N'@role_name = NULL, ' +
                   N'@supports_net_changes = 0;';
        EXEC sp_executesql @sql;
        WAITFOR DELAY '00:00:01' -- Throttle
    END TRY
    BEGIN CATCH
        PRINT 'Failed to enable CDC for table ' + @table_name + ': ' + ERROR_MESSAGE()
    END CATCH
    FETCH NEXT FROM table_cursor INTO @schema_name, @table_name;
END

CLOSE table_cursor;
DEALLOCATE table_cursor;

END


4. Save the above script in to enable-cdc.sql and execute it using following command

sqlcmd -S <dbhost> -U <dbuser> -P '<dbpassword>' -d <dbname> -i enable-cdc.sql

5. Validate CDC is now enabled as per step 2.

6. Create a CDC user: 

-- Create a SQL Server login

CREATE LOGIN replication_login WITH PASSWORD = 'StrongPassword123!';

-- Switch to your source database

USE atldb;

-- Create a user tied to the login

CREATE USER replication_user FOR LOGIN replication_login;

GRANT required permission

-- grant membership in db_datareader role

ALTER ROLE db_datareader ADD MEMBER replication_user;

-- grant access for debezium to access tables and CDC metadata

GRANT EXECUTE ON SCHEMA::cdc TO replication_user;

GRANT SELECT ON SCHEMA::cdc TO debezium_user;

Setup instructions for MS SQL Server on Amazon RDS

To set up your MS SQL Server database:

  1. Back up your database before making changes.

  2. Check if Change Data Capture (CDC) is enabled:

    -- <database> - database name on which replication needs to be run. Default: atldb
    SELECT name, is_cdc_enabled FROM sys.databases WHERE name = '<database>';
    
    -- <atldb_table> - a table name on which replication needs to be run. Default: cwd_user
    SELECT name, is_tracked_by_cdc FROM sys.tables WHERE name = '<atldb_table>';

3. If CDC is not enabled, enable CDC using the following script. Note: Only users with admin permissions can perform this action.

Expand for script...
-- Enable CDC on the User Database
USE atldb;

BEGIN
EXEC msdb.dbo.rds_cdc_enable_db atldb;

-- Enable CDC on Specific Tables
DECLARE @schema_name NVARCHAR(128), @table_name NVARCHAR(128), @sql NVARCHAR(MAX);

DECLARE table_cursor CURSOR FOR
SELECT s.name, t.name
FROM sys.tables t
         JOIN sys.schemas s ON t.schema_id = s.schema_id
WHERE t.is_ms_shipped = 0;

OPEN table_cursor;
FETCH NEXT FROM table_cursor INTO @schema_name, @table_name;

WHILE @@FETCH_STATUS = 0
BEGIN
    PRINT 'Enabling CDC for table: ' + @schema_name + '.' + @table_name;
    BEGIN TRY
        SET @sql = N'EXEC sys.sp_cdc_enable_table ' +
                   N'@source_schema = N''' + @schema_name + ''', ' +
                   N'@source_name = N''' + @table_name + ''', ' +
                   N'@role_name = NULL;';
        EXEC sp_executesql @sql;
        WAITFOR DELAY '00:00:01' -- Throttle
    END TRY
    BEGIN CATCH
        PRINT 'Failed to enable CDC for table ' + @table_name + ': ' + ERROR_MESSAGE()
    END CATCH
    FETCH NEXT FROM table_cursor INTO @schema_name, @table_name;
END

CLOSE table_cursor;
DEALLOCATE table_cursor;
END


4. Save the above script in to enable-cdc-rds.sql and execute it using following command

sqlcmd -S <dbhost> -U <dbuser> -P '<dbpassword>' -d <dbname> -i enable-cdc-rds.sql

5. Validate CDC is now enabled as per step 2.

6. Create a CDC user: 

-- Create a SQL Server login

CREATE LOGIN replication_login WITH PASSWORD = 'StrongPassword123!';

-- Switch to your source database

USE atldb;

-- Create a user tied to the login

CREATE USER replication_user FOR LOGIN replication_login;

GRANT required permission

-- grant membership in db_datareader role

ALTER ROLE db_datareader ADD MEMBER replication_user;

-- grant access for debezium to access tables and CDC metadata

GRANT EXECUTE ON SCHEMA::cdc TO replication_user;

GRANT SELECT ON SCHEMA::cdc TO debezium_user;



Instructions for Oracle

Supported versions: 12 and 19

Setup instructions for Oracle

To set up your Oracle database:

  1. Back up your database before making changes.

  2. SSH into the database host and set the the environment variable ORACLE_SID.

# verify if ORACLE_SID is set
echo $ORACLE_SID

If ORACLE_SID is blank, set it using the following bash command:

# set the ORACLE_SID if it is not set
if [ -z "$ORACLE_SID" ]; then
    export ORACLE_SID="`grep $ORACLE_HOME /etc/oratab | cut -d: -f1`"
fi

The next steps require a root user to enable logminer config for CDC

3. Enable backups for Oracle database.

To confirm that Oracle has backups enabled, execute the following command:

SELECT LOG_MODE FROM V$DATABASE;

The LOG_MODE should say ARCHIVELOG. This means that backups are enabled and we can skip to next step.

LOG_MODE
------------
ARCHIVELOG

Execute the following script to enable backups in Docker. This will enable backups and reboot the database in the process.

Expand for script
sqlplus / as sysdba <<- EOF
	alter system set db_recovery_file_dest_size = 10G;
	alter system set db_recovery_file_dest = '/opt/oracle/oradata/$ORACLE_SID' scope=spfile;
	shutdown immediate
	startup mount
	alter database archivelog;
	alter database open;
	-- Should show "Database log mode: Archive Mode"
	archive log list
	alter pluggable database all open;
	exit;
EOF


4. Enable supplemental logging by running the following script:

sqlplus / as sysdba <<- EOF
	ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS;
	exit;
EOF

5. Set the open_cursors parameter by running the following script:

sqlplus / as sysdba <<- EOF
    ALTER SYSTEM SET open_cursors = 10000 SCOPE=BOTH;
	exit;
EOF

6. Check open_cursors parameter value by running the following script. The output should be 10000.

SHOW PARAMETER open_cursors;

7. Set the UNDO_RETENTION parameter to 86400(1 Day) since snapshots can longer than 15 minutes or the configure the parameter to perform the initial snapshot and eventually lead to this exception:

ORA-01555: snapshot too old: rollback segment number 12345 with name "_SYSSMU11_1234567890$" too small

8. Run this script as you’re using Docker:

sqlplus / as sysdba <<- EOF
    ALTER SYSTEM SET UNDO_RETENTION = 86400 SCOPE=BOTH;
	exit;
EOF

9. Check the UNDO_RETENTION parameter value by running the following script. The output should be 86400.

SHOW PARAMETER UNDO_RETENTION;

10. Create a replication user.

Oracle introduced Multitenant architecture in Oracle DB 12c and made it mandatory from 21c. The steps to create a replication user vary depending on the db architecture used.

If you’re using Oracle with multi-tenant architecture (The following steps will require a DBA user with sysdba privileges to create a replication user):

  • Create a logminer tablespace in CDB

Replace placeholders <oracle_sid> before executing


sqlplus / as sysdba <<- EOF
  CREATE TABLESPACE LOGMINER_TBS DATAFILE '/opt/oracle/oradata/<oracle_sid>/logminer_tbs.dbf' SIZE 25M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;
  exit;
EOF
  • Create a logminer tablespace in pluggable databases (PDBs). This is usually 'jiradb' or 'atldb'.
This step is only applicable for multi-tenant Oracle deployments.
  • Check available PDBs using below command:
sqlplus <dba_user>/<dba_user_pwd>@<db_host>:<db_port>/<oracle_sid> as sysdba <<- EOF
  select name from v\$pdbs;
  exit;
EOF
  • You should receive the following output:
NAME
------------------------------------------------------------------------
PDB$SEED
ATLDB
  • Create tablespace for PDBs from above output except PDB$SEED, ORCLCDB (CDB) using the following command:

Replace placeholders <oracle_sid>,<pdb_name>

sqlplus <dba_user>/<dba_user_pwd>@<db_host>:<db_port>/<pdb_name> as sysdba <<- EOF
  CREATE TABLESPACE LOGMINER_TBS DATAFILE '/opt/oracle/oradata/<oracle_sid>/logminer_tbs_<pdb_name>.dbf' SIZE 25M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;
  exit;
EOF
  • Create a replication user and grant required access on CDB.
  • For a multi-tenant architecture the username should start with the prefix 'c##' (mandatory). eg - c##replication_user

Replace placeholders <replication_user>, <replication_user_pwd>

Expand for script
sqlplus / as sysdba <<- EOF
  CREATE USER <replication_user> IDENTIFIED BY <replication_user_pwd> DEFAULT TABLESPACE LOGMINER_TBS QUOTA UNLIMITED ON LOGMINER_TBS;
  GRANT CREATE SESSION TO <replication_user>;
  GRANT SET CONTAINER TO <replication_user>;
  GRANT FLASHBACK ANY TABLE TO <replication_user>;
  GRANT SELECT ANY TABLE TO <replication_user>;
  GRANT SELECT_CATALOG_ROLE TO <replication_user>;
  GRANT EXECUTE_CATALOG_ROLE TO <replication_user>;
  GRANT SELECT ANY TRANSACTION TO <replication_user>;
  GRANT SELECT ANY DICTIONARY TO <replication_user>;
  GRANT LOGMINING TO <replication_user>;
  GRANT CREATE TABLE TO <replication_user>;
  GRANT LOCK ANY TABLE TO <replication_user>;
  GRANT CREATE SEQUENCE TO <replication_user>;
  GRANT EXECUTE ON DBMS_LOGMNR TO <replication_user>;
  GRANT EXECUTE ON DBMS_LOGMNR_D TO <replication_user>;
  GRANT SELECT ON V_\$DATABASE TO <replication_user>;
  GRANT SELECT ON V_\$LOG TO <replication_user>;
  GRANT SELECT ON V_\$LOG_HISTORY TO <replication_user>;
  GRANT SELECT ON V_\$LOGMNR_LOGS TO <replication_user>;
  GRANT SELECT ON V_\$LOGMNR_CONTENTS TO <replication_user>;
  GRANT SELECT ON V_\$LOGMNR_PARAMETERS TO <replication_user>;
  GRANT SELECT ON V_\$LOGFILE TO <replication_user>;
  GRANT SELECT ON V_\$ARCHIVED_LOG TO <replication_user>;
  GRANT SELECT ON V_\$ARCHIVE_DEST_STATUS TO <replication_user>;
  GRANT SELECT ON V_\$TRANSACTION TO <replication_user>;
  GRANT SELECT ON V_\$MYSTAT TO <replication_user>;
  GRANT SELECT ON V_\$STATNAME TO <replication_user>;
  exit;
EOF


  • Grant access on Jira PDB (this will usually be JIRADB or ATLDB

The Jira PDB can also be validated from the Database URL in System Info by logging into Jira.


Expand for script
sqlplus <dba_user>/<dba_user_pwd>@<db_host>:<db_port>/<pdb_name> as sysdba <<- EOF
  GRANT CREATE SESSION TO <replication_user>;
  GRANT SET CONTAINER TO <replication_user>;
  GRANT FLASHBACK ANY TABLE TO <replication_user>;
  GRANT SELECT ANY TABLE TO <replication_user>;
  GRANT SELECT_CATALOG_ROLE TO <replication_user>;
  GRANT EXECUTE_CATALOG_ROLE TO <replication_user>;
  GRANT SELECT ANY TRANSACTION TO <replication_user>;
  GRANT SELECT ANY DICTIONARY TO <replication_user>;
  GRANT LOGMINING TO <replication_user>;
  GRANT CREATE TABLE TO <replication_user>;
  GRANT LOCK ANY TABLE TO <replication_user>;
  GRANT CREATE SEQUENCE TO <replication_user>;
  GRANT EXECUTE ON DBMS_LOGMNR TO <replication_user>;
  GRANT EXECUTE ON DBMS_LOGMNR_D TO <replication_user>;
  GRANT SELECT ON V_\$DATABASE TO <replication_user>;
  GRANT SELECT ON V_\$LOG TO <replication_user>;
  GRANT SELECT ON V_\$LOG_HISTORY TO <replication_user>;
  GRANT SELECT ON V_\$LOGMNR_LOGS TO <replication_user>;
  GRANT SELECT ON V_\$LOGMNR_CONTENTS TO <replication_user>;
  GRANT SELECT ON V_\$LOGMNR_PARAMETERS TO <replication_user>;
  GRANT SELECT ON V_\$LOGFILE TO <replication_user>;
  GRANT SELECT ON V_\$ARCHIVED_LOG TO <replication_user>;
  GRANT SELECT ON V_\$ARCHIVE_DEST_STATUS TO <replication_user>;
  GRANT SELECT ON V_\$TRANSACTION TO <replication_user>;
  GRANT SELECT ON V_\$MYSTAT TO <replication_user>;
  GRANT SELECT ON V_\$STATNAME TO <replication_user>;
  exit;
EOF


If using Oracle with Non Multi-Tenant Architecture:

  • Create tablespace for Jira DB
  • The Jira DB name can be validated from the Database URL in System Info by logging into Jira.

Replace placeholders <dba_user>, <dba_user_pwd>, <db_host>, <db_port>,<db_name>

sqlplus <dba_user>/<dba_user_pwd>@<db_host>:<db_port>/<db_name> as sysdba <<- EOF
  CREATE TABLESPACE LOGMINER_TBS DATAFILE SIZE 25M AUTOEXTEND ON MAXSIZE UNLIMITED;
  exit;
EOF
  • Create a replication user and grant required access.
  • For non multi-tenant architecture a local user should be created without the prefix 'c##'. eg - replication_user

Replace placeholders <dba_user>, <dba_user_pwd>, <db_host>, <db_port>, <db_name>, <replication_user>, <replication_user_pwd>

Expand for script
sqlplus <dba_user>/<dba_user_pwd>@<db_host>:<db_port>/<db_name> as sysdba <<- EOF
  CREATE USER <replication_user> IDENTIFIED BY <replication_user_pwd> DEFAULT TABLESPACE LOGMINER_TBS QUOTA UNLIMITED ON LOGMINER_TBS;
  GRANT CREATE SESSION TO <replication_user>;
  GRANT FLASHBACK ANY TABLE TO <replication_user>;
  GRANT SELECT ANY TABLE TO <replication_user>;
  GRANT SELECT_CATALOG_ROLE TO <replication_user>;
  GRANT EXECUTE_CATALOG_ROLE TO <replication_user>;
  GRANT SELECT ANY TRANSACTION TO <replication_user>;
  GRANT SELECT ANY DICTIONARY TO <replication_user>;
  GRANT LOGMINING TO <replication_user>;
  GRANT CREATE TABLE TO <replication_user>;
  GRANT LOCK ANY TABLE TO <replication_user>;
  GRANT CREATE SEQUENCE TO <replication_user>;
  GRANT EXECUTE ON DBMS_LOGMNR TO <replication_user>;
  GRANT EXECUTE ON DBMS_LOGMNR_D TO <replication_user>;
  GRANT SELECT ON V\$DATABASE TO <replication_user>;
  GRANT SELECT ON V\$LOG TO <replication_user>;
  GRANT SELECT ON V\$LOG_HISTORY TO <replication_user>;
  GRANT SELECT ON V\$LOGMNR_LOGS TO <replication_user>;
  GRANT SELECT ON V\$LOGMNR_CONTENTS TO <replication_user>;
  GRANT SELECT ON V\$LOGMNR_PARAMETERS TO <replication_user>;
  GRANT SELECT ON V\$LOGFILE TO <replication_user>;
  GRANT SELECT ON V\$ARCHIVED_LOG TO <replication_user>;
  GRANT SELECT ON V\$ARCHIVE_DEST_STATUS TO <replication_user>;
  GRANT SELECT ON V\$TRANSACTION TO <replication_user>;
  GRANT SELECT ON V\$MYSTAT TO <replication_user>;
  GRANT SELECT ON V\$STATNAME TO <replication_user>;
  exit;
EOF


Setup instructions for Oracle on RDS

To set up your Oracle database:

  1. Back up your database before making changes.

  2. SSH into the database host and set the the environment variable ORACLE_SID

    # verify if ORACLE_SID is set
    echo $ORACLE_SID


    If ORACLE_SID is blank, set it using the following bash command:


    # set the ORACLE_SID if it is not set
    if [ -z "$ORACLE_SID" ]; then
        export ORACLE_SID="`grep $ORACLE_HOME /etc/oratab | cut -d: -f1`"
    fi

    The next steps require a root user to enable logminer config for CDC


    3. Enable backups for Oracle database - https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/oracle-read-replicas.backups.html

    To confirm that Oracle has backups enabled, execute the following command:


    SELECT LOG_MODE FROM V$DATABASE;


    The LOG_MODE should say ARCHIVELOG. This means that backups are enabled and we can skip to next step.


    LOG_MODE
    ------------
    ARCHIVELOG

Enable backups for Oracle DB. Set the backup retention period to 1 day.

Set the database to retain archive logs for 24 hours.

exec rdsadmin.rdsadmin_util.set_configuration('archivelog retention hours', 24);

4. Enable supplemental logging. Run the following script: 

exec rdsadmin.rdsadmin_util.alter_supplemental_logging('ADD');

5. Set the open_cursors parameter - https://repost.aws/knowledge-center/rds-modify-parameter-group-values
Update the open_cursors parameter to 10000 for the DB. 

6. Check open_cursors parameter value.

SHOW PARAMETER open_cursors;

7. Set the UNDO_RETENTION parameter to 86400(1 Day) since snapshots can longer than 15 minutes or configure the parameter to perform the initial snapshot and eventually lead to this exception:

ORA-01555: snapshot too old: rollback segment number 12345 with name "_SYSSMU11_1234567890$" too small

Update the undo_retention parameter to 86400 for the DB. 
8. Check UNDO_RETENTION parameter value. The output should be 86400.

SHOW PARAMETER UNDO_RETENTION;

9. Create a tablespace for Jira database. The database name can be validated from the Database URL in System Info by logging into Jira.

Replace placeholders <dba_user>, <dba_user_pwd>, <db_host>, <db_port>,<db_name>

sqlplus <dba_user>/<dba_user_pwd>@<db_host>:<db_port>/<db_name> <<- EOF
  CREATE TABLESPACE LOGMINER_TBS DATAFILE SIZE 25M AUTOEXTEND ON MAXSIZE UNLIMITED;
  exit;
EOF

10. Create a replication user and grant required access.

Replace placeholders <dba_user>, <dba_user_pwd>, <db_host>, <db_port>, <db_name>, <replication_user>, <replication_user_pwd>


Expand for script
sqlplus <dba_user>/<dba_user_pwd>@<db_host>:<db_port>/<db_name> <<- EOF
  CREATE USER <replication_user> IDENTIFIED BY <replication_user_pwd> DEFAULT TABLESPACE LOGMINER_TBS QUOTA UNLIMITED ON LOGMINER_TBS;
  GRANT CREATE SESSION TO <replication_user>;
  GRANT FLASHBACK ANY TABLE TO <replication_user>;
  GRANT SELECT ANY TABLE TO <replication_user>;
  GRANT SELECT_CATALOG_ROLE TO <replication_user>;
  GRANT EXECUTE_CATALOG_ROLE TO <replication_user>;
  GRANT SELECT ANY TRANSACTION TO <replication_user>;
  GRANT SELECT ANY DICTIONARY TO <replication_user>;
  GRANT LOGMINING TO <replication_user>;
  GRANT CREATE TABLE TO <replication_user>;
  GRANT LOCK ANY TABLE TO <replication_user>;
  GRANT CREATE SEQUENCE TO <replication_user>;
  GRANT SELECT ON V\$DATABASE TO <replication_user>;
  GRANT SELECT ON V\$LOG TO <replication_user>;
  GRANT SELECT ON V\$LOGFILE TO <replication_user>;
  GRANT SELECT ON V\$ARCHIVED_LOG TO <replication_user>;
  GRANT SELECT ON V\$TRANSACTION TO <replication_user>;
  GRANT SELECT ON V\$MYSTAT TO <replication_user>;
  GRANT SELECT ON V\$STATNAME TO <replication_user>;
  exit;
EOF








Last modified on Apr 1, 2026

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.