Example of a LAYER¶ LAYER NAME kwadranten TYPE POLYGON CONNECTIONTYPE oraclespatial CONNECTION "user/pwd" DATA "GEOMETRIE FROM KWADRANTEN USING SRID 90112" DUMP TRUE CLASS STYLE OUTLINECOLOR 0 0 0 COLOR 0 128 128 END END END You can specify the SID for your database, the SID alias needs to be supplied in the tnsnames.ora file of the Oracle client, e.g. Example for tnsnames.ora: MYDB = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = server_ip)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = DB1) ) ) So after this you can define you layer connection as: CONNECTION "user/pwd@MYDB" =================================================== oracle ================================================== Oracle 10g & 11g ################ Steps to Enable Oracle 10g or 11g Support in MS4W ************************************************* 1. Make sure you have Oracle 10g or 11g client software installed on your machine (the same machine that you are running MS4W on). 2. Replace the existing libmap.dll in /ms4w/Apache/cgi-bin/ with the one in the /ms4w/Apache/cgi-bin/ignored-libmap/oracle11g/ folder. 3. Move the ogr_OCI.dll plugin file up from /ms4w/gdalplugins/ignored/oracle-11g/ into /ms4w/gdalplugins/ If this is successful, executing the following at the commandline (after setting /ms4w/setenv.bat) "ogrinfo --formats" should list the OCI driver. 4. Restart Apache to be safe. 5. For mapfile configuration see http://www.mapserver.org/input/vector/oracle.html ================================================= MAPINFO ================================================ Map File Example¶ LAYER NAME Elevation_Poly_5 TYPE POLYGON STATUS DEFAULT CONNECTIONTYPE OGR CONNECTION "./hypso/elev5_poly.TAB" STYLEITEM "AUTO" CLASS NAME "Elevation Poly 5" END END # Layer ============================================================ APACHE ============================================================= Setting the Apache Environment¶ Sometimes it is confusing WHERE to set WHAT in the splitted apache2.conf-files. In the folder “/etc/apache2/sites_available” you find your sites-file. If you did not do sth. Special e.g. installing virtual hosts, the file is named “default”. In this file, the apache cgi-directory is defined. Our file looks like this: ScriptAlias /cgi-bin/ /var/www/cgi-bin/ AllowOverride None Options ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all

In this file, the local apache environment variables must be set. We did it within a location-block like this: SetEnv ORACLE_HOME "/path/to/oracle/home"

Where /cgi-bin/ in the opening location block refers to the script alias /cgi-bin/ and the TNS_ADMIN directory point to the location of the tnsnames.ora file. Then restart apache: $ /etc/init.d/apache2 force-reload =================================================== MAPFILE ========================================= Create mapfile¶ Before we start creating our mapfile ensure that you have a your access data (User/Password) and that you know the Oracle SRID, which could be different from the proj-EPSG! The data access parameters: * CONNECTIONTYPE oraclespatial * CONNECTION 'user/password@MY_ORACLE‘ * DATA ‘GEOM FROM MY_LAYER USING SRID 82032’ [...] Where: * GEOM is the name of the geometry column * MY_LAYER the name of the table * 82032 is equivalent to the EPSG code 31468 (German projection system)