How determine what database process.

ecarmodyecarmody Member Posts: 53
edited 2009-05-05 in Navision Attain
Hello,

We have two Navisions applications running on the same server. They both connect to the SQL Server database via Windows Authentication, so hence the database shows two connections by the same NT Login name.

I would like to be able to identify which database connection (process id) belongs to each of the two applications running on that one server.

I know I can query the SYSPROCESSES table to see the processes, and use a WHERE nt_username = 'account name' and that returns me the two connections, but still, which connection belongs to which application?

The reason I am after this is to be able to identify which connection is running actively.

Anyone have any ideas?

Preferable this would be done from within the Navision application itself, a way to self discover its own process id, and then log that out to a file. I can write Navision script, but still need a strategy.

Thanks for any comments.
Cheers,
Eric

Answers

  • ara3nara3n Member Posts: 9,256
    File->database->information-> drill down on session, and you should see a boolean field called my session.

    Session btw is a few on sql.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • ecarmodyecarmody Member Posts: 53
    Thanks! I hadn't thought to drilldown on that field.

    What are you referring to with this statement "Session btw is a few on sql." ?

    I can not find a table called "session" in the applications sql database, if that is what you mean.
  • ecarmodyecarmody Member Posts: 53
    The drilldown on Session shows exactly what I want to see. The My Session column is what I want get.

    How can I access this information from Navision script, or even from SQL server side?
  • DenSterDenSter Member Posts: 8,307
    Rashed means that it is a 'view', not a 'few', it is a typo. You should find the Session view in your NAV database.
  • ara3nara3n Member Posts: 9,256
    yes view, I was multi tasking and posted a quick reply.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • ecarmodyecarmody Member Posts: 53
    ah, got it! Thanks guys, I can work with this.
  • ara3nara3n Member Posts: 9,256
    you are welcome and good luck.
    btw instead of changing the title of the thread, there is a new field that you can change below the title to solved.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
Sign In or Register to comment.