HANA parameter change without DB user from console tool setParameter.py – SPS05 and above
Introduction – Console Tool setParameter.py
From SAP HANA version 2.0 SPS05, you can use the console tool setParameter.py to make changes to configuration parameter values, it can be run from the command line or integrated with other administration management tools and scripts.
The tool can be used either when the database is offline or online if for any reason it is not possible to make a configuration parameter change by executing an SQL statement. It ensures that if changes are made simultaneously to an ini file the changes are synchronized and applied correctly, this eliminates the need for administrators to directly edit ini files.
The command supports both setting and unsetting parameters. No key value is required when unsetting a parameter:
python setParameter.py -set(or unset)=<LAYER>/<INIFILE_NAME>/<SECTION>/<KEY>=<VALUE> [-comment=comment] [-reconfigure] [-sapcontrol=1]
The tool also supports a ‘help’ argument (-h) which displays a page of help text. The help page is shown automatically if invalid syntax is entered.
One of the coolest features of this tool is that we can use it as a script to set or unset multiple values at the same time.
- Setting for SYSTEMDB
- Setting for tenant DB
- Setting Multiple values together
Conclusion : Return Values (0/1/2)
After submitting the command one of the following codes is returned indicating success or failure of the execution:
0 Successful execution
1 Could not be executed because of incorrect usage (unexpected parameter values)
2 Other error
If the -sapcontrol=1 is provided, then one of the following is printed in the output:
This python tool is really very helpful for doing mass changes, where you don’t need to authenticate on every server for DB user for running the ALTER statements.