Friday, July 26, 2024

Procedure to manage Oracle Physical Standby Database using DGMGRL for Oracle 19c

Procedure to manage Oracle Physical Standby Database using DGMGRL for Oracle 19c:


*Step 1: Create a Standby Database*


- Create a physical standby database using RMAN duplicate command.

- Ensure the standby database is in recovery mode.


*Step 2: Configure DGMGRL*


- Connect to the primary database using DGMGRL.

- Configure the standby database using the following commands:

```

DGMGRL> CREATE CONFIGURATION 'standby_config';

DGMGRL> ADD DATABASE 'standby_db' AS 'physical_standby';

```

*Step 3: Enable DGMGRL*


- Enable DGMGRL using the following command:

```

DGMGRL> ENABLE CONFIGURATION;

```

*Step 4: Monitor Standby Database*


- Monitor the standby database using the following command:

```

DGMGRL> SHOW DATABASE 'standby_db';

```

*Step 5: Perform Switchover*


- Perform a switchover to the standby database using the following command:

```

DGMGRL> SWITCHOVER TO 'standby_db';

```

*Step 6: Perform Failover*


- Perform a failover to the standby database using the following command:

```

DGMGRL> FAILOVER TO 'standby_db';

```

*Step 7: Reinstate Primary Database*


- Reinstate the primary database using the following command:

```

DGMGRL> REINSTATE 'primary_db';

```

*Step 8: Remove Standby Database*


- Remove the standby database using the following command:

```

DGMGRL> REMOVE DATABASE 'standby_db';

```

*Additional Commands*


- To check the configuration: `DGMGRL> SHOW CONFIGURATION;`

- To check the database status: `DGMGRL> SHOW DATABASE <db_name>;`

- To check the switchover status: `DGMGRL> SHOW SWITCHOVER STATUS;`


Note: Ensure you have the necessary privileges and credentials to perform these operations.


Also, please note that this is a general procedure and you should consult the Oracle documentation and your organization's policies and procedures for specific instructions and guidelines on managing Oracle Physical Standby Database using DGMGRL.

Oracle “SYS” Credentials Update

 To change the Oracle sys password in a primary database and physical standby database, follow these steps:


*Primary Database:*


1. Connect to the primary database as sysdba:

```

sqlplus / as sysdba

```

1. Change the sys password:

```

ALTER USER SYS IDENTIFIED BY <new_password>;

```

*Physical Standby Database:*


1. Connect to the physical standby database as sysdba:

```

sqlplus / as sysdba

```

1. Change the sys password:

```

ALTER USER SYS IDENTIFIED BY <new_password> CONTAINER=ALL;

```

Note: The `CONTAINER=ALL` clause is required to change the password for all containers (root and PDBs) in a multitenant environment.


*Synchronize Passwords:*


To synchronize the sys password between the primary and physical standby databases, use the following command on the primary database:

```

ALTER SYSTEM SET STANDBY_PASSWORD = <new_password> SCOPE=BOTH;

```

This command updates the standby password in the primary database and propagates the change to the physical standby database.


*Verify Password Change:*


Verify that the sys password has been changed successfully by connecting to both databases with the new password:

```

sqlplus sys/<new_password>@<primary_db>

sqlplus sys/<new_password>@<physical_standby_db>

```

Remember to update any scripts, applications, or tools that use the sys password to connect to the databases.

Migrating Fusion Middleware from Solaris to Linux

 Migrating Fusion Middleware from Solaris to Linux involves several steps. Here's a general outline:


*Exporting the domain and configuration from Solaris:*


1. *Backup the domain*: Use the WebLogic Server Console or WLST commands to backup the entire domain, including all configurations, applications, and security settings.

2. *Export the domain configuration*: Use the `pack` command to export the domain configuration to a jar file.

    - `pack -domain=domain_name -template=domain_template.jar`

3. *Export individual components*: Export individual components like SOA Suite, Oracle Service Bus (OSB), or Oracle Enterprise Manager (EM) using their respective tools or WLST commands.

4. *Export database schemas*: Export the database schemas used by Fusion Middleware components using the database vendor's tools (e.g., Oracle Data Pump).


*Migrating to Linux:*


1. *Install Linux*: Install the chosen Linux distribution on the target server.

2. *Install Fusion Middleware*: Install the same version of Fusion Middleware on Linux as was on Solaris.

3. *Create a new domain*: Create a new domain on Linux using the WebLogic Server Configuration Wizard.

4. *Import the domain configuration*: Use the `unpack` command to import the domain configuration from the jar file.

    - `unpack -domain=domain_name -template=domain_template.jar`

5. *Configure individual components*: Configure individual components like SOA Suite, OSB, or EM using their respective tools or WLST commands.

6. *Update database connections*: Update the database connections and credentials in the Fusion Middleware configuration.

7. *Test and validate*: Perform thorough testing to ensure all components and applications are functioning correctly.


Additional tips:


- Use the same version of Fusion Middleware on Linux as was on Solaris to ensure compatibility.

