This section describes the plug-in environment setup procedure using commands. This procedure assumes that the HiRDB environment setup has been completed (HiRDB is already running).
To set up the plug-in environment:
#1: A data dictionary LOB RDAREA is not necessary if stored functions, stored procedures, or plug-ins are already being used. A user RDAREA (user LOB RDAREA) is required if a table is created for a newly added plug-in.
#2: May not be needed, depending on the plug-in.
Before a plug-in can be installed into the HiRDB system, the sizes of the following resources must be estimated:
For details about how to estimate the resources required for each plug-in, see the applicable plug-in documentation.
Before setting up plug-ins, use the pdstop command to terminate the active HiRDB.
Install your plug-ins. For details about the installation procedure, see the applicable plug-in documentation.
The HiRDB administrator uses the pdstart command to start HiRDB.
Before plug-ins are registered into HiRDB, the RDAREA administrator uses the create rdarea statement of the database structure modification utility (pdmod) to add RDAREAs. The following RDAREAs need to be added:
For details about how to add RDAREAs, see 4.7 Creating user RDAREAs, 4.8 Creating user LOB RDAREAs, or 4.9 Creating data dictionary LOB RDAREAs.
If a database environment has already been constructed, there is no need to add RDAREAs after installing plug-ins.
Use the pdplgrgst command to register your plug-ins in HiRDB. You can enter the pdplgrgst command from any server machine.
The following figure illustrates the plug-in registration procedure.
Figure 5-1 Plug-in registration procedure
Following shows the input format of the pdplgrgst command:
The owner of a plug-in (owner of the abstract data type, index type, and function provided by a plug-in) is treated as MASTER. This allows the authorization identifier to be omitted when specifying the plug-in-provided function call processing using SQL statements.
You can specify the user executing the pdplgrget command as the plug-in owner instead of MASTER. To do this, specify the -u option in the pdplgrget command, in which case the pdplgrget command executor (the authorization identifier specified in the PDUSER operand in the client environment definitions) becomes the owner of the plug-in.
Some plug-ins require the registry facility. In such cases, use the registry facility initialization utility's (pdreginit) create rdarea statement to create the following RDAREAs. This operation is not necessary when the registry facility is already being used with plug-ins.
Execute the registry facility initialization utility (pdreginit) only once before all plug-ins are registered.
The registry RDAREA and registry LOB RDAREA store the registry information. Which of the two RDAREAs is used is determined automatically on the basis of the length of the data to be registered.
The following figure illustrates the procedure for creating the registry RDAREA and the registry LOB RDAREA.
Figure 5-2 Procedure for creating a registry RDAREA and registry LOB RDAREA
To enable a plug-in, HiRDB must be terminated normally by entering the pdstop command. No tables or indexes that use the registered plug-in can be defined until HiRDB has been restarted.
After HiRDB has been terminated, a backup copy should be made of all the updated RDAREAs.
After HiRDB has been terminated normally, add the pdplugin operand in the system common definitions. Specify the name of a plug-in to be used in the pdplugin operand.
For a HiRDB/Parallel Server, you need to add the pdplugin operand in the system common definitions on all server machines; otherwise, you will not be able to start HiRDB.
Use the pdstart command to start HiRDB.
Once the registry facility has been initialized, registry information required by the plug-in must be registered. The plug-in and the registry facility can then be used. For details about how to register registry information, see the applicable plug-in documentation.