SAP HANA studio open SQL console for current schema

3k Views Asked by At

I am opening the SQL console from HANA studio by clicking on the schema but it is not connected to database. How can I configure it so that it will open with current schema?

1

There are 1 best solutions below

4
Lars Br. On

The question is not quite clear. When you can see the list of schemas, you are definitely connected to the database (otherwise SAP HANA Studio wouldn’t be able to show this list).
As I understand the question you like to select one of the schemas from the list and open an SQL editor and want that SQL editor to have the current schema set to the schema you selected.

That behaviour is not implemented in SAP HANA Studio. You can define a default schema for the database connection in the connection properties; otherwise it is always going to be the default schema for the logon user (typically the users’ own schema). You can also run the SET SCHEMA <schema_name> command in the SQL editor, but this is not automated.

Be aware that schemas are not the same as databases (e.g. in MS SQL Server). Schemas really are object namespaces within a database. User and privilege management is still done at database level.