Saturday, August 24, 2024

RMAN Restoration to New Server with Same Database Name using Backup

 


RMAN Restoration to New Server with Same Database Name Using Backup 

Environment:

Source Details:

DB Version            : Oracle 19.0.0.0.0
File system                : Normal
Database Name : DEV
        DB_UNIQUE_NAME  : DEV 
Oracle Home Path: /u02/app/oracle1/product/19.3/db/

Target Details:


DB Version          : Oracle 19.0.0.0.0
File system               : Normal
Database Name : DEV
        DB_UNIQUE_NAME  : DEV
Oracle Home Path: /u03/app/oracle/product/19c/db_1/


Backup the Source Database:

Here, cold backup is taken by having the database in mount state.


[oracle@dev RMAN]$ rman target /
Recovery Manager: Release 19.0.0.0.0 - Production on Sat Aug 24 08:40:26 2024
Version 19.23.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

connected to target database: DEV (DBID=4255322729, not open)

RMAN> run {
        ALLOCATE CHANNEL disk1 DEVICE TYPE DISK FORMAT '/u01/BACKUP/RMAN/dev_%U_%T.%p';
        ALLOCATE CHANNEL disk2 DEVICE TYPE DISK FORMAT '/u01/BACKUP/RMAN/dev_%U_%T.%p';
        crosscheck archivelog all;
         delete noprompt expired archivelog all;
         backup as compressed backupset incremental level 0 database plus archivelog ;
          backup current controlfile format '/u01/BACKUP/RMAN/dev_controlfile_%U_%T.%p';
          release channel disk1;
         release channel disk2;
    }
 exit;
using target database control file instead of recovery catalog
allocated channel: disk1
channel disk1: SID=258 device type=DISK

allocated channel: disk2
channel disk2: SID=25 device type=DISK

validation succeeded for archived log
archived log file name=/u02/app/oracle1/fast_recovery_area/DEV/archivelog/2024_08_14/o1_mf_1_13_mctnpbmf_.arc RECID=2 STAMP=1177016330
validation succeeded for archived log
archived log file name=/u02/app/oracle1/fast_recovery_area/DEV/archivelog/2024_08_14/o1_mf_1_12_mctnp9st_.arc RECID=1 STAMP=1177016330
validation succeeded for archived log
archived log file name=/u02/app/oracle1/fast_recovery_area/DEV/archivelog/2024_08_14/o1_mf_1_14_mctrbqlp_.arc RECID=3 STAMP=1177020056
validation succeeded for archived log
archived log file name=/u02/app/oracle1/fast_recovery_area/DEV/archivelog/2024_08_15/o1_mf_1_15_mcvbrv0n_.arc RECID=4 STAMP=1177038939
validation succeeded for archived log
archived log file name=/u02/app/oracle1/fast_recovery_area/DEV/archivelog/2024_08_18/o1_mf_1_16_md545h1q_.arc RECID=5 STAMP=1177359855
validation succeeded for archived log
archived log file name=/u02/app/oracle1/fast_recovery_area/DEV/archivelog/2024_08_20/o1_mf_1_17_md86jxof_.arc RECID=6 STAMP=1177460573
validation succeeded for archived log
archived log file name=/u02/app/oracle1/fast_recovery_area/DEV/archivelog/2024_08_21/o1_mf_1_18_mddkkvr6_.arc RECID=7 STAMP=1177602940
validation succeeded for archived log
archived log file name=/u02/app/oracle1/fast_recovery_area/DEV/archivelog/2024_08_21/o1_mf_1_19_mddkwm2v_.arc RECID=8 STAMP=1177603283
validation succeeded for archived log
archived log file name=/u02/app/oracle1/fast_recovery_area/DEV/archivelog/2024_08_21/o1_mf_1_20_mddkwo6z_.arc RECID=9 STAMP=1177603285
Crosschecked 5 objects

