Get Company infos from Sql server

Simo_ba
Simo_ba Member Posts: 78
Hi,
I have to kill some users sessions from Sql directly, But i need to know wich Compnay are they login before.
any suggestion
Thanks

Comments

  • kriki
    kriki Member, Moderator Posts: 9,132
    That is not possible.

    Or you need to add some code in function "CompanyOpen" or "LoginStart" in codeunit 1 to record in which company a user started working.
    Before killing a user, you can check in which company the user is working.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • nunomaia
    nunomaia Member Posts: 1,153
    If you will store data in a table don't forget to change DataPerCompany to NO
    Nuno Maia

    Freelance Dynamics AX
    Blog : http://axnmaia.wordpress.com/
  • Simo_ba
    Simo_ba Member Posts: 78
    Thanks guys
    but my prob is so big, cause i use the same user to log into 4 different companies and i wana get the apropriate killed company. by using sql i have SPID but i cant get Company name.
  • kriki
    kriki Member, Moderator Posts: 9,132
    Simo_ba wrote:
    Thanks guys
    but my prob is so big, cause i use the same user to log into 4 different companies and i wana get the apropriate killed company. by using sql i have SPID but i cant get Company name.
    In the File=>Database=Information=>Sessions tab, Click drilldown on current sessions. => In here you have the session ID that is the same id as under SQL and you have a column "My session". So check in each Navision you DON'T want to kill which session ID it has and the remaining is the one you want to kill. (I presume you want to kill the session that doesn't respond anymore).
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!