Wednesday, May 26, 2021

AWS Application Migration Service Error : Failed Installing the AWS Replication Agent

AWS Application Migration Service Error : Failed Installing the AWS Replication Agent




[root@ip ~]# python3 aws-replication-installer-init.py

The installation of the AWS Replication Agent has started.

AWS Region Name: XXXXXXXXXXXXXXX

AWS Access Key ID: XXXXXXXXXXXXXXX

AWS Secret Access Key:

Identifying volumes for replication.

Choose the disks you want to replicate. Your disks are: /dev/xvda

To replicate some of the disks, type the path of the disks, separated with a comma (for example, /dev/sda,/dev/sdb). To replicate all disks, press Enter:

Identified volume for replication: /dev/xvda of size 30 GiB

All volumes for replication were successfully identified.

Downloading the AWS Replication Agent onto the source server... Finished.

Installing the AWS Replication Agent onto the source server...

Error: Failed Installing the AWS Replication Agent

Installation failed.

Learn more about installation issues in our documentation at https://docs.aws.amazon.com/mgn/latest/ug/Error-Installtion-Failed.html

[root@ip ~]# 



Solutions: Install package elfutils.* ,elfutils-libelf-devel 



[root@ip ~]# python3 aws-replication-installer-init.py

The installation of the AWS Replication Agent has started.

AWS Region Name: XXXXXXXXXXXXXXX

AWS Access Key ID: XXXXXXXXXXXXXXX

AWS Secret Access Key:

Identifying volumes for replication.

Choose the disks you want to replicate. Your disks are: /dev/xvda

To replicate some of the disks, type the path of the disks, separated with a comma (for example, /dev/sda,/dev/sdb). To replicate all disks, press Enter:

Identified volume for replication: /dev/xvda of size 30 GiB

All volumes for replication were successfully identified.

Downloading the AWS Replication Agent onto the source server... Finished.

Installing the AWS Replication Agent onto the source server... Finished.

Syncing the source server with the Application Migration Service Console... Finished.

The following is the source server ID: XXXXXXXXXXXXXX

The AWS Replication Agent was successfully installed.

[root@ip ~]#

Convert a Snapshot Standby Back to a Physical Standby using DGMGRL

Converting a Snapshot Standby Back to a Physical Standby using DGMGRL 



DGMGRL> convert database india_stby to physical standby;

Converting database "india_stby" to a Physical Standby database, please wait...

Operation requires shut down of instance "india_stby" on database "india_stby"

Shutting down instance "india_stby"...

Connected to "india_stby"

Database closed.

Database dismounted.

ORACLE instance shut down.

Operation requires start up of instance "india_stby" on database "india_stby"

Starting instance "india_stby"...

ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance

ORACLE instance started.

Database mounted.

Connected to "india_stby"

Continuing to convert database "india_stby" ...

Database "india_stby" converted successfully

DGMGRL>

DGMGRL> sql 'alter system switch logfile';

Succeeded.

DGMGRL> show configuration

Configuration - india

  Protection Mode: MaxPerformance

  Members:

  india      - Primary database

    india_stby - Physical standby database

      Warning: ORA-16854: apply lag could not be determined

Fast-Start Failover: DISABLED

Configuration Status:

WARNING   (status updated 45 seconds ago)

DGMGRL>

DGMGRL> show configuration;

Configuration - india

  Protection Mode: MaxPerformance

  Members:

  india      - Primary database

    india_stby - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:

SUCCESS   (status updated 21 seconds ago)

DGMGRL>


on standby database table hr.abc_snap table does not exist which we created when database role was snapshot standby

===================================================================


[oracle@ip-10-0-1-37 ~]$ sqlplus "/as sysdba"

SQL*Plus: Release 12.2.0.1.0 Production on Wed May 26 11:19:33 2021

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

Connected to:

Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> select * from hr.abc_snap;

select * from hr.abc_snap

                 *

ERROR at line 1:

ORA-00942: table or view does not exist

SQL> select name ,open_mode,database_role from v$database;

NAME      OPEN_MODE            DATABASE_ROLE

--------- -------------------- ----------------

INDIA     READ ONLY WITH APPLY PHYSICAL STANDBY

SQL>







Convert a Physical Standby to a Snapshot Standby using DGMGRL

 

