In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
In DM7, DBA can execute SF_GET_PARA_VALUE, SF_GET_PARA_DOUBLE_VALUE and SF_GET_PARA_STRING_VALUE functions during the operation of DM database to obtain the current configuration parameters of the system, and you can use SP_SET_PARA_VALUE,SP_SET_PARA_DOUBLE_VALUE and SP_SET_PARA_STRING_VALUE procedures to modify static / dynamic configuration parameters.
SP_SET_PARA_VALUE (scope int, paraname varchar, value int64) this process is used to modify integer static and dynamic configuration parameters. A SCOPE parameter of 1 means that the parameter values are modified in both memory and INI files, and only dynamic configuration parameters can be modified at this time. A parameter of 2 means that only the configuration parameter is modified in the INI file
This can be used to modify static and dynamic configuration parameters. When SCOPE equals 1, the server returns an error message when you try to modify the static configuration parameters. Only users with the DBA role have permission to call SP_SET _ PARA_VALUE.
SP_SET_PARA_DOUBLE_VALUE (scope int, paraname varchar (8187), alue double) this process is used to modify floating-point static and dynamic configuration parameters. A SCOPE parameter of 1 means that the parameter values are modified in both memory and INI files, and only dynamic configuration parameters can be modified at this time. A parameter of 2 means that only configuration parameters are modified in the INI file, which can be used to modify static and dynamic configuration parameters. When SCOPE equals 1, the server returns an error message when you try to modify the static configuration parameters. Only users with the DBA role have permission to call SP_SET_PARA_DOUBLE_VALUE.
SF_SET_SYSTEM_PARA_VALUE (paraname varchar, value int64\ double\ varchar, deferred int, scope int64) this procedure is used to modify static or dynamic configuration parameters of system integers, double, and varchar. Parameter DEFERRED. A value of 0 means that the parameter modified by the current session takes effect immediately. A value of 1 means that the current session does not take effect, and it will take effect later. The default is 0. A SCOPE parameter of 1 means that the parameter values are modified in both memory and INI files, and only dynamic configuration parameters can be modified at this time. A parameter of 2 means that only configuration parameters are modified in the INI file, which can be used to modify static and dynamic configuration parameters. Only users with the DBA role have permission to call SF_SET_SYSTEM_PARA_VALUE.
The dynamic INI parameters of DM can be divided into two levels: system level and session level. When session-level parameters are modified while the server is running, previously created sessions are not affected, only newly created sessions use the new parameter values.
1. SF_SET_SESSION_PARA_VALUE (paraname varchar (8187), value bigint) sets the value of a session-level INI parameter, which is valid only for this session.
2. SP_RESET_SESSION_PARA_VALUE (paraname varchar (8187)) resets the value of a session-level INI parameter so that the value of this INI parameter is consistent with that of the system INI parameter.
3. SF_GET_SESSION_PARA_VALUE (paraname varchar (8187)) gets the value of a session-level INI parameter for the current session.
Let's modify the dynamic parameter enable_auidt,scope=1 and modify both the memory and the dm.ini file
SQL > call sp_set_para_value, DMSQL executed successfullyused time: 87.566 (ms). Execute id is 199.SQL > select sf_get_para_value (1 1used time: 10.131); LINEID SF_GET_PARA_VALUE (1 1used time: 10.131). Execute id is 200.
By querying the v$dm_ini view, you can see that the current dm.ini file has also been modified because file_value=1
SQL > select * from v$dm_ini where para_name='ENABLE_AUDIT' LINEID PARA_NAME PARA_VALUE MIN_VALUE MAX_VALUE MPP_CHK SESS_VALUE FILE_VALUE DESCRIPTION PARA_TYPE-- - -1 ENABLE_AUDIT 1 0 2 N 1 1 Flag For Allowing Audit 0: no audit 1: normal audit 2:normal audit and realtime audit SYSused time: 201.366 (ms). Execute id is 206.
Query the v$parameter view and you can see that the current memory has also been modified because of sys_value=1
SQL > select * from v$parameter where name='ENABLE_AUDIT' LINEID ID NAME TYPE VALUE SYS_VALUE FILE_VALUE DESCRIPTION- -- 1385 ENABLE_AUDIT SYS 1 1 1 Flag For Allowing Audit 0: no audit 1: normal audit 2:normal audit and realtime auditused time: 7.130 (ms). Execute id is 207.
Next, modify the dynamic parameter enable_auidt,scope=2 and modify only the dm.ini file
SQL > call sp_set_para_value (2) DMSQL executed successfullyused time: 29.707 (ms). Execute id is 208.SQL > select sf_get_para_value (1); LINEID SF_GET_PARA_VALUE (1)-1 0
By querying the v$dm_ini view, you can see that the current dm.ini file has also been modified because file_value=0,sess_value=1
SQL > select * from v$dm_ini where para_name='ENABLE_AUDIT' LINEID PARA_NAME PARA_VALUE MIN_VALUE MAX_VALUE MPP_CHK SESS_VALUE FILE_VALUE DESCRIPTION PARA_TYPE-- - -1 ENABLE_AUDIT 1 0 2 N 1 0 Flag For Allowing Audit 0: no audit 1: normal audit 2:normal audit and realtime audit SYSused time: 5.207 (ms). Execute id is 209.
Query the v$parameter view and you can see that the current memory has also been modified because of sys_value=1
SQL > select * from v$parameter where name='ENABLE_AUDIT' LINEID ID NAME TYPE VALUE SYS_VALUE FILE_VALUE DESCRIPTION- -- 1 385 ENABLE_AUDIT SYS 1 10 Flag For Allowing Audit 0: no audit 1: normal audit 2:normal audit and realtime auditSQL > call sp_set_para_value Call sp_set_para_value [- 3503]: Invalid procedure parameter.used time: 115.071 (ms). Execute id is 0.
An error was reported here because the value of the SQl_TRACE_MASK parameter is of type string, which can be executed using the following function
SQL > call sp_set_para_string_value, DMSQL executed successfullyused time: 377.128 (ms). Execute id is 194.
After the modification is successful, you can execute the following function to verify the success.
SQL > select sf_get_para_string_value (1) LINEID SF_GET_PARA_STRING_VALUE (1)-1 2used time: 246.480 (ms). Execute id is 198.
If you want to be simple, you can directly use sf_set_system_para_value to modify the parameters, regardless of the type of parameters.
SQL > call sf_set_system_para_value ('SQL_TRACE_MASK','1',0,1); DMSQL executed successfullyused time: 23.178 (ms). Execute id is 212.SQL > select sf_get_para_string_value (1) LINEID SF_GET_PARA_STRING_VALUE (1)-1 1used time: 5.660 (ms). Execute id is 214.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.