I am new to oracle spatial. I want to load shapefile into oracle spatial. I am using oracle 11g. I have already look at the following examples and answers


How do use the Shapefile Converter in Oracle 12c to load a Shapefile?

Where I found the following example to load a shapefile

java -classpath %ORACLE_HOME%\jdbc\lib\ojdbc5.jar;%ORACLE_HOME%\md\jlib\sdoutl.jar;%OR ACLE_HOME%\md\jlib\sdoapi.jar oracle.spatial.util.SampleShapefileToJGeomFeature - h gis01 -p 1521 -s orcl -u scott -d tiger -t states -f states -r 8307 -g geom

I have the files on the following directory

ojdbc14.jar - D:\app\user\product\11.2.0\dbhome_1\jdbc\lib

ojdbc5.jar - D:\app\user\product\11.2.0\dbhome_1\jdbc\lib

sdoutl.jar -D:\app\user\product\11.2.0\dbhome_1\jdbc\lib

sdoapi.jar - D:\app\user\product\11.2.0\dbhome_1\jdbc\lib

Java - C:\Program Files\Java\jdk1.7.0_21\bin

shapefile (bd.shp) - E:\data\bd.shp

So I used the following codes

java -classpath D:\app\user\product\11.2.0\dbhome_1\jdbc\lib\ojdbc5.jar;D:\app\user\product\11.2.0\dbhome_1\jdbc\lib\sdoutl.jar;D:\app\user\product\11.2.0\dbhome_1\jdbc\lib\sdoapi.jar oracle.spatial.util.SampleShapefileToJGeomFeature -h localhost -p 1521 -s hr -u hr -d password -t bd -f E:\data\bd -r 8307 -g geom

Would anyone help me to run this code with those directory?

3 Answers 3


The simlest tool for loading shapefile into oracle spatial database is provided by Oracle itself as Mapbuilder. You can download it from Oracle site. You need to register (free) once with Oracle.

You need to connect to your database where you want to save the shapefile and choose the Import Shapefile as option as shown below:

enter image description here

Then you need to browse and select the shapefile.

Select whether you want to create a new table or update an existing one (You need to have the same attribute columns for this).

You can also choose the name of geometry column.

You will have the option to import single shapefile or multiple.

The image below describes the options available while importing the shapefile:

enter image description here

Set the SRID and indexing as below:

enter image description here

You can also choose any (optional) predefined theme (styling for your shapefile) as below:

enter image description here

Then click Next and Finish to complete the loading.

enter image description here

That's it.

  • I'm following that link, it appears to go here (oracle.com/technetwork/middleware/mapviewer/downloads/…) and what I just downloaded doesn't seem to be at all what your screenshots contain, I've got a mapbuilder that runs on localhost:8080. Is there something different to download?
    – chrismarx
    Dec 7, 2016 at 21:42
  • You need to download mapbuilder which is a jar file (not mapviewer which runs on web server). Dec 8, 2016 at 2:41
  • Ah, now I see it, sorry, I didn't realize that unlike other areas of the oracle site, there are multiple program downloads in each section. Thanks!
    – chrismarx
    Dec 8, 2016 at 15:59
  • You can download mapviewer also. It's a good application to display rasters, vectors and run spatial queries on web page. Tutorial is also given in the same application package Dec 9, 2016 at 4:33

Rather than use the Oracle tools (which if they're anything like anything Oracle I've ever seen are a completely mess), you could try using OGR2OGR - There is a GUI app for it too - http://www.ogr2gui.ca/en/screenshot.php

Hopefully that'll do what you want and be simpler as well.

  • Thank you but Its not connecting with Oracle Database Dec 30, 2013 at 6:55

I used the "Spatial Data Manager", another graphical tool to load shapefiles and file geodatabases in Oracle and other spatial db.

  • Thanks for the answer. Can you tell me what will be the instance for oracle DB connection? Jan 8, 2014 at 10:21
  • instance is the alias in your tnsnanes.ora
    – Lou Lou
    Jan 9, 2014 at 13:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.