Convert a Physical Standby to a Snapshot Standby using DGMGRL


[oracle@ip-10-0-1-12 ~]$ dgmgrl

DGMGRL for Linux: Release 12.2.0.1.0 - Production on Wed May 26 11:07:46 2021

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

Welcome to DGMGRL, type "help" for information.

DGMGRL> connect sys/@india

Password:

Connected to "india"

Connected as SYSDBA.

DGMGRL>

DGMGRL>

DGMGRL>

DGMGRL> show configuration;

Configuration - india

  Protection Mode: MaxPerformance

  Members:

  india      - Primary database

    india_stby - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:

SUCCESS   (status updated 43 seconds ago)

DGMGRL>

DGMGRL>

DGMGRL> validate database india;

  Database Role:    Primary database

  Ready for Switchover:  Yes

  Flashback Database Status:

    india:  Off

  Managed by Clusterware:

    india:  NO

    Warning: Ensure primary database's StaticConnectIdentifier property

    is configured properly so that the primary database can be restarted

    by DGMGRL after switchover

DGMGRL>

DGMGRL> validate database india_stby;

  Database Role:     Physical standby database

  Primary Database:  india

  Ready for Switchover:  Yes

  Ready for Failover:    Yes (Primary Running)

  Flashback Database Status:

    india     :  Off

    india_stby:  On

  Managed by Clusterware:

    india     :  NO

    india_stby:  NO

    Warning: Ensure primary database's StaticConnectIdentifier property

    is configured properly so that the primary database can be restarted

    by DGMGRL after switchover

  Current Log File Groups Configuration:

    Thread #  Online Redo Log Groups  Standby Redo Log Groups Status

              (india)                 (india_stby)

    1         3                       3                       Insufficient SRLs

  Future Log File Groups Configuration:

    Thread #  Online Redo Log Groups  Standby Redo Log Groups Status

              (india_stby)            (india)

    1         3                       2                       Insufficient SRLs

DGMGRL>

DGMGRL>

DGMGRL>

DGMGRL> convert database india_stby to snapshot standby;

Converting database "india_stby" to a Snapshot Standby database, please wait...

Database "india_stby" converted successfully

DGMGRL>


On Standby database 

====================


SQL> select name ,open_mode,database_role from v$database;


NAME      OPEN_MODE            DATABASE_ROLE

--------- -------------------- ----------------

INDIA     READ ONLY WITH APPLY PHYSICAL STANDBY


SQL> /

select name ,open_mode,database_role from v$database

*

ERROR at line 1:

ORA-03135: connection lost contact

Process ID: 5938

Session ID: 272 Serial number: 59433


SQL> exit

Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

[oracle@ip-10-0-1-37 ~]$

[oracle@ip-10-0-1-37 ~]$ sqlplus "/as sysdba"

SQL*Plus: Release 12.2.0.1.0 Production on Wed May 26 11:11:02 2021

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

Connected to:

Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> select name ,open_mode,database_role from v$database;

NAME      OPEN_MODE            DATABASE_ROLE

--------- -------------------- ----------------

INDIA     READ WRITE           SNAPSHOT STANDBY


SQL>

SQL>

SQL>

SQL> create table hr.abc_snap as select * from hr.abc;

Table created.

SQL>

SQL> select * from hr.abc_snap;

        ID NAME

---------- --------------------------------------------------

         2 From standby after primary

         1 A

         3 from primary after convert


SQL>





Tuesday, May 25, 2021

Validate oracle database using dgmgrl utility before and after switchover

 

Validate primary/standby database using dgmgrl utility before and after switchover


[oracle@ip-10-0-1-12 ~]$ dgmgrl

DGMGRL for Linux: Release 12.2.0.1.0 - Production on Tue May 25 14:34:37 2021


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


Welcome to DGMGRL, type "help" for information.

DGMGRL> connect sys/@india

Password:

Connected to "india"

Connected as SYSDBA.

DGMGRL>

DGMGRL>

DGMGRL>

DGMGRL>

DGMGRL> show configuration;


Configuration - india


  Protection Mode: MaxPerformance

  Members:

  india      - Primary database

    india_stby - Physical standby database


Fast-Start Failover: DISABLED


Configuration Status:

SUCCESS   (status updated 47 seconds ago)


DGMGRL>

