I'm currently working on a script which writes metadata to system tables of an SAP HANA database. For one example, I need to differentiate between a HANA database with an Support Package Stack of version 05 or higher. Is there any system table I can query to get the used SPS version ?
Thanks for your help! André
System view M_DATABASE_HISTORY contains version history for the database, including install time. If you look at its content
you'll get something like:
To get the currently installed revision and extract the SPS from it, you could so something like:
I'm not sure what you mean by "writes metadata to system tables of an SAP HANA database". I hope you're trying to write to self-created tables in the SYSTEM schema and not to write into HANA-builtin system tables as this might become problematic.