MapViewer - Installation of the demo files

Card Puncher Data Processing

MapViewer - Installation of the demo files


This article talk about the installation of the spatial demo set that you need to run the Oracle Maps Tutorial (online demos) listed at the bottom of the MapViewer home page.

Mapviewer Oracle Map Tutorial

After a standard installation of OBIEE (10g or 11g), you can find them on this URL :

Installation Process

Download the zip file

Download the file. This is a downloadable zip file containing a complete MapViewer demo including sample data and instructions. (Zip 3.9MB)

If you don't have it in the bundled archive, you can find it on the page Oracle Fusion Middleware MapViewer Training. An the end of this page, you have this link MapViewer Demo.

Unzip it in a temp directory (Ex. : C:\temp)

The readme.txt from the zip contain also all the instructions to load properly the data.

Create the user

You can add the data set in any account, you want. For the rest of the article, we will use a special mvdemo account.

In SqlPlus - SqlPlus Command :

SQL> connect / as sysdba;
SQL> grant connect, resource, create view to mvdemo identified by mvdemo;
Grant succeeded.

Import the data set

In the command Prompt (assume you have unzipped the file in the directory C:\TEMP\mvdemo) :

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Nicolas>cd C:\TEMP\mvdemo

C:\TEMP\mvdemo>set NLS_LANG=American_America.WE8ISO8859P1

C:\TEMP\mvdemo>imp mvdemo/mvdemo@ORCL file=mvdemo.dmp full=y ignore=y

Import: Release - Production on Fri Nov 21 15:18:34 2008

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

Export file created by EXPORT:V09.00.01 via conventional path
import done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
. importing MVDEMO's objects into MVDEMO
. importing MVDEMO's objects into MVDEMO
. . importing table                       "CITIES"        195 rows imported
. . importing table                     "COUNTIES"       3230 rows imported
. . importing table                    "EMPLOYEES"         14 rows imported
. . importing table                  "INTERSTATES"        239 rows imported
. . importing table                         "MAPS"          4 rows imported
. . importing table                       "STATES"         56 rows imported
. . importing table                       "STYLES"        285 rows imported
. . importing table                  "TERRITORIES"          9 rows imported
. . importing table                "TERR_COUNTIES"       3230 rows imported
. . importing table                       "THEMES"         10 rows imported
Import terminated successfully without warnings.


Cache Map Metadata

If your database has never run the mcsdefinition.sql script before, you will need to run it as DBA role. To verify if this script has been run, you can log into the database (as any user), and execute the following query:

SQL>connect SYS/SysPassword@ORCL as sysdba;
SQL>select name from user_sdo_cached_maps;
select name FROM user_sdo_cached_maps
ERROR at line 1:
ORA-00942: table or view does not exist

If table or view does not exist is returned and not the statement “no rows selected”


It will create the view USER_SDO_CACHED_MAPS for all users. This view is used to hold the map tile layer definitions and is required by MapViewer.

Spatial Metadata

Run the mvdemo.sql with the account where you have load the data dump file to fill all the data properly.

After import of the dump file, perform this actions in SqlPlus - SqlPlus Command :

SQL> connect mvdemo/mvdemo@orcl
SQL> @mvdemo.sql

Why ?

To make aware spatial that you have spatial data, you must insert geometry metadata by starting the mvdemo.sql script. An spatial index that need Mapviewer to read the data is also created.

Example for the table states :

update states a set a.geom.sdo_srid=8307;

insert into USER_SDO_GEOM_METADATA values (
        MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X', -180, 180, .00000005), 
                            MDSYS.SDO_DIM_ELEMENT('Y', -90, 90, .00000005)),

create index STATES_SDX on STATES(GEOM) 
indextype is mdsys.spatial_index;

In the mvdemo.sql, you can see that the style, the theme and the map are also loaded.

insert into user_sdo_styles select * from styles;
insert into user_sdo_themes select * from themes;
insert into user_sdo_maps select * from maps;

Map DataSource

In order for the MapViewer to find the data you just imported, you need to define a map datasource to the MapViewer. This can be done through the MapViewer home page (typically http://host:port/mapviewer), in the “Add a data source” form.

  • Log in as Admin with the Admin button (top right of the window)
  • Fill in the credential

If you need to login on OC4J, enter oc4jadmin for the login and its password

  • Go to Management Tab , DataSource and fill the form :

Mapviewer Data Source


You are done with the installation. You will be able to see the demo :

If all work perfectly, you will see a map.

Enjoy !

Discover More
Card Puncher Data Processing

Mapviewer is a rendering software of spatial data stored in a Oracle database (Oracle Spatial). With MapViewer, you can start viewing your Oracle Spatial managed data. MapViewer is a component of Oracle...
Mapbuilder Preview Nl Gemeente
MapBuilder - Import of a Shapefile Map

When working with Mapviewer, you may face with the need to have map data to begin to work. The demo files come with some data but are really without utility if you work in an other country than the US....
Oas Version
MapViewer - Installation on OC4J

Installation instruction of MapViewer. OAS/OC4J version You can find this information in the “” link when you are logged in Oracle Application...
Mapbuilder Sh Cust Density Advanced Style
Mapviewer - SH Customer Density Semi-Static Map

You must have the sh schema and the spatial demo files installed. As sys : As mvdemo : With Oracle Maps, labels are manifest as tool-tips on mouse-over the feature on the map. ...

Share this page:
Follow us:
Task Runner