The pdclibsync command enables you to perform the following operations on C library files:
- Register a new C library file
- Re-register a C library file
- Delete a C library file
- Display a list of C library files
- Re-register a C library file between hosts (applicable to a HiRDB parallel server configuration only)
You use this command when you use C stored procedures or C stored functions.
(a) {-I|-R|-D|-L|-S}
Specifies the processing to be performed by the pdclibsync command.
- -I
- Registers a new C library file into HiRDB. The C library file is stored in the directory specified in the pd_c_library_directory operand.
- When you specify this option, you must also specify the -u and -f options.
- If the C library file specified in the -f option has already been registered, executing the command with this option specified will result in an error.
- -R
- Re-registers a C library file into HiRDB (overwrites the C library file that has already been registered).
- When you specify this option, you must also specify the -u and -f options.
- -D
- Deletes a C library file.
- When you specify this option, you must also specify the -u and -f options.
- If the C library file specified in the -f option is not registered in HiRDB, executing the command with this option specified will result in an error.
- -L
- Displays a list of C library files that are registered in HiRDB.
- -S
- This option is applicable to a HiRDB parallel server configuration only.
- Re-registers a C library file on the server machine specified in the -x option into all server machines that constitute a HiRDB parallel server configuration. If the -x option is omitted, the command copies the C library file located on the server machine where the dictionary server is defined.
- For example, if you use this option when you add a server machine, you can register a C library file into that sever machine.
The table below shows the relationships between the options of the pdclibsync command.
Table 2-1 Relationships between the options of the pdclibsync command
Option for specifying the type of C library file manipulation | Other option |
---|
-x | -u | -f |
---|
-I | O | M | M |
-R | O | M | M |
-D | O | M | M |
-L | O | O | O |
-S | O# | O | O |
- Legend:
- M: Specification is mandatory
- O: Specification is optional
- #: If you specify the -x option, specify only one host name.
(b) -x host-name[,host-name]...
This option is applicable to a HiRDB parallel server configuration only.
-S option is specified- Specifies the host name on the server machine that contains the source C library file. No more than one host name can be specified.
- If this option is omitted, the host name of the server machine where the dictionary server is defined is assumed.
An option other than -S is specified- Specifies the hosts that are to be processed by the pdclibsync command (when you wish to limit the hosts that are to be processed by the command).
- For example, if you specify the -D option to delete a C library file and also specify the -x option, the C library file is deleted only on the specified host (or hosts).
(c) -U authorization-identifier[,authorization-identifier]...
Specifies authorization identifiers. Neither MASTER nor HiRDB can be specified as an authorization identifier.
When you specify the -I, -R, or -D option, you must specify this option.
-I option is specified- Specifies the authorization identifier of an owner of the C library file. This is the authorization identifier of the owner of a C stored procedure or C stored function.
- Only the HiRDB administrator and a user whose authorization identifier is specified here can manipulate the registered C library file.
An option other than -I is specified- Specifies the authorization identifier of a user who owns the C library file that is to be processed by this command.
(d) -f C-library-file-name
Specifies the name of the C library file that is to be manipulated.
When you specify the -I, -R, or -D option, you must specify this option.
If you specify the -S or -L option but omit this option, all registered C library files will be subject to this command's manipulation.
When the -L option or no option is specified in the pdclibsync command, the following information is displayed:
HOSTNAME(aabbcc) DATE TIME SIZE OWNER FILE
dd...d eeee/ff/gg hh:ii:jj kk...k ll...l mm...m
: : : : : : |
Explanation
- aabbcc:
- Displays the time the pdclibsync command was executed.
- dd...d:
- Displays the name of the host that executed the pdclibsync command.
- eeee/ff/gg:
- Displays the date of the C library file.#
- hh:ii:jj:
- Displays the time of the C library file#
- kk...k:
- Displays the size of the C library file (bytes).
- ll...l:
- Displays the name of the C library file's owner.
- mm...m:
- Displays the name of the C library file.
#: If the C library file was registered or re-registered by an SQL statement (INSTALL CLIB or REPLACE CLIB), the date and time the SQL statement was executed are displayed. If the C library file was registered or re-registered by the pdclibsync command, the date and time the C library file was registered or re-registered are displayed.