Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Cannot shutdown MaxDB instance

Hi Experts,

I have a Netweaver system which makes use of a MaxDB database.

Recently when I tried to shutdown the system by running 'stopsap' I received the following error:

There are still active users connected to the database.
On order to shutdown the database with stopdb you first have to stop all database applications. This includes MCOD instances and database utilities.

I have no idea how to disconnect active users or how to shutdown MCOD instances. None of the developers are connected to the system in any way. How can I disconnect the active users in order to shutdown the server?

Thank you,

JP

Former Member
replied

Hello JP,

to figure out which task is still connected to the database, you can use dbmcli:

dbmcli -d <db_name> -u <dbm-user>,<password>

> db_connect <dba-user>,<password>

> db_executenice select * from sessions

You'll get an output like this:

dbmcli on MAXDB1>db_executenice select * from sessions

OK

CONTINUE

SESSIONID = 984

OWN = 'NO'

SESSIONTYPE = 'OLTP'

ENCRYPTION = 'NO'

<b>STARTDATE = '20071010165801000000'</b><b>APPLICATIONNODE = '<servername>'</b><b>APPLICATIONPROCESS = 0</b>

APPLICATIONTYPE = 'ODB'

USERNAME = 'DBADMIN'

...

As long as you see CONTINUE in the second row of the result, more results are available. You can list them with command

db_fetchnice

Using this information, you should be able to identify the connected user/application.

However, if you have already shut down the application and if you are sure that no users are executing important tasks e.g. with SQL Studio or DBMGUI, you can just stop the database with dbmcli command db_offline.

HTH,

Melanie

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question