Skip to content

Commit 6e501e5

Browse files
committed
updated documentation
1 parent 441ccc8 commit 6e501e5

File tree

10 files changed

+180
-32
lines changed

10 files changed

+180
-32
lines changed

README.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,32 @@
1-
# Oracle Database@Azure Samples
1+
# Oracle Autonomous Database Samples
22

33
[![License: UPL](https://img.shields.io/badge/license-UPL-green)](https://img.shields.io/badge/license-UPL-green)
44

55
## Introduction
6-
Oracle Database@Azure brings Oracle's best databases - Exadata and Autonomous Database - to Microsoft Azure as a native Azure services. Modernize and deliver powerful new apps that leverage Oracle Database 23ai and Azure services:
7-
* Build new cloud native apps using Azure services, such as Azure Kubernetes and Azure OpenAI, with Oracle Autonomous Database.
6+
Oracle Autonomous Database provides a fully automated cloud database service that eliminates manual database management tasks, reduces operational costs, enhances security through automatic patching and encryption, and enables businesses to rapidly scale and optimize their data processing and analytics.
7+
8+
Autonomous Database runs natively on OCI, Azure (Oracle Database@Azure) and Google Cloud (Oracle Database@Google Cloud). Modernize and deliver powerful new apps that leverage Oracle Database 23ai with other cloud services services:
9+
* Build new cloud native apps using built-in integrations, such as Kubernetes, AI, DevOps and more
810
* Enhance existing apps with natural language and other generative AI capabilities.
911
* Quickly react to business demands using one converged, fully automated database that’s optimized for all workloads and data formats.
1012

13+
Use these samples to deploy Autonomous Database on cloud providers using APIs. Then, check out the SQL samples that leverage both Autonomous Database cloud integration and converged database capabiltities.
14+
1115
## Getting Started
12-
* [Subscribe to Oracle Database@Azure](https://www.youtube.com/watch?v=MEB8kB_TI2I)
13-
* Deploy a new Oracle Autonomous Database
14-
* [Using the Azure Portal](https://youtu.be/QOCvRr5CfeQ)
15-
* [Using Terraform scripts](https://github.com/oci-landing-zones/terraform-oci-multicloud-azure/tree/main)
16-
* [Using the Azure CLI](azure-cli/README.md)
16+
* Deploy Autonomous Database:
17+
* [On OCI](./multicloud/oci-cli/README.md)
18+
* [On Azure](./multicloud/azure-cli/README.md)
19+
* On Google Cloud (deployment script coming soon)
1720
* Connect to your Autonomous Database
1821
* [Learn about connectivity options](https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/connect-preparing.html)
1922
* Use these great VS Code extensions that help you develop and debug your database apps
2023
* SQL Developer for VS Code ([Learn More](https://www.oracle.com/database/sqldeveloper/vscode/) | [Marketplace](https://marketplace.visualstudio.com/items?itemName=Oracle.sql-developer))
2124
* Oracle Developer Tools for VS Code ([Learn More](https://docs.oracle.com/en/database/oracle/developer-tools-for-vscode/getting-started/gettingstarted.html) | [Marketplace](https://marketplace.visualstudio.com/items?itemName=Oracle.oracledevtools))
2225
* [Sample SQL code](./sql/README.md)
2326
* Create a database user and add sample data
24-
* Work with data in Azure Storage
27+
* Work with data in cloud storage
2528
* Get started with Select AI
29+
* Build property graphs and run analytics over those graphs
2630
* .... and more
2731

2832
<!--

multicloud/azure-cli/README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
# Oracle Database@Azure: Create an Autonomous Database
2+
There are different ways that you can deploy a new Oracle Autonomous Database:
3+
* [Using the Azure Portal](https://youtu.be/QOCvRr5CfeQ)
4+
* [Using Terraform scripts](https://github.com/oci-landing-zones/terraform-oci-multicloud-azure/tree/main)
5+
* Using the Azure CLI
6+
27
The steps below show how to create an Autonomous Database using the Azure CLI.
38

4-
Prerequisites:
9+
## Prerequisites:
510
* [Install the Azure CLI](https://learn.microsoft.com/en-us/cli/azure/)
611
* [Subscribe to Oracle Database@Azure](https://www.youtube.com/watch?v=MEB8kB_TI2I)
712
* Ensure you have the appropriate user groups and privileges. See [details for onboarding Autonomous Database](https://learn.microsoft.com/en-us/azure/oracle/oracle-db/onboard-oracle-database)
@@ -72,12 +77,12 @@ Connect to your Autonomous Database!
7277

7378
#### JDBC Example:
7479
JDBC is a common way to connect to Autonomous Database. For example, you can use the **Custom JDBC URL** in the VS Code SQL Developer Extension:
75-
![connection dialog](images/connect-dialog.png)
80+
![connection dialog](../images/connect-dialog.png)
7681

7782
Notice the `jdbc:oracle:thin:@` prefix followed by a connection string. You can find the connection string in different ways.
7883

7984
1. Go to your Autonomous Database blade in the Azure Portal and go to **Settings -> Connections**:
80-
![Azure Portal connections](images/connections-portal.png)
85+
![Azure Portal connections](../images/connections-portal.png)
8186
2. Use the Azure cli script [`show-adb-info.sh`](./show-adb-info.sh). That script will return information about your Autonomous Database, including connection details.
8287

8388
<hr>

multicloud/oci-cli/README.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Create an Autonomous Database on OCI
2+
There are different ways that you can deploy a new Oracle Autonomous Database:
3+
* [Using the OCI Console](https://youtu.be/5BUXoBewZbQ)
4+
* [Using Terraform scripts](https://github.com/oci-landing-zones/terraform-oci-multicloud-azure/tree/main)
5+
* Using the OCI CLI
6+
7+
The steps below show how to create an Autonomous Database using the OCI CLI.
8+
9+
## Prerequisites:
10+
* [Install the OCI CLI](https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/cliinstall.htm)
11+
* [Subscribe to Autonomous Database for free](https://www.oracle.com/autonomous-database/free-trial/)
12+
* See documentation to ensure you have the appropriate user groups and privileges.
13+
* [Deploy Autonomous Database](https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/autonomous-database-iam-policies.html)
14+
* [Use OCI GenAI](https://docs.oracle.com/en-us/iaas/Content/generative-ai/iam-policies.htm)
15+
* [Use OCI Object Storage](https://docs.oracle.com/en-us/iaas/Content/Security/Reference/objectstorage_security.htm#iam-policies)
16+
17+
## Deploy your Autonomous Database
18+
Use the following scripts to deploy your Autonomous Database and sample data. You can run the scripts independently or run `create-all-resources.sh`. Simply update the [`config`](#configuration-file) prior to running the scripts:
19+
20+
|Script|Description|
21+
|----|---|
22+
|[create-compartment.sh](create-compartment-group.sh)|Create a compartment for your Autonomous Database|
23+
|[create-adb.sh](create-adb.sh)|Create an Autonomous Database in the compartment|
24+
|[create-all-resources.sh](create-all-resources.sh)|Creates your resource group, network, ADB and VM|
25+
|[create-data-lake-storage.sh](create-data-lake-storage.sh)|Creates an OCI Object Storage bucket and uploads sample data into that bucket|
26+
|[delete-all-resources.sh](delete-all-resources.sh)|Deletes your compartment, bucket and Autonomous Database|
27+
28+
### Configuration file
29+
The OCI cli deployment scripts rely on settings found in the config file. These resources **will be created** by the scripts. Update the config file prior to running any of the scripts.
30+
31+
>**IMPORTANT:** This file will contain a password that is used to connect to Autonomous Database and the virtual machine. Set the file's permissions so that only the file's owner can view its contents:
32+
```bash
33+
chmod 600 config
34+
```
35+
36+
|Setting|Description|Example|
37+
|----|----|----|
38+
|TENANCY_OCID|The tenancy Oracle Cloud Identifier. [See documentation](https://docs.oracle.com/en-us/iaas/Content/Identity/tenancy/Viewing_the_Tenancy_Details_Page.htm) for finding the OCID. |"ocid1.tenancy.oc1..aaaaaaaa..."|
39+
|REGION|Region where resources will be deployed. Your tenancy must be subscribed to the region.|"us-ashburn-1"|
40+
|COMPARTMENT|Target compartment for new resources|"development"|
41+
|ADB_NAME|Autonomous Database name. This name must be unique within a region location|"quickstart"|
42+
|BUCKET_NAME|The name of the Object Storage bucket where files will be uploaded|"adb-sample"|
43+
|USER_PASSWORD|The password for the Autonomous Database admin user|"Welcome1234#abcd"|
44+
45+
### Using the scripts
46+
Open a command prompt to deploy all the resources.
47+
48+
Creating all of the resources will take approximately 5 minutes.
49+
50+
```bash
51+
./create-all-resources.sh
52+
```
53+
54+
Check for errors after running the script. If there is an issue, simply rerun the script that creates the resource (note: you may need to update the config file).
55+
56+
## What's next
57+
Connect to your Autonomous Database!
58+
* [Learn about connectivity options](https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/connect-preparing.html)
59+
* Use these great VS Code extensions that help you develop and debug your database apps:
60+
* SQL Developer for VS Code ([Learn More](https://www.oracle.com/database/sqldeveloper/vscode/) | [Marketplace](https://marketplace.visualstudio.com/items?itemName=Oracle.sql-developer))
61+
* Oracle Developer Tools for VS Code ([Learn More](https://docs.oracle.com/en/database/oracle/developer-tools-for-vscode/getting-started/gettingstarted.html) | [Marketplace](https://marketplace.visualstudio.com/items?itemName=Oracle.oracledevtools))
62+
63+
#### JDBC Example:
64+
JDBC is a common way to connect to Autonomous Database. For example, you can use the **Custom JDBC URL** in the VS Code SQL Developer Extension:
65+
![connection dialog](../images/connect-dialog.png)
66+
67+
Notice the `jdbc:oracle:thin:@` prefix followed by a connection string. You can find the connection string in different ways.
68+
69+
1. Go to your Autonomous Database blade in the Azure Portal and go to **Settings -> Connections**:
70+
![Azure Portal connections](../images/connections-portal.png)
71+
2. Use the Azure cli script [`show-adb-info.sh`](./show-adb-info.sh). That script will return information about your Autonomous Database, including connection details.
72+
73+
<hr>
74+
Copyright (c) 2024 Oracle and/or its affiliates.<br>
75+
Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/

multicloud/oci-cli/config

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
33

44
# update the values below to match your requirements.
5-
TENANCY_OCID="your-tenancy-ocid"
5+
TENANCY_OCID="ocid1.tenancy.oc1..aaaaaaaafcue47pqmrf4vigneebgbcmmoy5r7xvoypicjqqge32ewnrcyx2a"
66
REGION="us-ashburn-1"
7-
COMPARTMENT_NAME="your-target-compartment"
7+
COMPARTMENT_NAME="from-github"
88
ADB_NAME="quickstart"
99

1010
## CLOUD STORAGE
@@ -13,4 +13,4 @@ BUCKET_NAME="adb-sample"
1313

1414
## IDENTITIES
1515
# The password is for the ADB ADMIN user. It must be between 12 and 30 characters long and must include at least one uppercase letter, one lowercase letter, and one numeric character
16-
USER_PASSWORD=""
16+
USER_PASSWORD="bigdataPM2019#"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Copyright (c) 2024 Oracle and/or its affiliates.
2+
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
3+
4+
set -e
5+
6+
./create-compartment.sh
7+
./create-adb.sh
8+
./create-data-lake-storage.sh

multicloud/oci-cli/delete-adb.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
source ./config
99

1010
# Ask for confirmation
11-
echo "Are you sure you want to delete database '$ADB_NAME' in region '$REGION' and compartment '$COMPARTMENT_NAME'?"
11+
echo "Are you sure you want to delete database '$ADB_NAME' in region '$REGION', compartment '$COMPARTMENT_NAME'?"
1212
echo "Enter (y/n)"
1313
read confirmation
1414

@@ -17,7 +17,7 @@ if [[ $confirmation == [yY] || $confirmation == [yY][eE][sS] ]]; then
1717
COMPARTMENT_OCID=`oci iam compartment list --region $REGION --all --query "data[?name=='$COMPARTMENT_NAME' && \"lifecycle-state\"=='ACTIVE'].id | [0]" --raw-output`
1818
ADB_OCID=`oci db autonomous-database list --region $REGION --compartment-id $COMPARTMENT_OCID --query "data[?\"db-name\"=='$ADB_NAME' && \"lifecycle-state\"=='AVAILABLE'].id | [0]" --raw-output`
1919

20-
oci db autonomous-database delete --region $REGION --force --autonomous-database-id $ADB_OCID
20+
oci db autonomous-database delete --region $REGION --force --autonomous-database-id $ADB_OCID --wait-for-state TERMINATED
2121
else
2222
echo "Deletion cancelled. The database was not deleted."
2323
fi
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/bin/bash
2+
3+
# Copyright (c) 2024 Oracle and/or its affiliates.
4+
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
5+
6+
# ensure you update the config file to match your deployment prior to running the deployment
7+
8+
source ./config
9+
10+
# Ask for confirmation
11+
echo ""
12+
echo "Are you sure you want to delete the sample resources?"
13+
echo "- ADB: $ADB_NAME"
14+
echo "- Bucket: $BUCKET_NAME"
15+
echo "- Compartment: $COMPARTMENT_NAME"
16+
echo ""
17+
echo "Enter (y/n)"
18+
read confirmation
19+
20+
if [[ $confirmation == [yY] || $confirmation == [yY][eE][sS] ]]; then
21+
echo "Deleting Autonomous Database"
22+
COMPARTMENT_OCID=`oci iam compartment list --region $REGION --all --query "data[?name=='$COMPARTMENT_NAME' && \"lifecycle-state\"=='ACTIVE'].id | [0]" --raw-output`
23+
ADB_OCID=`oci db autonomous-database list --region $REGION --compartment-id $COMPARTMENT_OCID --query "data[?\"db-name\"=='$ADB_NAME' && \"lifecycle-state\"=='AVAILABLE'].id | [0]" --raw-output`
24+
25+
oci db autonomous-database delete --region $REGION --force --autonomous-database-id $ADB_OCID --wait-for-state SUCCEEDED
26+
27+
if [ $? -eq 0 ]; then
28+
echo "Database '$ADB_NAME' has been successfully deleted."
29+
fi
30+
31+
echo "Deleting Object Storage bucket"
32+
oci os bucket delete --region $REGION --bucket-name $BUCKET_NAME --force --empty
33+
34+
echo "Deleting compartment $COMPARTMENT_NAME"
35+
oci iam compartment delete --compartment-id $COMPARTMENT_OCID --force --wait-for-state SUCCEEDED
36+
37+
if [ $? -eq 0 ]; then
38+
echo "Resources deleted."
39+
fi
40+
else
41+
echo "Deletion cancelled."
42+
fi

0 commit comments

Comments
 (0)