1. Download the SHP2SDO, copy the shp file to shp2sdo the same path, open the Windows command window and execute:
SHP2SDO shp file name Table name-I id-s 4326-d
Example: SHP2SDO City tb_city-i id-s 4326-d
2. Open the Plsql Command window, execute (can also execute in sqlplus or Execute SQL statement in Plsql):
sql> @ path + table name. sql
Example: @j:\shp\tb_city.sql
3. In the Windows command window, execute:
SQLLDR User name/password @ Instance Name Table name
Example: Sqlldr younggis/[email protected] tb_city
Remote connection: Sqlldr younggis/[email PROTECTED]:1521/ORCL tb_city
4. In the Plsql Command window, do the following:
Sql> Execute sdo_migrate.to_current (' table name ', ' Geometry field name ');
For example: Execute sdo_migrate.to_current (' tb_city ', ' geom ');
5. Create a spatial index, in the Plsql command window, to do the following:
Sql> CREATE index name on table name (geometry field name) Indextype is Mdsys. Spatial_index;
Example: CREATE INDEX tb_city_index on tb_city (geom) Indextype is Mdsys. Spatial_index;
SHP uploads to Oracle Spatial