Skip to content

Commit

Permalink
WMSID: 11640 - Finalized the instructions (#50)
Browse files Browse the repository at this point in the history
* Added the SSH key instructions for OCW
* Reviewed everything with Grammarly
  • Loading branch information
lcaldara-oracle authored Aug 22, 2024
1 parent 502341b commit f0fa0ea
Show file tree
Hide file tree
Showing 12 changed files with 521 additions and 125 deletions.
12 changes: 6 additions & 6 deletions data-guard/active-data-guard-23ai/awr-snapshots/awr-snapshots.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
## Introduction
In real-world environments, it is common to require Automatic Workload Repository (AWR) reports for the standby databases to troubleshoot the redo apply throughput or the standby database performance in general.

Before Oracle Database 23ai, it wasn't possible to create a snapshot on the standby without configuring a SYS$UMF topology. The process was cumbersome and required manual intervention after a role change (e.g. switchover). Oracle Database 23ai greatly simplify the task by allowing the seamless creation of AWR snapshots!
Before Oracle Database 23ai, creating a snapshot on the standby database was impossible without configuring a SYS$UMF topology. The process was cumbersome and required manual intervention after a role change (e.g., a switch over). Oracle Database 23ai greatly simplifies the task by allowing the seamless creation of AWR snapshots!


Estimated Lab Time: 5 Minutes

### Requirements
To try this lab, you must have successfully completed the following labs:
To try this lab, you must have completed the following labs:
* [Prepare the database hosts](../prepare-host/prepare-host.md)
* [Prepare the databases](../prepare-db/prepare-db.md)
* [Configure Data Guard](../configure-dg/configure-dg.md)
Expand All @@ -19,7 +19,7 @@ To try this lab, you must have successfully completed the following labs:
* Create an AWR report
* Review the report

## Task 1: Create two AWR snapshost
## Task 1: Create two AWR snapshots

1. On the host where the standby database is running (adghol1), connect as SYSDBA and create an AWR snapshot:

Expand Down Expand Up @@ -58,7 +58,7 @@ To try this lab, you must have successfully completed the following labs:
![First part of the report creation](images/awrrpt-1.png)
2. Select **text** as the report_type.
You will notice that the DBID list shows a different DBID for the standby database. This is because the new DBID is generated syntetically to distinguish the primary snapshots from the standby snapshots.
You will notice that the DBID list shows a different DBID for the standby database. That is because the new DBID is generated synthetically to distinguish the primary snapshots from the standby snapshots.
3. The DBID and SID are pre-selected by the reporting tool, so you only need to specify the number of days (**1**), and the snapshots to generate the report (**1** and **2**):
Expand All @@ -79,9 +79,9 @@ To try this lab, you must have successfully completed the following labs:
You will notice that the AWR report belongs to the standby database.
You have successfully created AWR reports for the standby database. This concludes the Data Guard overview workshop.
You have successfully created AWR reports for the standby database and completed the Data Guard overview workshop.
Well done!
Good job!
- **Author** - Ludovico Caldara, Product Manager Data Guard, Active Data Guard and Flashback Technologies
- **Contributors** - Robert Pastijn
Expand Down
19 changes: 10 additions & 9 deletions data-guard/active-data-guard-23ai/configure-dg/configure-dg.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ The broker automates all the aspects of a Data Guard topology, including setting

For more information about the Data Guard broker, refer to the [broker documentation](https://docs.oracle.com/en/database/oracle/oracle-database/23/dgbkr/oracle-data-guard-broker-concepts.html#GUID-723E5B73-A350-4B2E-AF3C-5EA4EFC83966).

After configuring the broker, we will check the configuration and have a basic knowledge of how to control and monitor Data Guard.

Estimated Lab Time: 5 Minutes

### Requirements
To try this lab, you must have successfully completed:
To try this lab, you must have completed:
* Lab 1: Prepare the database hosts
* Lab 2: Prepare the databases

Expand All @@ -22,11 +20,11 @@ To try this lab, you must have successfully completed:

## Task 1: Configure Data Guard

You should have two Cloud Shell tabs connected to the primary and secondary hosts, adghol0 and adghol1. If you don't, follow the first steps of Lab 1 until you have both SSH connections established.
You should have two Cloud Shell tabs connected to the primary and secondary hosts, adghol0 and adghol1. Otherwise, follow the first steps of Lab 1 until you have both SSH connections established.

For this live lab, we will use the new `sql` (SQLcl) integration for Data Guard instead of the traditional `dgmgrl` command-line. Starting with Oracle 21c, it is possible to use SQLcl to run most Data Guard commands. The commands are identical, except that they require to prepend `DG` before the actual Data Guard command.
For this live lab, we will use the new `sql` (SQLcl) integration for Data Guard instead of the traditional `dgmgrl` command line. Starting with Oracle 21c, it is possible to use SQLcl to run most Data Guard commands. The commands are identical, except they require `DG` to be prepended before the actual Data Guard command.

1. From a terminal (**which one of the two hosts is irrelevant for this task**), connect to the primary database using the `sql` command-line tool (SQLcl). We use the DGConnectIdentifier for that (the one that connects to the service named after the `db_unique_name`).
1. From a terminal (**which one of the two hosts is irrelevant for this task**), connect to the primary database using the `sql` command line tool (SQLcl). We use the DGConnectIdentifier for that (the one that connects to the service named after the `db_unique_name`).

```
<copy>
Expand Down Expand Up @@ -61,7 +59,7 @@ For this live lab, we will use the new `sql` (SQLcl) integration for Data Guard
```
4. Set the `StaticConnectIdentifier` for both databases.
Although the broker builds the default static connect identifier if it's not explicitly configured, it is still a good practice to set it to ease the troubleshooting. In this lab, we need to set it to specify the FQDN of the hosts, or the DNS will not solve the remote host.
Although the broker builds the default static connect identifier if it's not explicitly configured, it is still a good practice to set it to ease the troubleshooting. In this lab, we need to set it to specify the FQDN of the hosts or the DNS will not solve the remote host.
**Replace `ADGHOL0_UNIQUE_NAME` and `ADGHOL1_UNIQUE_NAME` with the actual values**:
```
Expand Down Expand Up @@ -101,18 +99,21 @@ For this live lab, we will use the new `sql` (SQLcl) integration for Data Guard
```
Warning: ORA-16854: apply lag could not be determined
```
Try using `dg show configuration verbose` instead, to force a refresh of the status cache.
Try using `dg show configuration verbose` instead to force a refresh of the status cache.
![Show configuration shows a healthy status](images/show-configuration.png)
That means that the primary can contact the standby database with the `DGConnectIdentifier`, send the redo stream with no lag, and the standby database can apply it successfully without lag.
6. Exit from the SQLcl command-line:
6. Exit from the SQLcl command line:
```
<copy>
exit
</copy>
```
For more information about setting up Data Guard, read the [Data Guard Broker Documentation](https://docs.oracle.com/en/database/oracle/oracle-database/23/dgbkr/examples-using-data-guard-broker-DGMGRL-utility.html#GUID-D9018A5C-8C7A-4F6C-A7D3-B14E5AF7D4BC).
You have successfully created the Oracle Data Guard configuration. In the next lab, we will see how to monitor and alter the configuration.
## Acknowledgements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

## Introduction

Once the Data Guard configuration is in place, it is important to connect to the databases using highly-available connection strings. The connection strings, besides having multiple addresses, require connections to specific application services (for example, the OLTP read-write service for the HR application). The read-write services should only be available on the primary database. If this is not the case, the application will have issues when connecting to a database that is not available for write operations. Also, when having a highly-available connection string, it's possible to keep the same connection string across role changes (e.g. after a failover or a switchover), without reconfiguring the application connectivity.
Once the Data Guard configuration is in place, it is crucial to connect to the databases using highly-available connection strings. Besides having multiple addresses, the connection strings must use specific application services (for example, the OLTP read-write service for the HR application). The read-write services should only be available on the primary database. If this is not the case, the application will have issues when connecting to a database that is not available for write operations. Also, when having a highly-available connection string, it's possible to keep the same connection string across role changes (e.g. after a failover or a switchover), without reconfiguring the application connectivity.

The services that run only on databases with specific roles are called role-based services.

**Never configure your applications to connect to the default services!** Always use a role-based application service with high availability properties.

**Don't use any PDB saved states!** Saving a PDB's state will automatically open the PDB and the primary role services on the standby database when the PDB is opened there, which can lead to unwanted situations (e.g., the read/write application pointing to the standby database). Always discard the PDB states when configuring Data Guard.

Oracle recommends that you use Oracle Clusterware or Oracle Restart for single instance databases when you need to configure role-based services. For Oracle Real Application Clusters, Oracle Clusterware is a requirement. The Oracle Data Guard broker is aware of Oracle Clusterware, and delegates the stop and start of the instances to it. Also, Oracle Clusterware optimally manages the role-based services.
Oracle recommends using use Oracle Clusterware or Oracle Restart for single-instance databases when configuring role-based services. For Oracle Real Application Clusters, Oracle Clusterware is a requirement. The Oracle Data Guard broker is aware of Oracle Clusterware, and delegates the stop and start of the instances to it. Also, Oracle Clusterware optimally manages the role-based services.

However, when Oracle Clusterware is not available (like on the database servers created for this lab), one has to manage role-based services differently. Typically, we use the `DBMS_SERVICES` package along with startup triggers to stop and start the correct services depending on the database role.
However, when Oracle Clusterware is unavailable (like on the database servers created for this lab), one has to manage role-based services differently. Typically, we use the `DBMS_SERVICES` package and startup triggers to stop and start the correct services, depending on the database role.

In this lab, we will create the services for the primary, physical standby, and snapshot standby roles, along with the trigger that stops and starts them. We will then test the connection to the primary service.

Expand All @@ -34,13 +34,13 @@ To try this lab, you must have successfully completed:
## Task 1: Discard all PDB saved states

1. From a terminal (**which one of the two hosts is irrelevant for this lab**), connect to the primary database as SYSDBA and discard any existing saved states.

```
<copy>
sql sys/WElcome123##@adghol0_dgci as sysdba
alter pluggable database all discard state;
</copy>
```
```
<copy>
sql sys/WElcome123##@adghol0_dgci as sysdba
alter pluggable database all discard state;
</copy>
```
## Task 2: Create and start the role-based services
Expand Down Expand Up @@ -121,14 +121,16 @@ To try this lab, you must have successfully completed:
![Connection to the read-write service](images/connect.png)
3. Exit the SQLcl command-line:
3. Exit the SQLcl command line:
```
<copy>
exit
</copy>
```
For more information about creating services with DBMS_SERVICE, read the [PL/SQL Packages and Types Reference](https://docs.oracle.com/en/database/oracle/oracle-database/23/arpls/DBMS_SERVICE.html#GUID-C11449DC-EEDE-4BB8-9D2C-0A45198C1928).
You have successfully created, started, and connected to the application role-based service.
## Acknowledgements
Expand Down
10 changes: 5 additions & 5 deletions data-guard/active-data-guard-23ai/introduction/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

## Introduction

Oracle Data Guard provides a comprehensive set of services that create, maintain, manage, and monitor one or more standby databases to enable production Oracle databases to survive disasters and data corruptions.
Oracle Data Guard provides a comprehensive set of services that create, maintain, manage, and monitor one or more standby databases to enable production Oracle databases to survive disasters and data corruption.

Oracle Data Guard maintains these standby databases as copies of the production database. Then, if the production database becomes unavailable because of a planned or an unplanned outage, Oracle Data Guard can switch any standby database to the production role, minimizing the downtime associated with the outage. Oracle Data Guard can be used with traditional backup, restoration, and cluster techniques to provide a high level of data protection and data availability.
Oracle Data Guard maintains these standby databases as copies of the production database. If the production database becomes unavailable due to a planned or an unplanned outage, Oracle Data Guard can switch any standby database to the production role, minimizing the downtime associated with the outage. Oracle Data Guard can be used with traditional backup, restoration, and cluster techniques to provide a high level of data protection and data availability.

Oracle (Active) Data Guard capabilities in Oracle Database 23ai further enhance its strategic objective of preventing data loss, providing high availability, eliminating risk, and increasing return on investment by enabling highly functional active disaster recovery systems that are simple to deploy and manage.

It accomplishes this by providing the management, monitoring, and automation software infrastructure to create and maintain one or more synchronized standby databases that protect Oracle data from failures, data corruption, human error, and disasters
It accomplishes this by providing the management, monitoring, and automation software infrastructure to create and maintain one or more synchronized standby databases that protect Oracle data from failures, data corruption, human error, and disasters.

This workshop focuses on **Creating Active Data Guard 23ai in Oracle Cloud Infrastructure using Base Database Services (BaseDB)**.

Instead of leveraging the Control Plane automation to create the Data Guard association, this workshop will guide you through the manual creation of the standby database and the Data Guard configuration, to provide a similar experience to on-premises and hybrid environments. Similarly, complex topologies that cannot be achieved with the Control Plane automation, require manual Data Guard setup in the Oracle Cloud Infrastructure.
Instead of leveraging the Control Plane automation to create the Data Guard association, this workshop will guide you through the manual creation of the standby database and the Data Guard configuration to provide a similar experience to on-premises and hybrid environments. Similarly, complex topologies that cannot be achieved with the Control Plane automation require manual Data Guard setup in the Oracle Cloud Infrastructure.

![Architecture of Active Data Guard showing one primary database and one standby database.](./images/architecture-overview.png)

Expand All @@ -35,7 +35,7 @@ Estimated workshop time: 2 Hours for the fundamental labs (labs 1 to 10)
### Prerequisites
- An Oracle Cloud Account - Please view this workshop's LiveLabs landing page to see which environments are supported

<i>Note: If you have a **Free Trial** account, when your Free Trial expires your account will be converted to an **Always Free** account. You will not be able to conduct Free Tier workshops unless the Always Free environment is available. **[Click here for the Free Tier FAQ page.](https://www.oracle.com/cloud/free/faq.html)**</i>
<i>Note: If you have a **Free Trial** account, when your Free Trial expires, your account will be converted to an **Always Free** account. You cannot conduct Free Tier workshops unless the Always Free environment is available. **[Click here for the Free Tier FAQ page.](https://www.oracle.com/cloud/free/faq.html)**</i>

## Disclaimer
The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.
Expand Down
Loading

0 comments on commit f0fa0ea

Please sign in to comment.