on 07-30-2015 10:06 AM
I need to get for some logging the version of the hana server. Does one know what would be the Hana equivalent or similar query to
SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY('productlevel'), SERVERPROPERTY('edition'), @@version
The closest I could find is
select * from M_DATABASES
What's wrong with M_DATABASE? (M_DATABASE - SAP HANA SQL and System Views Reference - SAP Library)
- Lars
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, one thing here is that MS SQL Server clearly uses a different scheme to indicate its software version.
So, you wouldn't get the same semantics here anyhow.
For logging purposes, where you want to simply capture the currently used software version, it's definitively precise to do:
select version from m_database.
Technically it's possible to have multiple SAP HANA installations on the same machine with different SPS and revision levels.
So, asking for the "machine-level" or "server-level" version doesn't make much sense here.
Instead, what's relevant is always what software you're currently using; and that is what M_DATABASE provides you.
If you feel that you need to separate the different components of the version string (major.minor.patch.build) that's trivial too:
select version,
substr_before (version, '.') as major,
substr_before (substr_after (version, '.'), '.') as minor,
substr_before (substr_after (substr_after (version, '.'), '.') , '.') as patch
from m_database;
(build is of no practical relevance for customer, so I left it out).
- Lars
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.