I am an administrator for a GridDB database, and I would like to delete inactive users. I would like to check the last time a user was active, or when last they logged in to the database. If it's been more than 6 months ago, I want the user to get deleted. I saw on (this website)[https://mohammaddarab.com/find-last-login-date-sql-server-login/] that one could get the last login time with:
SELECT MAX(login_time) AS [Last Login Time], login_name [Login]
FROM sys.dm_exec_sessions
GROUP BY login_name;
But I'm not sure if that's available for GridDB. The work environment includes a GridDB Python client on a Linux machine (Ubuntu) and a GridDB container is storing the database. Is there any way I could achieve this?
I tried to search the internet for a solution and I found the code above, I want to create a GridDB replica of that code, or something similar, as long as it works.