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?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bill BachPresident and Btrieve GuruCommented:
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....

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!

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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! :)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.