Oracle Autonomous Database is a great database to store spatial datasets. It is stable, rich-features and you can try and use it for free. In this article, I will show you how to connect QGIS to Oracle Autonomous Database. At the end of the tutorial, we will be able to export and import spatial data into Oracle Database from QGIS. Another good thing is that we can edit the features stored in Oracle database from QGIS.

Steps to Connect QGIS to Oracle Autonomous Database
I assume you already have the Oracle Database up and running in the Oracle Cloud. If not, you can create your own, its free. You can register it here.
Step 1. Download Wallet
Go to your Oracle Cloud account, and then go to the Autonomous Database page. Go to the Database Connection section and download Wallet from that page.

Download, extract and save your wallet in safe place in you computer. We will need this later.
Step 2. Create a New Connection in QGIS
Open QGIS and then right-click the Oracle from the left Browser panel and choose Create Connection. The new connection window will open up.
Now put the following details in the Connection window. Below is the example of mine.
- Name: MyOracle (Change it to any name you like)
- Database: g364602049cf607_oracledbtransactionprocessing_medium.adb.oraclecloud.com?wallet_location=L:\ORACLE\Wallet_OracleDbTransactionProcessing
- Host: tcps://adb.ap-singapore-1.oraclecloud.com
- Port: 1522
- Schema: WKSP_EQUATOREXPLORATION22
- User: YourUserName
- Password: YourPassword you created during the database creation.
Please modify the Database name and the wallet location with your actual information. For the host, don’t forget to put tcps:// at front. All of those information can be found inside the tnsnames.ora inside your downloaded Wallet.
Click Test Connect and make sure it can connect to your database. Hit OK to save the parameters.
Step 3. Export Spatial Data to Oracle Database
Now we can try to export our spatial feature to the database. Go to Database > DB Manager from QGIS top menu. the DB Manager will open up. Expand the Oracle connection and select your Schema. And then click Import Layer/File

Once exported, you will see the following notification that says Import was successful.

Now this layer is saved to our Oracle database. We can open it from the Oracle connection that we made.

That’s it. Thanks for reading this tutorial How to Connect QGIS to Oracle Autonomous Database. See you next.