validation succeeded for archived log
archived log file name=/u02/app/oracle1/fast_recovery_area/DEV/archivelog/2024_08_21/o1_mf_1_21_mddkwrgo_.arc RECID=10 STAMP=1177603288
Crosschecked 5 objects


specification does not match any archived log in the repository


Starting backup at 24-AUG-24
channel disk1: starting compressed archived log backup set
channel disk1: specifying archived log(s) in backup set
input archived log thread=1 sequence=12 RECID=1 STAMP=1177016330
input archived log thread=1 sequence=13 RECID=2 STAMP=1177016330
input archived log thread=1 sequence=14 RECID=3 STAMP=1177020056
input archived log thread=1 sequence=15 RECID=4 STAMP=1177038939
channel disk1: starting piece 1 at 24-AUG-24
channel disk2: starting compressed archived log backup set
channel disk2: specifying archived log(s) in backup set
input archived log thread=1 sequence=16 RECID=5 STAMP=1177359855
input archived log thread=1 sequence=17 RECID=6 STAMP=1177460573
input archived log thread=1 sequence=18 RECID=7 STAMP=1177602940
input archived log thread=1 sequence=19 RECID=8 STAMP=1177603283
input archived log thread=1 sequence=20 RECID=9 STAMP=1177603285
channel disk2: starting piece 1 at 24-AUG-24
channel disk2: finished piece 1 at 24-AUG-24
piece handle=/u01/BACKUP/RMAN/dev_0a338mfu_10_1_1_20240824.1 tag=TAG20240824T084030 comment=NONE
channel disk2: backup set complete, elapsed time: 00:00:07
channel disk2: starting compressed archived log backup set
channel disk2: specifying archived log(s) in backup set
input archived log thread=1 sequence=21 RECID=10 STAMP=1177603288
channel disk2: starting piece 1 at 24-AUG-24
channel disk2: finished piece 1 at 24-AUG-24
piece handle=/u01/BACKUP/RMAN/dev_0b338mg6_11_1_1_20240824.1 tag=TAG20240824T084030 comment=NONE
channel disk2: backup set complete, elapsed time: 00:00:01
channel disk1: finished piece 1 at 24-AUG-24
piece handle=/u01/BACKUP/RMAN/dev_09338mfu_9_1_1_20240824.1 tag=TAG20240824T084030 comment=NONE
channel disk1: backup set complete, elapsed time: 00:00:11
Finished backup at 24-AUG-24

Starting backup at 24-AUG-24
channel disk1: starting compressed incremental level 0 datafile backup set
channel disk1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u02/app/oracle1/oradata/DEV/datafile/o1_mf_system_mcsnymx3_.dbf
input datafile file number=00003 name=/u02/app/oracle1/oradata/DEV/datafile/o1_mf_sysaux_mcsnzq7l_.dbf
channel disk1: starting piece 1 at 24-AUG-24
channel disk2: starting compressed incremental level 0 datafile backup set
channel disk2: specifying datafile(s) in backup set
input datafile file number=00004 name=/u02/app/oracle1/oradata/DEV/datafile/o1_mf_undotbs1_mcso06c4_.dbf
input datafile file number=00005 name=/u02/app/oracle1/oradata/DEV/datafile/o1_mf_ram_mcvbxyy4_.dbf
input datafile file number=00007 name=/u02/app/oracle1/oradata/DEV/datafile/o1_mf_users_mcso07fl_.dbf
channel disk2: starting piece 1 at 24-AUG-24
channel disk2: finished piece 1 at 24-AUG-24
piece handle=/u01/BACKUP/RMAN/dev_0d338mg9_13_1_1_20240824.1 tag=TAG20240824T084041 comment=NONE
channel disk2: backup set complete, elapsed time: 00:00:03
channel disk1: finished piece 1 at 24-AUG-24
piece handle=/u01/BACKUP/RMAN/dev_0c338mg9_12_1_1_20240824.1 tag=TAG20240824T084041 comment=NONE
channel disk1: backup set complete, elapsed time: 00:00:45
Finished backup at 24-AUG-24