DGMGRL>

DGMGRL> validate database verbose india;


  Database Role:    Primary database


  Ready for Switchover:  Yes


  Flashback Database Status:

    india:  Off


  Capacity Information:

    Database  Instances        Threads

    india     1                1


  Managed by Clusterware:

    india:  NO

    Warning: Ensure primary database's StaticConnectIdentifier property

    is configured properly so that the primary database can be restarted

    by DGMGRL after switchover


  Temporary Tablespace File Information:

    india TEMP Files:  1


  Data file Online Move in Progress:

    india:  No


  Transport-Related Information:

    Transport On:  Yes


  Log Files Cleared:

    india Standby Redo Log Files:  Cleared


  Automatic Diagnostic Repository Errors:

    Error                       india

    No logging operation        NO

    Control file corruptions    NO

    System data file missing    NO

    System data file corrupted  NO

    System data file offline    NO

    User data file missing      NO

    User data file corrupted    NO

    User data file offline      NO

    Block Corruptions found     NO


DGMGRL>

DGMGRL> validate database verbose india_stby;


  Database Role:     Physical standby database

  Primary Database:  india


  Ready for Switchover:  Yes

  Ready for Failover:    Yes (Primary Running)


  Flashback Database Status:

    india     :  Off

    india_stby:  On


  Capacity Information:

    Database    Instances        Threads

    india       1                1

    india_stby  1                1


  Managed by Clusterware:

    india     :  NO

    india_stby:  NO

    Warning: Ensure primary database's StaticConnectIdentifier property

    is configured properly so that the primary database can be restarted

    by DGMGRL after switchover


  Temporary Tablespace File Information:

    india TEMP Files:       1

    india_stby TEMP Files:  1


  Data file Online Move in Progress:

    india:       No

    india_stby:  No


  Standby Apply-Related Information:

    Apply State:      Running

    Apply Lag:        0 seconds (computed 1 second ago)

    Apply Delay:      0 minutes


  Transport-Related Information:

    Transport On:      Yes

    Gap Status:        No Gap

    Transport Lag:     0 seconds (computed 1 second ago)

    Transport Status:  Success


  Log Files Cleared:

    india Standby Redo Log Files:       Cleared

    india_stby Online Redo Log Files:   Cleared

    india_stby Standby Redo Log Files:  Available


  Current Log File Groups Configuration:

    Thread #  Online Redo Log Groups  Standby Redo Log Groups Status

              (india)                 (india_stby)

    1         3                       3                       Insufficient SRLs


  Future Log File Groups Configuration:

    Thread #  Online Redo Log Groups  Standby Redo Log Groups Status

              (india_stby)            (india)

    1         3                       2                       Insufficient SRLs


  Current Configuration Log File Sizes:

    Thread #   Smallest Online Redo      Smallest Standby Redo

               Log File Size             Log File Size

               (india)                   (india_stby)

    1          200 MBytes                200 MBytes


  Future Configuration Log File Sizes:

    Thread #   Smallest Online Redo      Smallest Standby Redo

               Log File Size             Log File Size

               (india_stby)              (india)

    1          200 MBytes                200 MBytes


  Apply-Related Property Settings:

    Property                        india Value              india_stby Value

    DelayMins                       0                        0

    ApplyParallel                   AUTO                     AUTO

    ApplyInstances                  0                        0


  Transport-Related Property Settings:

    Property                        india Value              india_stby Value

    LogXptMode                      ASYNC                    ASYNC

    Dependency                      <empty>                  <empty>

    DelayMins                       0                        0

    Binding                         optional                 optional

    MaxFailure                      0                        0

    MaxConnections                  1                        1

    ReopenSecs                      300                      300

    NetTimeout                      30                       30

    RedoCompression                 DISABLE                  DISABLE

    LogShipping                     ON                       ON


  Automatic Diagnostic Repository Errors:

    Error                       india    india_stby

    No logging operation        NO       NO

    Control file corruptions    NO       NO

    SRL Group Unavailable       NO       NO

    System data file missing    NO       NO

    System data file corrupted  NO       NO

    System data file offline    NO       NO

    User data file missing      NO       NO

    User data file corrupted    NO       NO

    User data file offline      NO       NO

    Block Corruptions found     NO       NO


DGMGRL>