Importing shape data to a new or existing table

Using the db2se import_shape command or the DB2GSE.ST_IMPORT_SHAPE procedure, you can import shape data to an existing table or view or you can create a table and import shape data to it in a single operation. Instead of an existing table, you can also import shape data to an existing updateable view or an existing view on which an INSTEAD OF trigger for INSERTs is defined.

Before you begin

Ensure that your user ID holds:
  • Authorities or privileges for the db2se import_shape command or the DB2GSE.ST_IMPORT_SHAPE procedure.
  • Privileges to access the directories to which input files and error files belong.
  • Read privileges on the input files and write privileges on the error files.

Ensure that you have access to upload files.

Procedure

To import shape data to a new or existing table:

  1. Choose one of the following ways to import shape data.
    Specify in the command or the procedure whether you want to use an existing table or automatically create a new one:
    • Issue the db2se import_shape command.
    • Call the DB2GSE.ST_IMPORT_SHAPE procedure.
  2. Call the DB2GSE.ST_IMPORT_SHAPE procedure.
    Specify in the procedure whether you want to use an existing table or automatically create a new one.