Migrating raster columns using ArcSDE commands

To change the storage type of raster data, use the sdetable command with the migrate operation. This converts the data in the block_data column of the raster block table (sde_blk_<id>) and the object column of the raster auxiliary table (sde_aux_<id>) from LONG RAW data storage to BLOB or BLOB to ST_RASTER in Oracle, or to ST_RASTER in PostgreSQL and SQL Server. The syntax is as follows:

sdetable –o migrate –l <table,raster_column> –k <config_keyword> 
[–i {<service> | <direct_connection>] [–s <server>] [–D <database>] 
–u <user> [–p <password>] [–N]

Use the options as follows:

Option

Description

–o

This option indicates the operation being performed; in this case, migrate.

–l

Use this option to specify the name of the table containing the raster column to be migrated.

–k

Use this option to specify the DBTUNE configuration keyword for the raster storage type to which you are migrating the raster catalog. The specified keyword must contain a RASTER_STORAGE parameter set to BLOB (Oracle only) or ST_RASTER.

–i

Provide either your direct connection syntax or the port number or name of the ArcSDE service you use to connect to the geodatabase.

See Direct connections from ArcSDE commands to a geodatabase in Oracle

–s

Specify the name of the server on which the database resides.

–D

Specify the name of the database or data source.

This option is not used with Oracle databases.

–u

Specify the user name of the feature class owner to log into the database.

–p

Specify the password of the user.

–N

Specify this option if you want to suppress the prompt to confirm the operation.

You will receive an error message when you execute the sdetable command with the migrate operation if any of the following are true:

You will receive an error message when you execute the sdelayer command with the migrate operation if any of the following are true:

NoteNote:

When migrating data storage types in an Oracle database using the migrate operation, a new segment is created in the database to which the data is copied. Once the migration is complete, the metadata is pointed again to the new segment and the old one is deleted. That means that at one point during the migration, there are two copies of the data. Therefore, the database must have enough space to store two copies.

Steps:
  1. Create a backup of the data to be migrated.

    Creating a backup copy of the data you migrate ensures that, if migration fails for any reason, you still have your original data.

  2. Open a DOS command prompt (Windows) or shell (UNIX or Linux).
  3. Execute the sdetable command with the migrate operation. For example:
    sdetable –o migrate –l watershed,raster –k ST_RASTER 
    –i sde:sqlserver:mainserver\ssdb –s mainserver –D mydb –u bjar 
    –p mine.all.mine

    Be sure to specify a configuration keyword that contains the RASTER_STORAGE value to which you want to convert your data.

Related Topics


8/19/2013