
Symptoms:
You might have run into the situation where you are facing error (19: invalid license SQLSTATE: HY000) while login using SAP HANA hdbsql to HANA DB.
hdbsql=>
* 19: invalid license SQLSTATE: HY000
hdbsql=>
* 19: invalid license SQLSTATE: HY000
Possible Causes of 19: invalid license SQLSTATE: HY000 error :
We have a multi-tenant HANA database with valid license installed on tenant database instead of SYSTEM DB.
Or system might have been into lockdown mode.
System lockdown occurs when,
- We have manually deleted all licenses
- Temporary license has expired & we didn’t renew license within 28 days.
- Amount of licensed memory has exceeded of the enforced license.
- We changed the hardware and new key wasn’t requested.
Solution:
We need to install valid license on SYSTEM DB as shown below:
Firstly, we need to view licenses installed in our SAP HANA database on the License page of the SAP HANA cockpit.
For this purpose, we should have LICENSE ADMIN privilege.

As per the procedure described in the below link, we need to request a permanent License key via SAP support portal support.sap.com/licensekey (under launch the license key application).
Once we receive the license key in .txt format via mail from SAP, we need to upload the license key as shown below.
Login to SAP HANA Cockpit.
Select option Request New License then upload New license.

Once License is installed successfully, as a result the 19: invalid license SQLSTATE: HY000 shall be gone.