Managing the SYSTOOLS.OPT_PROFILE table

Optimization profiles must be associated with a unique schema-qualified name and stored in the SYSTOOLS.OPT_PROFILE table. You can use the LOAD, IMPORT, and EXPORT commands to manage the files in that table.

For example, the IMPORT command can be used from any Db2® client to insert or update data in the SYSTOOLS.OPT_PROFILE table. The EXPORT command can be used to copy a profile from the SYSTOOLS.OPT_PROFILE table into a file.

The following example shows how to insert three new profiles into the SYSTOOLS.OPT_PROFILE table. Assume that the files are in the current directory.
  1. Create an input file (for example, profiledata) with the schema, name, and file name for each profile on a separate line:
       "ROBERT","PROF1","ROBERT.PROF1.xml"
       "ROBERT","PROF2","ROBERT.PROF2.xml"
       "DAVID", "PROF1","DAVID.PROF1.xml"
  2. Execute the IMPORT command:
       import from profiledata of del
         modified by lobsinfile
         insert into systools.opt_profile
To update existing rows, use the INSERT_UPDATE option on the IMPORT command:
   import from profiledata of del
     modified by lobsinfile 
     insert_update into systools.opt_profile
To copy the ROBERT.PROF1 profile into ROBERT.PROF1.xml, assuming that the profile is less than 32 700 bytes long, use the EXPORT command:
   export to robert.prof1.xml of del
     select profile from systools.opt_profile
       where schema='ROBERT' and name='PROF1'

For more information, including how to export more than 32 700 bytes of data, see EXPORT command.