
this will list all users in HANA systems. Prerequisite: We need a database user with DATA ADMIN or CATALOG READ assigned.ġ> Connect to the required system via HANA StudioĢ> Open Administration perspective, You can open it from Window -> Open -> Perspective -> Administration Console Requirement: We want to list SAP HANA users with their lock status. We want to list down all users created in SAP HANA system with locked/Unlocked status.
#Sap hana studio sql how to#
How to list all SAP HANA users with their lock status?
#Sap hana studio sql password#
Indexserver.ini > password policy > maximum_invalid_connect_attempts = 6 A database user may be locked because of the (default) password policy defined: Live Example : Our ERP Test schema was getting locked in SAP HANA and it was causing a downtime for the Customer application, we had to enable an audit policy on HANA to find out who’s locking the user. Learn in the next tutorial how to get started with SAP Business Application Studio to start creating a calculation view.This Topic will explain about how to unlock the schema in SAP HANA and below sql's provide information about how to unlock the user in SAP HANA. Since Alex needs to make these insights available to other departments in Best Run Travel, the next step is to create a calculation view to share these findings with other departments. This way you were able to help Alex get the business inside they were looking for. You have completed the sixth tutorial of this mission! You learned how to create new tables, view table details, join tables and extract specific data from tables using SQL statements in the SAP HANA Database Explorer. Now you can see that the most bookings for the top 5 agencies have been done on Thursdays. For this, use the following nested queries: select SAGBOOKDAYS.AGENCYNUM, STOPAGENCY.NAME, SAGBOOKDAYS.ORDERDAY, SAGBOOKDAYS.DAYCOUNT from SAGBOOKDAYS inner join STOPAGENCY on SAGBOOKDAYS.AGENCYNUM=STOPAGENCY.AGENCYNUM where SAGBOOKDAYS.DAYCOUNT in (select max(DAYCOUNT) from SAGBOOKDAYS group by AGENCYNUM) You also need to extract only the day with maximum number of bookings for each of the top 5 agencies. Now that you have created the 2 tables, join these tables based on the agency number (column AGENCYNUM). To view all contents of this new table, you can again use the SELECT * FROM query: SELECT * FROM SAGBOOKDAYS Use the following query: create table SAGBOOKDAYS as (select AGENCYNUM, dayname(ORDER_DATE) as ORDERDAY, count(dayname(ORDER_DATE)) as DAYCOUNT from SBOOK group by AGENCYNUM, dayname(ORDER_DATE)) Next, create the table SAGBOOKDAYS to store the daily bookings for each of the agencies. To view all contents of this table, just copy and paste the following query into the SQL console and run it: SELECT * FROM STOPAGENCY Run this query in your console: create table STOPAGENCY as (select top 5 SAGENCYDATA.AGENCYNUM, STRAVELAG.NAME,SAGENCYDATA.NUMBOOKINGS from SAGENCYDATA inner join STRAVELAG on SAGENCYDATA.AGENCYNUM = STRAVELAG.AGENCYNUM)

We have a SQL statement ready to explain you, how the explain plans work. To find the top booking days, we will first create two new tables: converting user ids in hana db - demo of using restricted user id. Below are the steps to execute the explain plan table in the SAP HANA studio with the help of SQL statements. Since Alex also wants to know on which days of the week the top 5 travel agencies make most bookings, we need to use a few more queries. However, we recommend that you only use it for visual guidance but primarily focus on the written steps in this tutorial.


This video is meant as additional support material to complete the tutorial. You can follow the steps in this tutorial also by watching this video: About this video In this tutorial, you will learn how to query data in your instance using the SAP HANA Database Explorer. You are here ☛ Query the database using SQL statementsĬreate a development project in SAP Business Application Studio Import data into SAP HANA Cloud, SAP HANA Database Tools to manage and access the SAP HANA Cloud, SAP HANA DatabaseĬreate users and manage roles and privileges Provision an instance of SAP HANA Cloud, SAP HANA database
#Sap hana studio sql trial#
Start using an SAP HANA Cloud trial in SAP BTP Cockpit

This mission consists of 9 modules that contain the necessary steps you need to follow in your mission to help Alex: Reminder: This tutorial is part of a mission, in which you will help Alex, the CEO of Best Run Travel, to answer a concrete business question with SAP HANA Cloud, SAP HANA database.Īlex needs to know the top 5 partners of their agency and wants to find out the days with maximum booking of each partner.
