quarta-feira, 23 de março de 2011

Transporting Spatial Data Between Oracle Databases

Oracle provides a variety of ways to perform such exchanges.
These include the Import/Export utilities and the transportable tablespace mechanisms.

The easiest method to load data is through the use of Oracle’s platform-independent .dmp files.
These files are used by Oracle’s Import/Export utilities.
You can export the customers table from the one schema.
Exporting the customers Table into the customers.dmp File

exp oneschema/password FILE=customers.dmp TABLES=customers.

You can later import this data (that is, the .dmp file) into another schema using Oracle’s Import utility.

Importing the customers Table into another Schema using the fromuser and touser Arguments

imp SYSTEM/password FROMUSER=user_old TOUSER=new_user FILE=customers.dmp

If the customers table has a spatial index, this will be re-created on import.
You want to import just the table data without any indexes.
You can then import the data by specifying indexes=n on the command line.

The regs are insert into table MDSYS.SDO_GEOM_METADATA_TABLE on import.
This information for each spatial layer is populated in the USER_SDO_GEOM_METADATA dictionary
view. Oracle Spatial provides the USER_SDO_GEOM_METADATA updatable view to store metadata for spatial
layers.