Tuesday, 21 March 2023

How to change configuration file of SAP HANA System or change parameter in HANA database in *.INF file. ?

 SAP HANA System parameter change in *.INF file


In the SAP HANA system, we have multiple .ini files for each HANA database service. these files contain properties for configuring the system as a whole and individual tenant database, as well as hosts and services.

For example

 indexserver.ini

compileserver.ini

nameserver.ini 

so on 

For service-independent properties, there is a file called "global.ini"

SAP HANA uses a prioritized layered configuration framework. This means that properties can be configured at different levels or layers depending on the configuration file. The following layers are available; values from higher layers overwrite values of lower layers:








Configuration files are stored on the SAP HANA server at the following locations according to layer:

● Default: /usr/sap/<SID>/HDB<instance>/exe/config (read only)

● System: <sapmnt>/<SID>/SYS/global/hdb/custom/config

●Database: <sapmnt>/<SID>/SYS/global/hdb/custom/config/DB_<dbname>

● Host: /usr/sap/<SID>/HDB<instance>/<hostname>


Note: The default location is<sapmnt> is /hana/shared. system replication scenario reconfigures the database using  " hdbnsutil -reconfig"

All public configuration parameters are defined in table   "CONFIGURATION_PARAMETER_PROPERTIES". In addition to basic properties such as data type, unit and default value the definition includes a flag to indicate if a system restart is required before a changed value becomes effective.

When you attempt to change a parameter value, the change is validated against the definition. Validation can be applied as follows:

● Value restrictions where a list of permitted values has been defined, either as a range (for example 0-100) or as a list of values ({default,on,off})

Layer restrictions where a change is only permitted at a specified layer (either SYSTEM or HOST)

Custom restrictions are additional restrictions where more detailed parsing of the value entered is required; this may be used, for example, to validate a value where a file path must be entered.

If the changed value is not valid for some reason, the new value is stored but a warning message is returned. You can prevent invalid values from being saved by setting the unsupported_configuration_change parameter to 'error', in which case the change is then rejected.

Alert 136 checks if any parameters are set to an unsupported value and Alert 137 triggers an information message if a configuration change has been made which requires a service restart in order to make it effective. The source of this information is 

system view M_CONFIGURATION_PARAMETER_VALUES which shows the current value for each parameter and the layer where it is defined, whether the value violates any restrictions and if a restart is required.








do not recommend that you change the default values of parameters unless stated in the documentation or instructed to do so by SAP Support.

Parameter Tracking

For traceability purposes changes to configuration values can be logged; optionally, a reason for the change can be entered in a comment value.

The tracking feature is enabled by default but can be disabled by setting the configuration parameter write_log in the indexserver.ini file to false. 

When it is enabled the SQL ALTER CONFIGURATION statement automatically updates the view SYS.M_INIFILE_CONTENT_HISTORY, this includes details of the time the change was made, the user name, the current and previous values and any comment text that was entered.

We can see same in below snap where changes date, user details and other information given for our reference. 

M_INIFILE_CONTENT_HISTORY










Note: These views are not available in the old Hana database version. 


Regards

Rupesh Chavan