Connect QGIS to oracle spatial – Quantum GIS

View akshay upadhyay's profile on LinkedIn

How to connect QGIS to oracle spatial. QGIS can now connects to oracle to view spatial data and process it, great news for an open source software believers. As a newbie to QGIS user, i can just give a way, that i connected to it.

How to connect QGIS to oracle spatial :

1.) Firstly you should have downloaded QGIS with GDAL/OGR required oracle library for bridging oracle connectivity and must have installed oracle  on your machine. If oracle library is not installed, see the following post : Install QGIS for oracle connection via OSGeo4w.

2.) After starting the QGIS application,  select Add Vector Layer as shown below:

Connect QGIS to oracle spatial

Connect QGIS to oracle spatial

3.) A new window will pop up on clicking the above, now select Database Radio button as appeared in Source. Now in Database Type drop down box, select Oracle Spatial. If you have properly installed QGIS with the requirement stated above Oracle spatial would be present.

Connect QGIS to oracle spatial

Connect QGIS to oracle spatial

4.) In the same Add Vector Layer window, select new button under connection label. This will open up a simple form with following Connection information to be filled, i.e, Type, Name, Host, Database, Port, Username and Password.

Here is the way to fill up the information :

a.) Type : In type select oracle spatial from drop down  box.

  Type : Oracle Spatial

Connect QGIS to oracle spatial

Connect QGIS to oracle spatial

b.) Name : Type in any desired name you wish to give to connection

c.) Host : For finding your host name, make a query in your oracle sql plus application as written below:


This will return the 32 bit address as shown below in figure:

Connect QGIS to oracle spatial

Connect QGIS to oracle spatial

d.) Database : Write database name, i.e the name you have given while installing oracle software.

e.) Port : Enter port number i.e 1521

f.) Username : Enter username

g.) Password : Enter corresponding password of username

Connect QGIS to oracle spatial

Connect QGIS to oracle spatial

Now select Test Connection button. This will pop up another window which gives you an information of your successful connection, as shown below.

Connect QGIS to oracle spatial
Note the string url connection to connect QGIS to oracle spatial and click OK.

5.)  Again in the vector data layer window, select the connection that you made named as Demo and click on Open button.

6.) Now select the coordinate system for your database, which will be prompted after proceeding from step 5.

Connect QGIS to oracle spatial

Connect QGIS to oracle spatial

7.) If all steps are successfully done, you can see your spatial table, with your vector data spatial view as shown below:

Connect QGIS to oracle spatial

Feel free to comment below, if you are having any problem to connect Oracle Spatial to QGIS Quantum GIS (Geographic information System) or if you want to discuss for the same topic. You can also see QGIS tutorial further. And yes, don’t forget to subscribe and follow on twitter for getting updates related to GIS post.

5 thoughts on “Connect QGIS to oracle spatial – Quantum GIS

  1. Victor Cifuentes

    I can’t export from oracle spatial to shp using QGIS 2.6.1.
    Troubles with blob field. Some advice??

  2. Karl Baker

    we are currently evaluating QGis brighton. in general we are finding it to be a very capabul tool. I do have one small problem. when I connect to oracle(10G) I can use tables but it tells me that the views are invalid. has anybody got any ideas or am I missing something

  3. Francesca

    What is it possible to do if after step 4) we have got only a ORA12170 Timeout connection? With sqlplus client all is ok…

  4. Ricardo Lima

    Thanks for the post.

    I’m actually connecting qgis with oracle 11g XE.

    I can visualize a layer of points stored into oracle but i’m not able to edit it.

    Here is my question:

    It is possible to edit (move, create new, delete, change attribute table,)a vector layer stored into oracle through quantum gis (v.2.4)?


Your email address will not be published. Required fields are marked *

Subscribe For Latest GIS MAP Updates

Signup for our newsletter and get notified when we publish new articles for free!