Friday, April 14, 2017

SAP HANA License:



SAP HANA License:

HANA License need to be purchased depends on RAM, Let’s take  example 128/256 RAM if we are using  need to purchased license for that.
And every year need to be renewal license.


Best Advantage is every year hardware part’s are getting cheaper, so that would be advantage when you are renewal of license. 

License keys are required to use SAP HANA Database. We can install and delete the license keys using subsequent methods

 - SAP HANA Studio
 - SAP HANA HDBSQL command line tool 
   HANA SQL Query Editor.



HANA License Key Types:

     The SAP HANA database supports two kinds of license key.

                    I. Temporary License Key

                    II. Permanent License Key


Temporary License Key:

            The temporary license keys are automatically installed with a new SAP HANA database installation. It is valid for 90 days from installation date. During this period we should request in service market place and apply permanent license key.


Permanent License Key:

The permanent license keys are valid until the predefined expiration date. It has to be requested on the SAP Service Marketplace under Keys & Requests and applied to the individual SAP HANA database. Furthermore they specify the amount of memory licensed to the target SAP HANA installation.



Note: Before a permanent license key expires, we should request and apply a new permanent license key. If it is expires, a temporary license key valid for 28 days is automatically installed. During this time, we can request and install a new permanent license key again.



There are two types of permanent license key available for SAP HANA

                    I.  Unenforced (SWPRODUCTNAME=SAP-HANA)

                    II. Enforced (SWPRODUCTNAME=SAP-HANA-ENF)



Unenforced License:

If an unenforced license key is installed, the operation of SAP HANA is not affected if its memory consumption exceeds the licensed amount of memory.



Enforced License:

If enforced license key is installed the system will be locked if memory consumption of HANA exceeds the license amount of memory plus some tolerance. If this happens HANA has to be restarted or a new license key should be requested, or a new license key that covers the amount of memory in use needs to be installed.


Authorization for Licensing Management

            The user required authorization of LICENSE ADMIN system privilege.



Important Points

There are a few different license models for SAP HANA depending on the business scenario (SAP HANA Stand-alone, SAP HANA Cloud, SAP Business Suite, SAP NetWeaver Business Warehouse or another Application on top of SAP HANA, etc.) and not all of them are based on memory.
If anyone have license related any questions, Please Contact with your SAP Account Executive who will gladly provide details.



Applying SAP HANA License

 For example of SAP HANA License Install and delete using the SAP HANA Studio, SAP HANA HDBSQL command line tool and HANA SQL Query Editor.



I. Installing SAP HANA License Using SAP HANA Studio



Windows: Start – All Programs – SAP HANA – SAP HANA Studio


                   


Right Click in left hand side  to Add system



Fill the required details Host Name, Instance Number, Description and Select the Locale.




Press next to Enter the User Name and Password with LICENSE ADMIN privilege User.



Press Finish Button. The screen shows HDB, SYSTEM and License(optional) are SID, User and Description





Right click on DB1 and go to Properties



Temporary License status:


License Expired status:











 Now we can generate the HANA License in Service Market Place(http://service.sap.com/license key) SMP login required.




Get the information required to request a permanent license key.

     To request the first permanent license key for a newly installed SAP HANA database, you need to provide the hardware key and the system ID. To request a subsequent permanent license key, you need the installation number and system number of your SAP HANA database. You can get the required information in the SAP HANA studio as follows:

    I.  In the Systems view, right-click the system and choose Properties – License.

    II. Get Hardware Key and you can use SQL to access the required information from the M_LICENSE system view.



The below Screen shows SAP Internal License Register:





Select your system type from below list



Select your License type:





Quantity of Memory



Download the text file




Unenforced SWPRODUCTNAME=SAP-HANA – This License file is Unenforced

Enforced SWPRODUCTNAME=SAP-HANA-ENF


Install License key in Hana Studio



Press Install License Key and Select the text file




Select License.txt file from directory where you downloaded file saved directory



Apply License Using SAP HANA HDBSQL command line tool
Login into sidadm in SAP Hana Database OS level




Copy License key from License.txt file and execute the command line SET SYSTEM LICENSE ‘<Entire License.txt file>’;







Note: Before update License in command line, we should enable multiline mode on this server using this command: \mu ON. (updated this – from Kimberley Chen’s feedback.)



Check the License status







Apply License using SAP HANA SQL Query Editor



In SQL Editor to execute the command SET SYSTEM LICENSE <License File Location>



Delete an Existing Permanent License Key

     We can delete all existing license keys in an SAP HANA database, for example, if permanent license keys with an incorrect installation number or incorrect system number were installed on the database.



Prerequisites

You have the system privilege LICENSE ADMIN.

Uninstall the license key using one of the following options:

SAP Hana Studio

     In the Systems view, right-click the system and choose Properties – License.



Choose Delete License Key.



System Lockdown

The system goes into lockdown mode in the following situations:

     1.     The temporary license key has expired.

     2.     You were using a temporary license key and the hardware key has changed.

     3.     The permanent license key has expired and you did not renew it within 28 days.

     4.     The installed license key is an enforced license key and the current memory consumption exceeds the licensed amount plus the tolerance.

     5.     You deleted all license keys installed in your database.

In lockdown mode, no queries are possible. Only a user with the system privilege LICENSE ADMIN can connect to the database and execute license-related queries, such as, obtain previous license data, install a new license key, and delete installed license keys. In addition, the database cannot be backed up in lock down mode.


Troubleshooting:

SAP Note 1738512 – HANA license expiration error still appears after successful installation of new license file while working with HANA rev25 or earlier

SAP Note 1739427 – How to request and install SAP HANA license key from SAP for more details.

3 comments:

  1. Useful post.
    Crafsol is SAP Services and SAP Solutions and SAP License Company in Pune, Indore, Mumbai, Aurangabad, Thane, Nashik, Kolhapur, Solapur, Ahmednagar, Satara and Nagpur. Crafsol Work with SAP ERP, SAP CRM, SAP BI (Business Data Warehouse), SAP APO etc.
    SAP Services and SAP Solutions
    SAP License

    ReplyDelete
  2. Hello Syamalareddy,
    Very cool to see your post come up when I was searching this topic!
    I have a problem with creating a CDS for a virtual table.
    Given:
    The physical tables stored in HANA DB of BW system and exposed to ERP HANA DB via SAP SDA.
    So, I have a virtual table in needed HANA DB and I can see table content from HANA studio.
    Question:
    I need to consume a data from the virtual table in ABAP.
    It isn't allowed to create a CDS view above virtual table, so I tried to create an attribute view on the virtual table and then a calculation view, but it didn't work as well.
    Anyways great write up, your efforts are much appreciated.

    Many Thanks,
    Aonk

    ReplyDelete
  3. Hi There,
    Thanks a trillion mate!
    It works like charm, saved a lot of energy & time.

    I have created a stored procedure which is calling a Calculation view.I need to pass multiple input parameter value but i am not able to do so. I have checked all the blog regarding this but everywhere it is shown by passing the value itself. SAP HANA tutorial USA . I want to pass the input parameter not value.Below is my Code snippets.
    -- IP_MATERIAL=000000000067064914 OR 000000000062040102;(Input parameter)
    IF (LENGTH(:IP_MATERIAL) <= 19 ) THEN
    VAR_IP_MATERIAL := REPLACE(''''||:IP_MATERIAL||'''', ' OR ', ''',''');
    ELSE VAR_IP_MATERIAL := REPLACE(''''||:IP_MATERIAL||'''', ' OR ', ''''',''''');
    END IF;
    -- VAR_IP_MATERIAL= '000000000067064914'','' 000000000062040102' (converted value of input parameter)
    TT_AK=
    SELECT MANDT,MATNR,WERKS,C_DATE,LGORT, SUM(IFNULL("LABST",0)) AS C_OPENING_STOCK, SUM(IFNULL("LABST",0)) AS LABST FROM "_SYS_BIC"."A. CA_PS_MARD" ( PLACEHOLDER."$IP_PLANT$" => :VAR_PLANT, PLACEHOLDER."$IP_MATERIAL$" => :IP_MATERIAL, PLACEHOLDER."$IP_DATE_TO_RUN_REPORT$" => :IP_CURR_DATE, PLACEHOLDER."$IP_STORAGE_LOC$" => :VAR_LGORT ) GROUP BY MANDT,MATNR,WERKS,C_DATE,LGORT;
    Through above code i am able to pass single value as input parmeter but if IP_MATERIAL is passed like 000000000067064914 OR 000000000062040102 that is i am passing two material and doing some string workaround i am finally passing it as
    '000000000067064914'','' 000000000062040102' then it is throwing error.
    Earlier i was using the Dynamic SQL inside SP which is still working fine.But i want to remove the dynamic SQL part.
    Dynamic SQL Code(Earlier):
    EXEC 'INSERT INTO #OPENING_STOCK SELECT MANDT,MATNR,WERKS,C_DATE,LGORT,SUM(IFNULL("LABST",0)) AS C_OPENING_STOCK, SUM(IFNULL("LABST",0)) AS LABST FROM "_SYS_BIC"."A.CA_PS_MARD" ( PLACEHOLDER."$IP_PLANT$" => '||:VAR_PLANT||', PLACEHOLDER."$IP_MATERIAL$" => '||:VAR_IP_MATERIAL||', PLACEHOLDER."$IP_DATE_TO_RUN_REPORT$" => '''||:IP_CURR_DATE||''', PLACEHOLDER."$IP_STORAGE_LOC$" => '||:VAR_LGORT||' ) GROUP BY MANDT,MATNR,WERKS,C_DATE,LGORT';
    This is working perfectly.

    How should i pass the value, i even tried with different combination of VAR_IP_MATERIAL like '''000000000062040102'',''000000000067064914''' but all in vain ,or do i need to do some code change while calling stored procedure .....Please help me with this.
    I am using SAP HANA 1.0 SPS 11.
    Anyways great write up, your efforts are much appreciated.
    Obrigado,
    Preethi

    ReplyDelete