Starting backup at 24-AUG-24
specification does not match any archived log in the repository
backup cancelled because there are no files to backup
Finished backup at 24-AUG-24

Starting backup at 24-AUG-24
channel disk1: starting full datafile backup set
channel disk1: specifying datafile(s) in backup set
including current control file in backup set
channel disk1: starting piece 1 at 24-AUG-24
channel disk1: finished piece 1 at 24-AUG-24
piece handle=/u01/BACKUP/RMAN/dev_controlfile_0e338mhm_14_1_1_20240824.1 tag=TAG20240824T084126 comment=NONE
channel disk1: backup set complete, elapsed time: 00:00:01
Finished backup at 24-AUG-24

Starting Control File and SPFILE Autobackup at 24-AUG-24
piece handle=/u02/app/oracle1/fast_recovery_area/DEV/autobackup/2024_08_24/o1_mf_s_1177835939_mdmo7rkv_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 24-AUG-24

released channel: disk1

released channel: disk2

RMAN> exit

Creating pfile in Source database:
SQL> create pfile from spfile;

File created.
Transfer the Backup and pfile to Target Server using scp:
[oracle@dev db]$ cd /u01/BACKUP/RMAN/
[oracle@dev RMAN]$ ls -lrt
total 772752
-rw-r-----. 1 oracle oinstall  91238912 Aug 24 08:40 dev_0a338mfu_10_1_1_20240824.1
-rw-r-----. 1 oracle oinstall     12800 Aug 24 08:40 dev_0b338mg6_11_1_1_20240824.1
-rw-r-----. 1 oracle oinstall 132897792 Aug 24 08:40 dev_09338mfu_9_1_1_20240824.1
-rw-r-----. 1 oracle oinstall   4857856 Aug 24 08:40 dev_0d338mg9_13_1_1_20240824.1
-rw-r-----. 1 oracle oinstall 551600128 Aug 24 08:41 dev_0c338mg9_12_1_1_20240824.1
-rw-r-----. 1 oracle oinstall  10682368 Aug 24 08:41 dev_controlfile_0e338mhm_14_1_1_20240824.1
[oracle@dev RMAN]$
[oracle@dev RMAN]$
[oracle@dev RMAN]$ scp * oracle:192.168.56.31:/u01/RMAN
ssh: Could not resolve hostname oracle: Name or service not known
lost connection
[oracle@dev RMAN]$ scp * oracle@192.168.56.31:/u01/RMAN
oracle@192.168.56.31's password:
dev_09338mfu_9_1_1_20240824.1                                                               100%  127MB 122.4MB/s   00:01
dev_0a338mfu_10_1_1_20240824.1                                                              100%   87MB 122.5MB/s   00:00
dev_0b338mg6_11_1_1_20240824.1                                                              100%   13KB  14.5MB/s   00:00
dev_0c338mg9_12_1_1_20240824.1                                                              100%  526MB 105.2MB/s   00:05
dev_0d338mg9_13_1_1_20240824.1                                                              100% 4744KB  90.4MB/s   00:00
dev_controlfile_0e338mhm_14_1_1_20240824.1                                                  100%   10MB  93.5MB/s   00:00


[oracle@dev dbs]$ scp initdev.ora oracle@192.168.56.31:/u03/app/oracle/product/19c/db_1/dbs
oracle@192.168.56.31's password:
initdev.ora   


Connect to Target Database:

Add entry in /etc/oratab:
[oracle@dev dbs]$ cat /etc/oratab
#



# This file is used by ORACLE utilities.  It is created by root.sh
# and updated by either Database Configuration Assistant while creating
# a database or ASM Configuration Assistant while creating ASM instance.

