Skip to Content

​Why sometimes we cannot see the tenant database item via M_DATABASE under the SYSTEMDB mode

a) This output of the m_databases was normal after stop the tenant BK2:

hdbsql SYSTEMDB=>

hdbsql SYSTEMDB=>

hdbsql SYSTEMDB=> alter system stop database BK2;

0 rows affected (overall time 16.255817 sec; server time 16.248228 sec)

hdbsql SYSTEMDB=>

hdbsql SYSTEMDB=>

hdbsql SYSTEMDB=> SELECT * from m_databases; DATABASE_NAME,DESCRIPTION,ACTIVE_STATUS,ACTIVE_STATUS_DETAILS,OS_USER,OS_GROUP,RESTART_MODE,FALLBACK_SNAPSHOT_CREATE_TIME

"SYSTEMDB","SystemDB-BK2-20","YES","","","","DEFAULT",?

"BK2","BK2-20","NO","Stopped by user via ALTER SYSTEM STOP DATABASE","","","DEFAULT",?

2 rows selected (overall time 2016.008 msec; server time 1163 usec)

hdbsql SYSTEMDB=>

hdbsql SYSTEMDB=>

b) This output of the m_databases was abnormal after stop the tenant BK2:

hdbsql SYSTEMDB=>

hdbsql SYSTEMDB=>

hdbsql SYSTEMDB=> alter system stop database BK2;

0 rows affected (overall time 15.252442 sec; server time 15.247724 sec)

hdbsql SYSTEMDB=>

hdbsql SYSTEMDB=>

hdbsql SYSTEMDB=> SELECT * FROM SYS.M_DATABASE; SYSTEM_ID,DATABASE_NAME,HOST,START_TIME,VERSION,USAGE "BK2","SYSTEMDB","hanabktest2","2020-07-02 04:19:55.163000000","2.00.041.00.1560320256","TEST" 1 row selected (overall time 1792.450 msec; server time 1657 usec)

hdbsql SYSTEMDB=>

hdbsql SYSTEMDB=>

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Jul 16, 2020 at 10:40 AM

    In the first query you select from system view M_DATABASES which lists all databases. In the second query you select from system view M_DATABASE which provides only information about the database on which you logged in. As you are logged in to SYSTEMDB you just get the information for the system db.

    I don't see any problem, you just query from different sources and therefore get different resuts.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.