How determine what database process.

ecarmody
Member Posts: 53
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
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
0
Answers
-
File->database->information-> drill down on session, and you should see a boolean field called my session.
Session btw is a few on sql.0 -
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.0 -
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?0 -
Rashed means that it is a 'view', not a 'few', it is a typo. You should find the Session view in your NAV database.0
-
yes view, I was multi tasking and posted a quick reply.0
-
ah, got it! Thanks guys, I can work with this.0
-
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.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions