florin
florin

Reputation: 405

Get Sap Hana server version

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

Upvotes: 2

Views: 1918

Answers (3)

Shivam Shrivastava
Shivam Shrivastava

Reputation: 24

If you have Hana Studio then no need of typing a single line of code .Just go to navigation pane & click your system and finally click on the administrators tool on top of navigation pane. In the RHS of navigation pane you will find the 6-7 tabs , click the overview tab , inside it you will find version some what like 1.00.120.00.146..... .Here in my case 120 represented SPS 12 .now check yours

Upvotes: -1

Lars Br.
Lars Br.

Reputation: 10388

For completeness here my answer from SCN: 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

Upvotes: 3

Lars Br.
Lars Br.

Reputation: 10388

Just as already answered on SCN, system view M_DATABASE contains the software version information. - Lars

Upvotes: 2

Related Questions