# A colon, ':', is used as the field terminator.  A new line terminates
# the entry.  Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
#   $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively.  The third field indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
dev:/u03/app/oracle/product/19c/db_1:N
Restoration Steps:

Check the pfile, modify the directory names and create the required directories:

[oracle@dev dbs]$ pwd /u03/app/oracle/product/19c/db_1/dbs [oracle@dev dbs]$ cat initdev.ora *.audit_file_dest='/u03/app/oracle/admin/dev/adump' *.audit_trail='db' *.compatible='19.0.0' *.control_files='/u03/app/oracle/oradata/DEV/controlfile/o1_mf_mcso19od_.ctl','/u03/app/oracle/fast_recovery_area/DEV/controlfile/o1_mf_mcso19oz_.ctl' *.db_block_size=8192 *.db_create_file_dest='/u03/app/oracle/oradata' *.db_name='dev' *.db_recovery_file_dest='/u03/app/oracle/fast_recovery_area' *.db_recovery_file_dest_size=8256m *.diagnostic_dest='/u03/app/oracle' *.dispatchers='(PROTOCOL=TCP) (SERVICE=devXDB)' *.enable_goldengate_replication=TRUE *.local_listener='LISTENER_DEV' *.open_cursors=300 *.pga_aggregate_target=996m *.processes=300 *.remote_login_passwordfile='EXCLUSIVE' *.sga_target=2986m *.undo_tablespace='UNDOTBS1'


Create the required directories:

[oracle@dev dbs]$ mkdir -p /u03/app/oracle/admin/dev/adump [oracle@dev dbs]$ mkdir -p /u03/app/oracle/oradata/DEV [oracle@dev dbs]$ [oracle@dev dbs]$ mkdir -p /u03/app/oracle/fast_recovery_area/DEV [oracle@dev dbs]$ [oracle@dev dbs]$ mkdir -p /u03/app/oracle/oradata


Start the database in nomount stage, restore the controlfile and mount the database:

[oracle@dev dbs]$ sqlplus / as sysdba SQL*Plus: Release 19.0.0.0.0 - Production on Sat Aug 24 18:30:35 2024 Version 19.3.0.0.0 Copyright (c) 1982, 2019, Oracle. All rights reserved. Connected to an idle instance. SQL> startup nomount pfile='/u03/app/oracle/product/19c/db_1/dbs/initdev.ora'; ORACLE instance started. Total System Global Area 3137336136 bytes Fixed Size 8901448 bytes Variable Size 637534208 bytes Database Buffers 2483027968 bytes Redo Buffers 7872512 bytes SQL> exit Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.3.0.0.0


[oracle@dev RMAN]$ rman target / Recovery Manager: Release 19.0.0.0.0 - Production on Sat Aug 24 18:31:21 2024 Version 19.3.0.0.0 Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved. connected to target database: DEV (not mounted) RMAN> restore controlfile from '/u01/RMAN/dev_controlfile_0e338mhm_14_1_1_20240824.1'; Starting restore at 24-AUG-24 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=22 device type=DISK channel ORA_DISK_1: restoring control file channel ORA_DISK_1: restore complete, elapsed time: 00:00:01 output file name=/u03/app/oracle/oradata/DEV/controlfile/o1_mf_mcso19od_.ctl output file name=/u03/app/oracle/fast_recovery_area/DEV/controlfile/o1_mf_mcso19oz_.ctl Finished restore at 24-AUG-24 RMAN> alter database mount; released channel: ORA_DISK_1 Statement processed

Catalog the backup location:

