Importing shape data to a new or existing table
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.
Before you begin
Before you import shape data, your user ID must
hold the following privileges:
- Privileges to access the directories where the input files and the error files are located
- Read access to the input files
- Write access to the error files
In addition, before you import shape data to an existing
table or view, your user ID must hold one of the following authorities
or privileges:
- SYSADM or DBADM authority on the database that contains the table or view
- The INSERT and SELECT privilege on the table or view
Before you begin to create a table automatically and import shape data to the new table, your user ID must hold the authorizations that are needed for the Db2 CREATE TABLE statement.
About this task
You can import shape data in the following two ways:
- You can import the shape data and attribute data to an existing table that has a spatial column and attribute columns with the file's data. This method is the recommended way for importing shape data.
- IBM® Spatial Support for Db2 for z/OS® can create a table that has a spatial column and attribute columns and load the new table's columns with the file's data. If you choose this method, you cannot create or customize the table spaces for the resulting table.
Procedure
To import a shape file:
Run an application that calls the SYSPROC.ST_import_shape
stored procedure.