Tuesday, April 8, 2025

HANA Interview questions

What are the types of backup in HANA


1. Full Backup: Backs up the entire SAP HANA database (all data and metadata).
2. Differential Backup: Backs up the data changed since the last full backup.
3. Incremental Backup: Backs up the data changed from the last data backup (full or incremental).

  • How to check the version of Hana Database w/o logging in to SAP system and DB
  • a). You need to log in to the application server through Putty and switch to the sidadm user.

    Run the “R3trans -d” command. You will get the trans.log. Open that file, and you will get the version of the Hana database.

    or

    b). Another way is to check the work process log files from the work directory. Location—/usr/sap/SID/DVEBMGS00/work

    Check the work process log file with the name dev_w[n].

    General ways to check the HANA DB version

    • Log in to DB host through Putty and switch to the sidadm user. Run the command ‘HDB version.
    • Open the system in Studio and check the “Overview” page. There you will find the version.
    • sql query “select * from SYS.M_DATABASE_HISTORY”
    • Open the system in Sap Hana cockpit and go to applicatio“n General Information
    • Open the system from SAP Logon Pad and go to ‘System --> Status’; you will get the version.
    • Using python scripts available in directory (inside the DB server) ‘/usr/sap/SID/HDB<xx>/exe/python_support’ [you can reach to this directory using “cdpy.“] ==> Run the script ‘python systemOverview.py‘ using the sidadm user, and you will get the below output. It covers version along with other information-


    What are the ways to check the status of HANA Database

    Hana DB status can be checked using 

    • HDB info : This will provide you the status of all HDB services running in the system.
    • HDB proc: Same as HDB info, it provides the status of the services
    • sapcontrol -nr <instance##> -function GetProcessList
    • HANA Studio-->Landscape-->Services 
    • HANA cockpit


    How to install a HANA license if you are not able to connect using HANA Studio or HANA Cockpit.

    This is called lockdown mode, and there are few reasons behind this situation:

    • Your temporary license expires after installation.
    • The permanent license key is expired.
    • You manually deleted the license key.
    • Change in hardware key
    • Enforced license key has reached its limit and additional tolerance is exhausted

    In this case, only a user with the system privilege LICENSE ADMIN can connect to the database and execute license-related queries, such as obtaining previous license data or installing a new license key.
    While applying a fix, you must have the credentials of a SYSTEM user or any other user with the required privileges as stated above and a license key file generated from SMP handy.

    Solution: Log in to the database host with the sidadm user.

    Go to HDBSQL with the SYSTEM user. Once you are in HDBSQL, you will see message that *437: only commands for license handling are allowed in this current state SQLSTATE: HY000
    Switch ON multi line mode with command \mu ON

    Use the command SET SYSTEM LICENSE ‘<Copy paste your text from the license file>’ to install the license.
    You will return to the HDBSQL console without error, and your license will be renewed. If it does not come out to the HDBSQL console, then hit \g, and then it will come out of HDBSQL with output like 0 rows affected (overall time 20.486 msec; server time 18.529 msec).

    How to check if the installed HANA license is enforced or unenforced.

    We can check using an SQL query:  SELECT * FROM SYS.M_LICENSE. check the Enforced column (True or False)




    No comments:

    Post a Comment