User login in SQL version of Navision

arindamarindam Member Posts: 176
Hi All,

How do i find out which user is logged in in Navision SQL server version ?

Regards,
Arindam

Answers

  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Via File Database Info Sessions --> Drilldown

    Or SQL Management Studio --> Management --> Activity Monitor

    Or --> Query analyse --> sp_who
  • arindamarindam Member Posts: 176
    Thanks for the reply.

    But how can I programetically find out which user is logged in ?

    Appreciate your help.
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    There is a session table.

    It is hidden but you can see it in the variables when you select table.
  • arindamarindam Member Posts: 176
    I tried that. The table number is 2000000009.

    I have defined an user called 'sa'. and my machine name is say 'M1' and domain is say 'Domain1'.

    When at runtime I am accessing the "User ID" feild of session table, i am getting the value 'Domain1/M1'. I am expecting 'sa'.

    I confirm that I logged in SQL option of Navision and my user id is 'sa'.

    Please advice.

    Regards,
  • EugeneEugene Member Posts: 309
    there is a system function USERID

    F5 - DATABASE - Functions - USERID
  • arindamarindam Member Posts: 176
    Just got the solution.

    Yes USERID is the one which I was looking for. It solved my problem.

    Thank you all for your help.
Sign In or Register to comment.