RMAN> catalog start with '/u01/RMAN/';
Starting implicit crosscheck backup at 24-AUG-24 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=20 device type=DISK Crosschecked 13 objects Finished implicit crosscheck backup at 24-AUG-24 Starting implicit crosscheck copy at 24-AUG-24 using channel ORA_DISK_1 Finished implicit crosscheck copy at 24-AUG-24 searching for all files in the recovery area cataloging files... no files cataloged searching for all files that match the pattern /u01/RMAN/ List of Files Unknown to the Database ===================================== File Name: /u01/RMAN/dev_09338mfu_9_1_1_20240824.1 File Name: /u01/RMAN/dev_0a338mfu_10_1_1_20240824.1 File Name: /u01/RMAN/dev_0b338mg6_11_1_1_20240824.1 File Name: /u01/RMAN/dev_0c338mg9_12_1_1_20240824.1 File Name: /u01/RMAN/dev_0d338mg9_13_1_1_20240824.1 File Name: /u01/RMAN/dev_controlfile_0e338mhm_14_1_1_20240824.1 Do you really want to catalog the above files (enter YES or NO)? yes cataloging files... cataloging done List of Cataloged Files ======================= File Name: /u01/RMAN/dev_09338mfu_9_1_1_20240824.1 File Name: /u01/RMAN/dev_0a338mfu_10_1_1_20240824.1 File Name: /u01/RMAN/dev_0b338mg6_11_1_1_20240824.1 File Name: /u01/RMAN/dev_0c338mg9_12_1_1_20240824.1 File Name: /u01/RMAN/dev_0d338mg9_13_1_1_20240824.1 File Name: /u01/RMAN/dev_controlfile_0e338mhm_14_1_1_20240824.1

Restore the Database:

RMAN> run { set newname for database to "/u03/app/oracle/oradata/DEV/%b"; ALLOCATE CHANNEL disk1 DEVICE TYPE DISK; ALLOCATE CHANNEL disk2 DEVICE TYPE DISK; restore database; SWITCH DATAFILE ALL; release channel disk1; release channel disk2; } 2> 3> 4> 5> 6> 7> 8> 9> 10> executing command: SET NEWNAME released channel: ORA_DISK_1 allocated channel: disk1 channel disk1: SID=20 device type=DISK allocated channel: disk2 channel disk2: SID=259 device type=DISK Starting restore at 24-AUG-24 channel disk1: starting datafile backup set restore channel disk1: specifying datafile(s) to restore from backup set channel disk1: restoring datafile 00004 to /u03/app/oracle/oradata/DEV/o1_mf_undotbs1_mcso06c4_.dbf channel disk1: restoring datafile 00005 to /u03/app/oracle/oradata/DEV/o1_mf_ram_mcvbxyy4_.dbf channel disk1: restoring datafile 00007 to /u03/app/oracle/oradata/DEV/o1_mf_users_mcso07fl_.dbf channel disk1: reading from backup piece /u01/RMAN/dev_0d338mg9_13_1_1_20240824.1 channel disk2: starting datafile backup set restore channel disk2: specifying datafile(s) to restore from backup set channel disk2: restoring datafile 00001 to /u03/app/oracle/oradata/DEV/o1_mf_system_mcsnymx3_.dbf channel disk2: restoring datafile 00003 to /u03/app/oracle/oradata/DEV/o1_mf_sysaux_mcsnzq7l_.dbf channel disk2: reading from backup piece /u01/RMAN/dev_0c338mg9_12_1_1_20240824.1 channel disk1: piece handle=/u01/RMAN/dev_0d338mg9_13_1_1_20240824.1 tag=TAG20240824T084041 channel disk1: restored backup piece 1 channel disk1: restore complete, elapsed time: 00:00:07 channel disk2: piece handle=/u01/RMAN/dev_0c338mg9_12_1_1_20240824.1 tag=TAG20240824T084041 channel disk2: restored backup piece 1 channel disk2: restore complete, elapsed time: 00:01:05 Finished restore at 24-AUG-24 datafile 1 switched to datafile copy input datafile copy RECID=6 STAMP=1177872040 file name=/u03/app/oracle/oradata/DEV/datafile/o1_mf_system_mdmpwh55_.dbf datafile 3 switched to datafile copy input datafile copy RECID=7 STAMP=1177872040 file name=/u03/app/oracle/oradata/DEV/datafile/o1_mf_sysaux_mdmpwh6h_.dbf datafile 4 switched to datafile copy input datafile copy RECID=8 STAMP=1177872040 file name=/u03/app/oracle/oradata/DEV/datafile/o1_mf_undotbs1_mdmpwh56_.dbf datafile 5 switched to datafile copy input datafile copy RECID=9 STAMP=1177872040 file name=/u03/app/oracle/oradata/DEV/datafile/o1_mf_ram_mdmpwh7w_.dbf datafile 7 switched to datafile copy input datafile copy RECID=10 STAMP=1177872040 file name=/u03/app/oracle/oradata/DEV/datafile/o1_mf_users_mdmpwh8l_.dbf released channel: disk1 released channel: disk2

