MODULE DATA
Description
The MODULE DATA statement has the following two functions:
ALTER SYSTEM LOAD MODULE DATA ...: This statement is used to import a specified feature.ALTER SYSTEM CHECK MODULE DATA ...: This statement is used to check whether a specified feature has been imported.
Limitations and Considerations
- Only the
REDISmodule feature can be imported in the current version. - Only the
CHECK MODULE DATAfunction can be used to check whether theREDISmodule feature has been imported in the current version.
Privileges
The user who executes this statement must have the ALTER SYSTEM privilege. For more information about the privileges of seekdb, see Privilege classification of seekdb.
Syntax
ALTER SYSTEM {LOAD | CHECK} MODULE DATA
MODULE = module_value
[INFILE = file_path];
module_value:
REDIS
| GIS
| TIMEZONE
Parameters
| Parameter | Description |
|---|---|
| LOAD | CHECK | Specifies whether to import or check the feature. Valid values:
|
| module_value | Specifies the feature to be operated on. For more information, see module_value. |
| file_path | Specifies the path of the SQL file to be imported. Because TIMEZONE and GIS may have multiple versions, you must specify the SQL file of the corresponding version. Currently, TIMEZONE and GIS have only one version, so the default INFILE parameter is supported. The INFILE parameter is not supported for the REDIS module feature in the current version. If you specify the INFILE parameter for the REDIS module feature, an error will be returned. |
module_value
REDIS: specifies theREDISmodule feature.GIS: specifies theGISmodule feature.TIMEZONE: specifies theTIMEZONEmodule feature.
Examples
Example of LOAD MODULE DATA
-
Import the
REDISmodule feature using theINFILEpath. However, theINFILEpath is not supported for theREDISmodule feature in the current version. An error will be returned.ALTER SYSTEM LOAD MODULE DATA
MODULE = REDIS
INFILE = '/home/admin/test.sql';The return result is as follows:
ERROR 4025 (HY000): loading redis module does not need to specify infile -
Import the
REDISmodule feature.ALTER SYSTEM LOAD MODULE DATA
MODULE = REDISThe return result is as follows:
Query OK, 0 rows affected -
Import the
GISmodule feature. TheINFILEparameter is optional. The default value isetc/, and the corresponding file is located in theetcdirectory under the deployment directory.ALTER SYSTEM LOAD MODULE DATA
MODULE = GIS
INFILE = 'etc/';The return result is as follows:
Query OK, 0 rows affected -
Import the
TIMEZONEmodule feature. TheINFILEparameter is optional. The default value isetc/, and the corresponding file is located in theetcdirectory under the deployment directory.ALTER SYSTEM LOAD MODULE DATA
MODULE = TIMEZONE
INFILE = 'etc/';The return result is as follows:
Query OK, 0 rows affected
Example of CHECK MODULE DATA
Only the CHECK MODULE DATA function can be used to check whether the REDIS module feature has been imported in the current version.
-
If no feature has been imported, an error will be returned when you execute the
CHECK MODULE DATAstatement. Check whether theREDISmodule feature has been imported.ALTER SYSTEM CHECK MODULE DATA
MODULE = REDISThe return result is as follows:
ERROR 4025 (HY000): redis info is not complete,please retry loading -
First import the feature and then check whether the feature has been imported.
-
Import the
REDISmodule feature.ALTER SYSTEM LOAD MODULE DATA
MODULE = REDISThe return result is as follows:
Query OK, 0 rows affected -
Check whether the
REDISmodule feature has been imported.ALTER SYSTEM CHECK MODULE DATA
MODULE = REDISThe return result is as follows:
Query OK, 0 rows affected
-