Example usage of the shape to sdo converter for Oracle9i Spatial and higher versions - on Windows NT: shp2sdo.exe states states -g geom -d -x (-180,180) -y (-90,90) -s 8307 -t 0.5 -v on Sun Sparc Solaris or Linux: shp2sdo.exe states states -g geom -d -x \(-180,180\) -y \(-90,90\) -s 8307 -t 0.5 -v In the previous command: states - the shapefile to convert (expects .dbf, .shp, and .shx files) states - the name of the table to create and use in Oracle -g geom - geom is the name of the column to load for the geometry object -d - put the data in the control file generated by the tool -x - the bounds of the first dimension in the coordinate system -y - the bounds of the second dimension in the coordinate system -s - the SRID (spatial reference system ID) -t - the tolerance -v - verbose output If the target database is Oracle8i, then use the -8 option on the command line. Type shp2sdo.exe -h for help: shp2sdo.exe -h shp2sdo - Shapefile(r) To Oracle Spatial Converter Version 2.14 09-Jan-2004 Copyright 1997,2004 Oracle Corporation For use with Oracle Spatial. USAGE: shp2sdo [-o] -g -i -n -p -d -x (xmin,xmax) -y (ymin,ymax) -s or shp2sdo -r -c -n -a -d -x (xmin,xmax) -y (ymin,ymax) shapefile - name of input shape file (Do not include suffix .shp .dbf or .shx) tablename - spatial table name if not specified: same as input file name Generic options: -o - Convert to object/relational format (default) -r - Convert to the relational format -d - store data in the control file if not specified: keep data in separate files -x - bounds for the X dimension -y - bounds for the Y dimension -v - verbose output -h or -? - print this message Options valid for the object model only: -g geometry column - Name of the column used for the SDO_GEOMETRY object if not specified: GEOM -i id_column - Name of the column used for numbering the geometries if not specified, no key column will be generated if specified without name, use ID -n start_id - Start number for IDs if not specified, start at 1 -p - Store points in the SDO_ORDINATES array if not specified, store in SDO_POINT -s - Load SRID field in geometry and metadata if not specified, SRID field is NULL -t - Load tolerance fields (x and y) in metadata if not specified, tolerance fields are 0.00000005 -8 - Write control file in 8i format if not specified, file written in 9i format -f - Write geometry data with 10 digits of precision if not specified, 6 digits of precision is used Options valid for the relational model only: -c ordcount - Number of ordinates in _SDOGOEM table if not specified: 16 ordinates -n start_gid - Start number for GIDs if not specified, start at 1 -a - attributes go in _SDOGEOM table if not specified, attributes are in separate table After running the shp2sdo converter the next step is to create the Oracle table and load the user_sdo_geom_metadata table. The file used to do this is generated by the converter. In the example above, it would be called states.sql. Log into SQL*Plus as the user who will own the layer, and type: @states.sql. After this, load the data using sql*loader. In the above example, assuming user scott with password tiger, do: sqlldr scott/tiger states After the layer is loaded, the final requirement (for polygon layers only) is to migrate the layer to the 8.1.6 and higher format (fixes the SDO_GTYPES and etypes as well as all polygon rotation and ordering requirements). After logging into SQL*Plus: If you are using Oracle8i, type: EXECUTE SDO_MIGRATE.FROM_815_TO_81X('STATES'); If you are using Oracle9i or higher, type: EXECUTE SDO_MIGRATE.TO_CURRENT('STATES','GEOM');