In this case, recovery is not required as I have used cold backup.

Now open the Database:

RMAN> alter database open; Statement processed RMAN> RMAN> RMAN> exit


Connect to database and verify datafiles, tempfiles and logfiles:




Monday, August 19, 2024

GoldenGate Credential Store:




 GoldenGate Credential Store: 

  1.  The credential store in GoldenGate manages the user ID and its password that are used by GoldenGate processes to interact with the database.
  2. The credential store eliminates the need to specify user names and password in the GoldenGate parameter files. Instead of clear-text password and username, an optional alias can be used in the parameter files.

When we create credential store using ADD CRENDENTIALSTORE command, an empty wallet file gets created in the GoldenGate default location under directory "dircrd" which stores the DB logins credentials.

Step to create Credential store:

 Without credentialstore, DB logins from Goldengate utility is done using the clear-text password and we can observe the wallet file does not exist in the default location.

dblogin userid ggadmin password ggadmin;

 sh ls -lrt /u01/app/oracle/product/gg/dircrd

By creating credentialstore and we can notice the wallet file gets created in the default location.
 add credentialstore;


To check information in the credentialstore. Default is empty.

info credentialstore;

Add  the user credentials to the credential store and verify it using "info credentialstore".
alter credentialstore add user ggadmin password ggadmin alias ggadmin;

With credentialstore, DBlogins are done not with clear-text password instead connected using alias name ggadmin.
dblogin useridalias ggadmin;


 If the password of the user ggadmin is modified at Database level, we can modify the same in the credentialstore using the below command.

alter  credentialstore replace user ggadmin password ggadmin1 alias ggadmin;












To delete from credentialstore using alias.
alter credentialstore delete user ggadmin;


We can observe, deleting the credentialsore will delete the wallet file automatically from the Goldengate default location.
delete credentialstore;






Friday, August 16, 2024

GoldenGate Introduction and Classic Architecture Components

 



GoldenGate Introduction:

Oracle GoldenGate is a software product that allows you to replicate, filter, and transform data from one database to another database.

Using Oracle GoldenGate, you can move committed transactions across heterogeneous database.

Why Do You Need Oracle GoldenGate?

To effectively move data from one system to another system in real-time with zero-downtime. Oracle GoldenGate is the Oracle’s solution to replicate and integrate data.

The key features are:

  • Data movement in real-time, by reducing latency.
  •  Only committed transactions are moved, so that the data is consistent and performance will improve.
  •  Can replicate the data from an Oracle database to a different heterogeneous database.
  •  Continuous extraction and replication of transactional DML and DDL operations to keep source and target data consistent.
  •  Simple architecture and easy configuration

GoldenGate Architecture:

There are different architecture that can be configured, that is from simple uni-directional architecture to the more complex peer-to-peer configuration. Whatever be the architecture, the GoldenGate makes the administration easier.


Classic and Microservices architecture:

GoldenGate supports two architecture, the Classic architecture and Microservices Architecture (MA).

Classic Architecture

 Microservices Architecture

This provides processes and files required to effectively move data across a variety of topologies.

