• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 572
  • Last Modified:

Close (Pervasive) PSQL 11 sessions


I am looking for a way to enumerate and close Pervasive Sql 11 sessions. I need to be able to write some code for this. I need to enumerate through the sessions and see what database they are connected to and close their session if it is pointing to the correct directory.

Does anyone have any idea of how to do this? .net, powershell, CMD line?

  • 2
2 Solutions
Bill BachPresidentCommented:
In the Pervasive Control Center, select the Help menu, the Documentation. Drill down into the Programmer manuals, and find the Distributed Tuning Interface (DTI). This is exactly what you need. If you want to use it from an object-oriented environment, use the Distributed Tuning Objects (DTO) instead.

I have actually already written the function that you need in a tool called PSConfig, so what you want to do is both possible and fairly straightforward.
mccarlIT Business Systems Analyst / Software DeveloperCommented:
Are you able to code in C/C++? You can use the DTI SDK for pervasive. It stands for Distributed Tuning Interface but don't let the name throw you off. It's functionality is pretty much anything admin, ie. non-data, related to Pervasive. You would use functions like PvGetOpenFilesData(), PvDisconnectMkdeClient() and/or PvDisconnectSQLConnection(), among other to get the info you need and close session.

If you are using higher level languages, then perhaps the DTO packages are more what you would look at, but I have no experience with it so can't help much further than pointing it out.

Check out the bottom of this page for downloading docs, samples, etc.... http://www.pervasive.com/database/Home/Products/PSQLv11.aspx

It has been a while since I have been involved with Pervasive but if you do end up looking into this route and you have issues, let me know and I may be able to recall something useful that might help you!
LanBuddhaAuthor Commented:
Thanks guys. I split the points which I thought was fair since you both provided the information. Going to see if I can do this is powershell.
mccarlIT Business Systems Analyst / Software DeveloperCommented:
Thanks, good luck! :)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now