How do I know who logged to what schema in HANA? - hana

How do I know who logged, when logged, how long HANA being used by user, to what schema user accessed in My SAP HANA SPS 11?

Did you check "SYS"."AUDIT_LOG" and "SYS"."AUDIT_ACTIONS" system views?

Related

Is it true that each new user in SAP HANA is assigned a schema with the same name as the user?

It seems to be that, every time a new user is created in HANA, a new schema with the same name as the user is created too.
Is this always true or this is a configurable behaviour?
If this is always true, can you provide the link in the official documentation of SAP Hana where this behaviour is explained? I could not find it after searching in the official docs.
It's the normal behavior of SAP HANA and it's not configurable.
https://answers.sap.com/questions/12096524/index.html
Here is the documentation link for SAP HANA user:
https://help.sap.com/viewer/4fe29514fd584807ac9f2a04f6754767/2.0.00/en-US/20d5ddb075191014b594f7b11ff08ee2.html
A schema with the user's name is created for each database user: this schema cannot be explicitly dropped. The user's schema is automatically dropped when the user is deleted. The database user owns this schema and it is used as their default schema when they execute a command without explicitly specifying a schema name.

PowerDesigner fails to list Tables in Reverse Enginnering for SAP HANA database schema

I try to use PowerDesigner reverse engineering tool to build the diagram of objects under my user's schema.
Although I can connect and see the list of views in "Database Reverse Engineering" dialog, it fails to display the list of tables under target schema.
Any idea how to bring database tables on diagram on SAP PowerDesigner?
I have figured out that I was using the wrong provider to connect to my HANA database
Though the target HANA database was in HANA 1.0 (since in my environment, I had some other HANA 2.0 systems), I chose provider HANA 2.0 without querying too much
That was the error, when I chose HANA 1.0 data provider, I could successfully see all my schema tables on Power Designer with "Database Reverse Engineering" tool
Thanks to Pascal for leading me to the correct solution

How to determine whether backend database is HANA DB?

There is requirement that if backend database is HANA DB the system trigger a update operation. otherwise the db is non-HANA db the system raises an error.
How to determine whether backend database is HANA DB in ABAP codes?
Thanks & Regards
Check CL_DB_SYS=>DBSYS_TYPE - if it is HDB, you're on a HANA system. Be sure to read the documentation of that attribute.

How to create a new database in SAP HANA command line (HDBSQL)?

I am new to hdbsql and I have logged in to the SAP HANA Server and logged in to the hdbsql terminal as a HDB admin user(SYSTEM).
1.Is it good to create databases as admin user?If not how to create a new user for hdbsql?
2.How to create a new Database in command line?(Will this work "CREATE DATABASE dbname;")
Thank you.
CREATE DATABASE as a command only applies if you are using a multi database container setup.
As this question really is more about the concepts of HANA database administration, I highly recommend to invest the time to read the documentation or watch a video from the HANA academy on youtube.
I'm pretty sure this will get you up to speed quicker than asking single questions one by one.
Did you try 'create database'?
You should use
CREATE SCHEMA <schema_name> [OWNED BY <user_name>].
More info on HANA queries/statements/functions can be found here.

SAP HANA Authorisation Error: SAP DBTech JDBC: [258]: insufficient privilege: search table error: [2950] user is not authorized

At the moment I try to understand SAP HANAs authorisation concept.
I assigned the analytic user the following rights:
select on _SYS_BI, _SYS_BIC
execute on REPOSITORY_REST
root package: REPO_READ
If I create an analytic privilege on an information view and assign this privilege to the user then the user is able to query the information view.
On the other hand the modeller does not need this analytic privilege to query the information view. So there must be another way to allow the user to query the data - right? And I try to understand how.
Without the analytic privilege the user gets the following error:
Error: SAP DBTech JDBC: [258]: insufficient privilege: search table error: [2950] user is not authorised
So which privilege is missing? What is search table error?
This question really is more about concepts and not so much about how to do something specific. I recommend to use the SAP Community Network (SCN) community for this kind of question.
Generally speaking, modeller roles tend to have a "see all" privilege, which allows them to see all data.
The "search table error" is a general error message used by SAP HANA and can indicate basically any problem with data access. The specific information are provided in the details part of the error message. In this case that's : [2950] user is not authorised