Connect QGIS to oracle spatial – Quantum GIS



Connect QGIS to oracle spatial

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

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

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

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:

SELECT UTL_INADDR.GET_HOST_ADDRESS FROM DUAL;

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

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

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


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

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

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.

Author: Akshay Upadhyay

Owner and Director of a Private Limited company which serves individual to large scale industries in the field of Maps and GIS. He is a Gold Medalist in M.Tech(Spatial Information Technology) and owns some famous Technology blogs and website... Know more

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

  1. 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

  2. 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)?

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.