This provides REST enabled service as part of Oracle GoldenGate environment. The REST-enabled services provide remote configuration, administration, and monitoring through webpages, command line and APIs.



Components of Oracle GoldenGate Classic Architecture:


 

 Manager:

 Manager is the control process of Oracle GoldenGate.  It must be running on each system in the Oracle GoldenGate configuration before the Extract or Replicat processes can be started.

One Manager process can control many Extract or Replicat processes.

Functions of Manager process are:

(i)  Starts the GoldenGate processes

(ii)  Purges trace files based on retention rules

(iii)  Creates event, error or threshold reports

Extract:

              Extract or Capture process, will capture the committed transaction from the redologs.

Can configure Extract process for the following use case:

  1.    Initial Load:

            Before GoldenGate configuration, if there is a data in the source objects and to transfer that we go for Initial Load.  i.e, Extract process captures the static data directly from the source objects and transfers it to the target database. 

Initial data is a data migration which is performed only once.

            2.  Change Synchronization:

When you set up the GoldenGate to keep the source data synchronized with the target data.  The Extract process captures the DML and DDL operations performed on the configured objects after the Initial Load.

Extract process writes all the captured committed data into a trail file on the Source database is called Local trail file.

Trail Files:

Local Trail File: Files created at the Source database.

Remote Trail File: Files created at the Remote database.

DataPump:

The data pup reads the trail file in the Source database and sends the data over the network to the  remote trail file in the Target database. 



 Collector Process:

Manager process in the target database starts the background process called as Collector process.

Collector receives the data across the network and writes in to the remote trail file.

Replicat  Process:

It reads the data from the remote trail file and applies them to the target database.


 





Thursday, August 15, 2024

Solution-ERROR OGG-00664 Oracle GoldenGate Delivery for Oracle, repint1.prm: OCI Error ORA-26804: Apply "OGG$REPINT1" is disabled




Description :-

While starting replicat process in the Goldengate at target side, facing the below error:

ERROR   OGG-00664  Oracle GoldenGate Delivery for Oracle, repint1.prm:  OCI Error ORA-26804: Apply "OGG$REPINT1" is disabled. (status = 26804-Flushing database inbound server, 'OGG$REPINT1').

Problem:-

The replicat process "OGG$REPINT1" is disabled at database level identified using dba_apply view. 

     SQL>  select apply_name, status from dba_apply; 



Solution:-


After restarting the replicat process, the status of the process "OGG$REPINT1" changed to Enabled. 





  SQL>  select apply_name, status from dba_apply; 




Wednesday, August 14, 2024

Solution- Using UR=A to Connect to Databases in Nomount Mode

              



Description:-

Refreshing a database from prod to test using rman duplicate method.
On Test server listener blocked with service name

startup nomount;
the service on the listener would have a blocked status.
Service "orcldb" has 1 instance(s).
  Instance "orcldb", status BLOCKED, has 1 handler(s) for this service...
Any attempt to connect to the instance using service name will fail.
sqlplus sys@orcldb as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Thu Jul 13 20:27:16 2024 Version 19.12.0.0.0 Copyright (c) 1982, 2021, Oracle. All rights reserved. ERROR: ORA-12528: TNS:listener: all appropriate instances are blocking new connections
The TNS entry used is shown below.
DORCLDB =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = prod22)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcldb)
    )
  )
One solution is to create a static listener entries as done when creating data guard configurations.


Other options is to use UR=A in the TNS entry. With the use of UR=A in TNS entry there's no need to create a static listener entry. Dynamic listener would allow connection without any issue.
DEVCDBUR =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = test22)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = devcdb)
      (UR = A)
    )
  )

After adding a (UR=A) parameter on tnsnames.ora  and complete the refresh successfully.

RMAN Restoration to New Server with Same Database Name using Backup

  RMAN Restoration to New Server with Same Database Name Using Backup  Environment: Source Details: DB Version            : Oracle 19.0...