New Release: Visual Studio Integration with Oracle Autonomous Database
The new release of Oracle Developer Tools for Visual Studio (ODT) 19.3 is available for free download. In this release, we’ve added support for Visual Studio 2019 and introduced some cool new features to integrate Visual Studio with Oracle Autonomous Database — allowing VS developers to connect, browse and manage Autonomous Database (ADB) resources easily and intuitively.
Developers can quickly create Always Free ADB instances from Visual Studio, automatically download credentials files and be connected to the database to work on code within minutes.
A little bit further down in this blog post I’ll guide you step by step to get you started. But first: ODT has been around for many years, so let’s review what it is all about. It’s a free extension for Microsoft Visual Studio 2019 and Visual Studio 2017 integrated within Server Explorer that lets you easily connect to Oracle Database and Oracle Autonomous Database, and browse and edit Oracle schema objects using integrated visual designers. Developers can easily modify table data, execute Oracle SQL statements, edit and debug PL/SQL code, and generate SQL scripts. There’s a lot of other features but the main idea is to bring a whole lot of Oracle functionality into the familiar development environment of Visual Studio.
In the 19.3 release, ODT now adds Oracle Cloud Explorer which you can see in the screenshot above.
From Oracle Cloud Explorer here are some of things developers can do (We will step through some of these shortly):
- Sign up for Oracle Cloud
- Quickly connect to a cloud account using a simple auto-generated config file and key file
- Create new or clone existing Always Free ADB, Autonomous Database Dedicated and Autonomous Data Warehouse instances
- Automatically download credentials files (including wallets) and quickly connect, browse, and operate on Autonomous Database schemas
- Easily change compartments and regions without reconnecting
- Start, stop or terminate ADB instances
- Scale up/down ADB resources
- Restore from backup
- Update instance credentials, update license type used
- Rotate wallets
- Convert Always Free ADB instances into paid instances
- One click connection to a service web console
Getting Started: Step by Step
Before getting going with this new release, make sure you don’t already have ODT installed on your machine. Check Help->About in the Visual Studio menus to see if Oracle Developer Tools is listed. If it is, uninstall it using either Add/Remove programs, or with the Oracle Universal Installer depending on how you installed it in the first place.
Also, make sure Visual Studio 2019 is version 16.4.2 or later (again, you can check Help->About and update if needed).
- Download the zipped up ODT VSIX file if you are using Visual Studio 2019, or the MSI exe if you are using Visual Studio 2017. You can also search for “Oracle Developer Tools for Visual Studio” in the Visual Studio Marketplace using the Visual Studio Extensions Manager (blogs being long lived, it behooves me to warn that at some point in the future it may ONLY be available in the Marketplace). Make sure Visual Studio is closed, and then double click the file and follow the prompts to install.
- Once installed, start up Visual Studio and open Server Explorer (View->Server Explorer). You should see the Oracle Cloud Infrastructure node.
3. If you do not already have an Oracle Cloud account, right click on the Oracle Cloud Infrastructure node and click Sign up for Oracle Cloud. This will open a web browser which will take you through the process of signing up .
4. Now you are ready to connect to your Oracle Cloud account. Right click on Oracle Cloud Explorer in Visual Studio and choose Add New Account Entry. This will open the aptly named Add New OCI Account Entry dialog:
5. The best way to connect to your account is to use a config file and associated key file. Both of these can be easily and automatically generated using the OCI CLI Tool. The dialog contains a handy link to web page with step by step instructions showing how to install and run this tool. Go ahead and follow those steps. When you are done, you will have a config file that points to a key file. Returning to the dialog, browse to the newly created configuration file to load it and press OK.
6. The next dialog will ask you to select your default compartment. (You can change compartments and regions at any time without reconnecting)
7. Now it is time to create an Always Free ADB instance. Click on the Autonomous Transaction Processing Databases node and choose Create New from the menu.
Here is the dialog that will open:
8. Provide the display name and database name. Check the Always Free checkbox and provide a password. When you are done, press Create New, the instance will start spinning up. When the icon in Server Explorer stops showing a yellow color, it means it is ready to use.
9. To connect to the database and start working on the schema, you will need the credentials files. These credentials files include a wallet file plus database connect descriptor files. With ODT, downloading these files and setting them up is automatic. You just right click on the Always Free instance you created and choose Create Data Connection from the menu.
10. This will open a dialog showing the location the credentials files will be placed in plus a checkbox allowing you the option to skip downloading them if you’ve done this before and already have the files. Press Continue.
11. A connection dialog will open, preconfigured to point to the credentials files. All you need to do is provide the database user name and password and you are in!
12. Once connected you can browse existing schema objects if you have them already, or you can create new ones using the Query Window or SQL*Plus Script execution dialog.
I’ll be blogging here about Autonomous Database, .NET, Visual Studio, Visual Studio Code, and related topics so please keep an eye on this space. In the meantime, please visit the Oracle .NET Developer Center, ask questions on the Oracle Developer Tools forum, and follow us on Twitter: @oracledotnet