cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Logging of user connections on RDBMS

iharstrom
MEGA Partner
MEGA Partner

Hi all

 

We have a customer requesting the capability to perform advance user-logging of transactions on the RDBMS (MS SQL).

 

As MEGA accesses the RDBMS through one shared user this would require making a link between the session-IDs on the  SQL server instance and the environment/repository logging of user-transactions. 

 

I believe this could be done through stored procedures on the database, and would require some scripting for the DBA.

 

Is there anyone here in the community that has experience with creating such a user-logging that could point me in the right direction ?

 

 

With Regards

 

Isak Harstrom

Isak Härström

4 Replies

Thank you very much!

 

 

Isak Härström

Hello !

 

Here is the file.

Thank you very much for the answer Olivier, I think this will give the customer a good direction of how this can be solved !

 

The only thing is that I cannot seem to fin the textfile attatchment? 

 

Can you please provide a link to it?

 

 

Isak Harstrom

Isak Härström

oschiavi
Retired

Hello !

 

Recently we built a stored procedure that can help to determine, from a SQL Server session, the Mega user that owns it.

I attached it here in a text file.

Once it is installed, the syntax to call it is, for example :

      EXEC SP_FIND_MEGA_END_USER_NAME 'Standard_SQL', 'db', '51'

The three parameters are :

- The Mega environment name

- The name of the Mega working database (as it is shown in the Administration tool)

- The ID of the session in SQL Server

Thus, if the customer wants to have something more, he will indeed have to write more SQL scripts to retrieve all sessions linked to some databases for example, and then call the stored procedure described above for all session IDs.

Feel free to ask for more information if needed. Regards,

 

Olivier Schiavi