Oracle Database 23ai: Fetch Top-N Rows Per Group Queries
Overview: Oracle 23ai introduces partition by clause in fetch first clause to get top-N rows per group. A query’s syntax ... Read More






There are two options to peer Oracle Cloud Infrastructure (OCI) VCNs in the same region.
In this blog, we will demonstrate the steps to peer two VCNs in the same region using a DRG in the same tenancy.
Peering two VCNs in the same region through a DRG gives you more flexibility in your routing and simplified management but comes at the cost of a microsecond increase in latency due to routing traffic through a virtual router.
At a high level, the networking service components required for this scenario include:
|
|
VCN1 |
VCN2 |
| VCN Name |
TOR-VCN1 |
TOR-VCN2 |
| Private Subnet CIDR |
172.10.0.64/26 |
172.20.0.64/26 |
| DRG |
TOR-DRG |
|
| Compute Instance |
VCN1-VM (172.10.0.124) |
VCN2-VM (172.20.0.124) |

Prerequisites:
1. Open the navigation menu and click Networking. Under Customer connectivity, click Dynamic Routing Gateway.

2. Click the “Create Dynamic Routing Gateway” Button

3. In the “Create dynamic routing gateway” page, enter the DRG name and the compartment where you want to create the DRG

1. Attach DRG to TOR-VCN1


2. Attach DRG to TOR-VCN2. Repeat the same steps done above to attach TOR-VCN1

1. Configure the route table in TOR-VCN1 to send traffic to TOR-VCN2’s private subnet CIDR to the DRG attachment

| Target Type |
Destination Type |
Destination CIDR Block |
| Dynamic Routing Gateway |
CDIR Block |
172.20.0.64/26 (VCN2-private subnet CIDR) |



2. Configure the route table in TOR-VCN2 to send traffic to TOR-VCN1’s private subnet CIDR to the DRG attachment
Use below rule information
| Target Type |
Destination Type |
Destination CIDR Block |
| Dynamic Routing Gateway |
CDIR Block |
172.10.0.64/26 (VCN2-private subnet CIDR) |

1. Add Ingress rule to “security list for private subnet-TOR-VCN1” of the first VCN (TOR-VCN1) to allow traffic coming from VCN2-private subnet to VCN1-private subnet

| Source Type |
Source CIDR |
IP PROTOCOL |
| CIDR |
172.20.0.64/26 (VCN2-private subnet CIDR) |
All Protocols |



2. Add Ingress rule to the “security list for private subnet-TOR-VCN2” of the first VCN (TOR-VCN2) to allow traffic coming from VCN1-private subnet to VCN2-private subnet
| Source Type |
Source CIDR |
IP PROTOCOL |
| CIDR |
172.10.0.64/26 (VCN1-private subnet CIDR) |
All Protocols |
1. Connect to VCN1-VM, then ssh to VCN2-VM


2. Connect to VCN1-VM, then ssh to VCN2-VM. Repeat the same steps

Thanks for reading!
Overview: Oracle 23ai introduces partition by clause in fetch first clause to get top-N rows per group. A query’s syntax ... Read More
Overview: Oracle first introduced the ability to display a JSON schema when they introduced the JSON Data in Oracle 12.2 but without the option to ... Read More
