Skip to content

Commit

Permalink
WMS ID 11104, Start Polyglot Development with Autonomous Database (#339)
Browse files Browse the repository at this point in the history
* DB Action Update

DB Action Update

* Updated DB Actions for Sandbox page

Updated DB Actions for Sandbox page

* WMS ID #11485 - DB Actions screen update

WMS ID #11485 - Develop with Oracle AI and Database Services: Healthcare (Open Source Version)

* Updates related to Oracle Database 23ai

Updates related to Oracle Database 23ai

* updated .net link

updated .net link

* Updating markdowns

Updating markdowns

* updated image

updated image

* Update adb-with-wallet.md

* Dotnet screens updated

Dotnet screens updated

* blurred compartment name

blurred compartment name

* updated markdowns

updated markdowns

* Update adb-with-wallet-sandbox.md

* removed screenshots
  • Loading branch information
madhusudhanrao-ppm authored Oct 7, 2024
1 parent 96e42b6 commit d41a847
Show file tree
Hide file tree
Showing 30 changed files with 170 additions and 130 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,21 @@ In this lab, you will:
## Task 1: Choose Autonomous Database from the services menu

1. Log in to the Oracle Cloud.
2. Once you log in, the cloud services dashboard shows all the services available to you. Click the **navigation menu** in the upper left to show top-level navigation choices.
2. Once you log in, the cloud services dashboard shows all the services available to you. Click the **navigation menu** in the upper left to show top-level navigation choices. From the top left navigation select Oracle Database and Oracle Autonomous Data Warehouse.

3. Select the allocated compartment and the region. The compartment name and the region will be available under LiveLabs My Reservations.
![Open Navigation](images/open-adb-nav.png "Open Navigation")

![select compartment](images/select-ll-compartment.png " ")
3. Select the allocated compartment and the region. The compartment name and the region will be available under LiveLabs **My Reservations** and **View Login info**.

![Change compartment](images/compartment-change.png " ")

You will then be able to view the pre-provisioned Autonomous Database instance.

![selected compartment](images/selected-compartment-2.png " ")



4. Make sure your Workload Type is __Data Warehouse__ or __All__ to see your Autonomous Data Warehouse instances. Use the __List Scope__ drop-down menu to select a compartment.
5. Click on Display Name Polyglot_Dev to view detailed information about the Autonomous Database provisioned.
6. Make note of Database version (Oracle Database 23ai), Database Name, Region

![database actions](images/tenancy-details.png "database actions")

## Task 2: Create a database user and tables

Expand Down Expand Up @@ -84,9 +86,11 @@ In this lab, you will:
</copy>
```
Substitute <db\_user\> and <password\> with the username and password of your choice. Press the green button to run the script.
Substitute <db\_user\> and <password\> with the username and password of your choice. Press the second green button to run the script.
![sql worksheet](images/app-user.png =50%x* "sql worksheet")
![sql worksheet](images/create-appuser.png)
The above example creates database user **appuser** with password **Welcome1234#**, you can use different username and password.
## Task 3: Download the wallet for this database
Expand All @@ -106,9 +110,29 @@ In this lab, you will:
Extract the wallet zip file to the folder of your choice. We will be using this **wallet folder** in future labs of this workshop.
## Task 4: One-way TLS connection to Oracle Autonomous Database for wallet-less connections
## Task 4: Make note of TNS Name or DNS Name
1. Click on **Database Connection** tab, make note of TNS Names (at some places referred as DNS Name), for example DNS Name here **adbdw110890\_high** or adbdw110890\_low or adbdw110890\_medium
![Wallet files](images/dns-name.png)
![Wallet files](images/wallet-files.png)
2. Alternatively you can download the ADB wallet and after extracting the zip file, you can check the tnsnames.ora file
![TNS Names](images/tns-names.png)
3. The connection string while using connections with Database wallet would look like this example shown below
```
<copy>
adbdw1212121_high = (description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.ap-sydney-1.oraclecloud.com))(connect_data=(service_name=gc454cxxxx31_adbdw1212121_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))
</copy>
```
## Task 5: [Optional] One-way TLS connection to Oracle Autonomous Database for wallet-less connections
> **Note:** This Task is required if you plan to use a wallet-less connection with Autonomous Database using Python or . NET. Otherwise, you can still connect to Autonomous Database using the wallet downloaded in the previous Task.
> **Please Note:** This Task is required if you plan to use a wallet-less connection with Autonomous Database using Python or . NET. Otherwise, you can still connect to Autonomous Database using the wallet downloaded in the previous Task.
1. One-way TLS connection to Oracle Autonomous Database
Expand Down Expand Up @@ -153,11 +177,7 @@ In this lab, you will:
```
<copy>
(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)
(host=adb.<region_identifier>.oraclecloud.com))
(connect_data=(service_name=<service_prefix>.adb.oraclecloud.com))
(security=(ssl_server_dn_match=yes)
(ssl_server_cert_dn="CN=<cn name>, OU=Oracle BMCS US, O=Oracle Corporation, L=Redwood City, ST=California, C=US")))
adbdw110890_high = (description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.ap-sydney-1.oraclecloud.com))(connect_data=(service_name=gc454cxxxx31_adbdw110890_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))
</copy>
```
Expand All @@ -181,4 +201,4 @@ You may now **proceed to the next lab**.
- **Author** - Madhusudhan Rao, Principal Product Manager, Database
- **Contributors** - Kevin Lazarz, Senior Principal Product Manager and Christopher Jones, Senior Principal Product Manager
- **Last Updated By/Date** - Madhusudhan Rao, Aug 2022
- **Last Updated By/Date** - Madhusudhan Rao, 4th Oct 2024
6 changes: 4 additions & 2 deletions db-application-development/adb-with-wallet/adb-with-wallet.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ In this lab, you will:
- __Deployment Type__ - For this lab, choose __Serverless__ as the deployment type.
![Create ADW screen](./images/adb-install-01.png "Create ADW screen ")
- __Always Free__ - For this lab, we will leave Always Free **unchecked**.
- __Choose database version__ - Select a database version **19c** from the available versions.
- __Choose database version__ - Select a database version **19c** from the available versions. You can also select **23ai** if it is available in your tenancy and region.
- **Choose network access**: For this lab, accept the default, **Secure access from everywhere**.
![Create ADW screen](./images/adb-install-04.png "Create ADW screen ")

Expand All @@ -90,6 +90,7 @@ In this lab, you will:
- __ECPU count__ - Number of ECPU for your service. For this lab, specify __2 ECPU__.
- __Storage (TB)__ - Select your storage capacity in terabytes. For this lab, specify __1 TB__ of storage.
- __Auto Scaling__ - Auto Scaling - For this lab, keep auto-scaling **unchecked**. If autoscaling is enabled, the system will automatically use up to three times more CPU and IO resources to meet workload demand. learn more about [auto scaling](https://docs.oracle.com/en/cloud/paas/autonomous-database/adbsa/autonomous-auto-scale.html)
- You can also select **23ai** if it is available in your tenancy and region.

![Create workload type](./images/adb-install-02.png "Create ADW screen ")

Expand All @@ -101,6 +102,7 @@ In this lab, you will:

- __Password and Confirm Password__ - Specify the password for the **ADMIN** user of the service instance.
- Autonomous Database requires strong passwords.


1. The **Contact Email** field allows you to list contacts to receive operational notices and announcements as well as unplanned maintenance notifications. This is optional.

Expand Down Expand Up @@ -252,4 +254,4 @@ You may now **proceed to the next lab**.
- **Author** - Madhusudhan Rao, Principal Product Manager, Database
- **Contributors** - Kevin Lazarz, Senior Principal Product Manager and Christopher Jones, Senior Principal Product Manager
- **Updates** - Database Actions and Oracle Autonomous Database creation screens updated
- **Last Updated By/Date** - Madhusudhan Rao, May 20th 2024
- **Last Updated By/Date** - Madhusudhan Rao, 4th Oct 2024
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
64 changes: 48 additions & 16 deletions db-application-development/dotnet-development/dotnet-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ This lab assumes you have:
## Task 1: Download and Install Visual Studio Code

1. Download and install [VS Code](https://code.visualstudio.com/download).
2. Important: Please check the latest version of updated [Developing .NET Applications for Oracle Autonomous Database](https://www.oracle.com/database/technologies/appdev/dotnet/adbdotnetquickstarts.html#second-option-tab)

## Task 2: Install the .NET SDK and Visual Studio Code extensions

Expand All @@ -38,14 +39,24 @@ This lab assumes you have:

![c hash extension](images/c-hash.png =50%x* "c hash extension")

6. Install the .NET Core SDK.
6. Install the .NET Core SDK

[Download and install .NET Core SDK](https://dotnet.microsoft.com/download) 3.1 or higher. Click the Install button to install the extension.

![Dotnet SDK Installation](images/dotnet-sdk.png =50%x* "Dotnet SDK Installation")
![Dotnet SDK Installation](images/dot-net-sdk.png =30%x* "Dotnet SDK Installation")

When the installation is complete, restart Visual Studio Code.

VSCode might prompt you to install C# SDK,

![chash sdk](images/chash-sdk.png)

Click on Install

![chash kit](images/chash-kit.png)



## Task 3: Develop .NET Applications for Oracle Autonomous Database with ODP.NET Core and Visual Studio Code

In this Task we will be using an Autonomous Database wallet to establish a connection. Follow the below instructions to run the sample code in VS Code.
Expand Down Expand Up @@ -74,7 +85,19 @@ In this Task we will be using an Autonomous Database wallet to establish a conne
![c hash extension](images/dotnet-obj.png "managed access core")
3. Open the **Program.cs** and copy the sample code contents below and save the file.
3. Download and extract Oracle Autonomous Database wallet in any folder
![Wallet folder](images/wallet-folder.png)
Get the wallet folder path
![Wallet folder](images/folder-path.png)
4. Make note of TNS name (Referred as DNS name in the below code) from Oracle Autonomous Database console
![Wallet folder](images/tns-name.png)
5. Open the **Program.cs** and copy the sample code contents below and save the file.
```
<copy>
Expand Down Expand Up @@ -124,34 +147,39 @@ In this Task we will be using an Autonomous Database wallet to establish a conne
</copy>
```
Sample code for reference.
![Sample Code](images/dotnet-sample-code.png)
- Substitute <db\_user\> <password\> and <service\_name\> depending upon the configurations in Lab 1
- OracleConfiguration.TnsAdmin (i.e. directory Autonomous Database credentials were unzipped to)
- OracleConfiguration.WalletLocation (i.e. directory Autonomous Database credentials were unzipped to)
4. Run **dotnet add package Oracle.ManagedDataAccess.Core** from the command line to add ODP.NET Core to the project.
6. Run **dotnet add package Oracle.ManagedDataAccess.Core** from the command line to add ODP.NET Core to the project.
```
<copy>
dotnet add package Oracle.ManagedDataAccess.Core
</copy>
```
![managed access core](images/managed-access-core.png "managed access core")
![managed access core](images/add-core.png)
5. Execute the app by running **dotnet run** from the command line. You should see the customers sample data
7. Execute the app by running **dotnet run** from the command line. You should see the customers sample data
```
<copy>
dotnet run
</copy>
```
![customer-list](images/customer-list.png =75%x* "customer-list")
![Sample Code run](images/dotnet-results.png)
6. The entire project folder should now look as below
![customer-list](images/proj-folder.png "customer-list")
8. The entire project folder should now look as below
![customer-list](images/code-folder.png )
## Task 4: Develop .NET Applications for Oracle Autonomous Database with ODP.NET Core and Visual Studio Code (Wallet-less Connection)
## Task 4: [Optional] Develop .NET Applications for Oracle Autonomous Database with ODP.NET Core and Visual Studio Code (Wallet-less Connection)
In this task, we will establish a wallet-less connection with Autonomous Database. Please follow the below instructions to run the sample code in VS Code.
Expand All @@ -176,7 +204,7 @@ In this task, we will establish a wallet-less connection with Autonomous Databas
3. Access the Autonomous Database Information page, click on **DB Connection**, under Connection String, select **TLS** Option, and copy the connection string into a text file or clipboard, which we will be using in the next step.
![tls](images/tls.png "tls")
![tls](images/tls-copy.png "tls")
4. Open the **Program.cs** and copy the code contents below and save the file.
Expand Down Expand Up @@ -228,13 +256,17 @@ In this task, we will establish a wallet-less connection with Autonomous Databas
</copy>
```
Sample code for reference
![Walletless](images/dotnet-walletless.png)
Substitute <db\_user\> , <password\> and <copied\_connection\_string\> depending upon the string that we copied in previous step.
> **Note:** Your Data Source connection string in the above code might look like this below. Add the \ escape sequence in front of the quotes.
```
<copy>
"Data Source =(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=adb.<region_id>.oraclecloud.com))(connect_data=(service_name=<servicename_prefix>_<instance_name>_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)(ssl_server_cert_dn=\"CN=adwc.<region_id>.oraclecloud.com, OU=Oracle BMCS US, O=Oracle Corporation,L=Redwood City, ST=California, C=US\"))) ";
"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=adb.ap-sydney-1.oraclecloud.com))(connect_data=(service_name=gc454c29a9ca831_adbdw110890_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))";
</copy>
```
Expand All @@ -258,11 +290,11 @@ In this task, we will establish a wallet-less connection with Autonomous Databas
</copy>
```
![customer-list](images/customer-list.png =75%x* "customer-list")
![Sample Code run](images/dotnet-results.png)
The output will be the same as Task 3 but with only difference being this time we are establishing wallet-less connection.
## Task 5: Utilize the Oracle Developer Tools For VS Code extension to explore database schema and run SQL scripts
<!-- ## Task 5: [Optional] Utilize the Oracle Developer Tools For VS Code extension to explore database schema and run SQL scripts
This Lab task shows how to use Oracle Developer Tools for VS Code, Connect to Autonomous Database Instance, and Run SQL Queries.
Expand Down Expand Up @@ -301,7 +333,7 @@ This Lab task shows how to use Oracle Developer Tools for VS Code, Connect to Au
5. View the result of the SQL query and expand Tables under Autonomous Database connection to view the list of tables.
![view-result](images/view-results-2.png "view-result")
![view-result](images/view-results-2.png "view-result") -->
## Learn More
Expand All @@ -316,4 +348,4 @@ This Lab task shows how to use Oracle Developer Tools for VS Code, Connect to Au
- **Author** - Madhusudhan Rao, Principal Product Manager, Database
* **Contributors** - Kevin Lazarz, Senior Principal Product Manager, Database. Alex Keh, Senior Principal Product Manager and Christian Shay, Senior Principal Product Manager
* **Last Updated By/Date** - Madhusudhan Rao, June 28th 2022
* **Last Updated By/Date** - Madhusudhan Rao, Oct 6th, 2024
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion db-application-development/introduction/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@ The objective of this workshop is:
- Kuassi MENSAH, Director of Product Management.
- Alex Keh, Senior Principal Product Manager.
- Christian Shay, Senior Principal Product Manager.
* **Last Updated By/Date** - Madhusudhan Rao, June 28th 2022
- Sharad Chandran R, Principal Product Manager
* **Last Updated By/Date** - Madhusudhan Rao, Oct 7th 2024
Loading

0 comments on commit d41a847

Please sign in to comment.