- Ensure the Linux environment is properly configured and patched.

- Use Oracle's official documentation and support resources for guidance specific to your Fusion Middleware version and environment.

- Consider engaging Oracle consulting services or a certified partner for complex migrations.


Some useful WLST commands for exporting and importing domain configurations:


- `exportDomain`: Exports the entire domain configuration to a jar file.

- `importDomain`: Imports the domain configuration from a jar file.

- `exportComponent`: Exports a specific component's configuration (e.g., SOA Suite, OSB).

- `importComponent`: Imports a component's configuration from a jar file.


Remember to consult Oracle's official documentation and support resources for more detailed instructions and guidance specific to your Fusion Middleware version and environment.

Migrating Oracle E-Business Suite (EBS) from Solaris to Linux

 Migrating Oracle E-Business Suite (EBS) from Solaris to Linux involves several steps. Here's a general outline:


*Pre-Migration Steps:*


1. *Assess and plan*:

    - Identify the EBS version, modules, and customizations.

    - Determine the Linux distribution and version to use.

    - Plan the migration approach, timeline, and resources.

2. *Backup and archive*:

    - Backup the entire EBS environment, including databases, files, and configurations.

    - Archive the backups for future reference.


*Migration Steps:*


1. *Install Linux*:

    - Install the chosen Linux distribution on the target server.

2. *Install Oracle Database*:

    - Install the same version of Oracle Database on Linux as was on Solaris.

3. *Install EBS software*:

    - Install the same version of EBS on Linux as was on Solaris.

4. *Configure EBS*:

    - Configure EBS using the Rapid Install wizard or manual configuration.

5. *Migrate databases*:

    - Migrate the EBS databases from Solaris to Linux using Oracle Data Pump or RMAN.

6. *Migrate file system*:

    - Migrate the EBS file system from Solaris to Linux using tools like rsync or scp.

7. *Update configuration files*:

    - Update the EBS configuration files to reflect the new Linux environment.

8. *Test and validate*:

    - Perform thorough testing to ensure EBS is functioning correctly.


*Post-Migration Steps:*


1. *Cleanup and optimization*:

    - Remove unnecessary files and configurations.

    - Optimize the EBS configuration for the Linux environment.

2. *Final testing and validation*:

    - Perform final testing to ensure EBS is functioning as expected.


*Step-by-Step Procedure:*


*Step 1: Prepare the Linux Environment*


- Install the chosen Linux distribution on the target server.

- Install required packages and updates.


*Step 2: Install Oracle Database*


- Download the Oracle Database installation media.

- Install Oracle Database using the graphical or silent installation method.


*Step 3: Install EBS Software*


- Download the EBS installation media.

- Install EBS using the Rapid Install wizard or manual configuration.


*Step 4: Configure EBS*


- Configure EBS using the Rapid Install wizard or manual configuration.

- Update the EBS configuration files to reflect the new Linux environment.


*Step 5: Migrate Databases*


- Use Oracle Data Pump or RMAN to migrate the EBS databases from Solaris to Linux.


*Step 6: Migrate File System*


- Use tools like rsync or scp to migrate the EBS file system from Solaris to Linux.


*Step 7: Update Configuration Files*


- Update the EBS configuration files to reflect the new Linux environment.


*Step 8: Test and Validate*


- Perform thorough testing to ensure EBS is functioning correctly.


*Step 9: Cleanup and Optimization*


- Remove unnecessary files and configurations.

- Optimize the EBS configuration for the Linux environment.


*Step 10: Final Testing and Validation*


- Perform final testing to ensure EBS is functioning as expected.


Remember to consult Oracle's official documentation and support resources for more detailed instructions and guidance specific to your EBS version and environment.

NTP

 When enabling NTP (Network Time Protocol) on a RAC (Real Application Clusters) database running on Solaris 11, downtime is not strictly necessary, but it's highly recommended to minimize potential issues. Here's why:


1. *Node synchronization*: NTP ensures all nodes in the RAC cluster have synchronized clocks. If you enable NTP without downtime, the nodes might not sync immediately, potentially causing issues with database operations.

2. *Clock adjustments*: When NTP is enabled, the system clock might be adjusted to match the reference clock. This adjustment can cause issues with database processes, especially if they're sensitive to time changes.

3. *RAC node evictions*: If the clock adjustments are significant, RAC nodes might be evicted from the cluster, leading to downtime and potential data inconsistencies.


To minimize risks, consider the following:


1. *Schedule downtime*: Plan a maintenance window to enable NTP, ensuring all nodes are updated and synchronized simultaneously.

2. *Use the `ntpd` command*: Instead of enabling NTP through the `svcadm` command, use `ntpd` with the `-r` option to restart the NTP service. This allows for a smoother transition.

3. *Monitor the cluster*: Closely monitor the RAC cluster during and after NTP enablement to quickly address any issues that arise.


In summary, while downtime is not mandatory, it's highly recommended to ensure a smooth transition when enabling NTP on a RAC database running on Solaris 11.