×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Access Pervasive Monitor

Access Pervasive Monitor

Access Pervasive Monitor

(OP)
Hi Folks,

I was just wondering if it was possible to access the pervasive monitor programatically. Basically, the backup on my application server is failing almost every night due to file access. I would like to be able to write a script to check what user accounts are accessing the pervasive tables at a certain time. Is this possible. Does the monitor pull the data from some table somewhere??

Mighty

RE: Access Pervasive Monitor

The Monitor is not available but the API used by the Monitor is available.  You can use DTI or DTO to access the Monitor data.  You'll need to be using PSQL 2000 or later to get DTI and PSQL 2000i or later to get DTO.

Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
http://www.mirtheil.com

RE: Access Pervasive Monitor

(OP)
Hi Mirtheil,

You are obviously "the man" when it comes to Pervasive. Excuse my ignorance but what is DTI and DTO

Mighty

RE: Access Pervasive Monitor

(OP)
Thanks mirtheil,

That seems to be a pretty good source of info. I will check it out.

Mighty

RE: Access Pervasive Monitor

(OP)
Hi Mirtheil,

I'm Back!! I found some sample code on the Pervasive site and decided to check it out. I am just trying to get the net addresses and usernames of connected users - nothing too taxing. However, my script falls over at the first hurdle:

Set mySession = CreateObject("DTO.DtoSession.1")

The following error message is given:

ActiveX Component can't create object: 'DTO.DtoSession.1")

I am only running Pervasive SQL 2000i. Does this version support DTO??

Mighty

RE: Access Pervasive Monitor

Yes, PSQL 2000i supports DTO but DTO was not installed as part of the engine.  Here's a link (http://www.mirtheil.com/dtosetup.zip) to a package I put together a while back for my DDF Printer tool (which uses DTO).  

Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
http://www.mirtheil.com

RE: Access Pervasive Monitor

(OP)
Hi Mirtheil,

Thanks for that. At the moment I am just messing around trying to get some info from the monitor before I get down to the nitty gritty. I have the following VBScript code:

' Declare variables
Dim mySession, result, myMonitor, myMKDEClients, i

' Instantiate session and connect
Set mySession = CreateObject("DTO.DtoSession.1")
result = mySession.Connect("myServer","myName", "myPass")

' Get monitor object from session
Set myMonitor = CreateObject("DTO.DtoMonitor.1")
myMonitor = mySession.Monitor

' Now get Mkde clients from monitor
Set myMKDEClients = CreateObject("DTO.DtoMkdeClients.1")
myMKDEClients = myMonitor.MkdeClients

' Loop through each item in the collection
wscript.echo myMKDEClients.count

Your install package seems to have worked fine - thanks. But I get a error at the highlighted line above saying that "Object doesn't support this object or method: Monitor". Any ideas?

Mighty

RE: Access Pervasive Monitor

If you were using VB, I would think declaring the variables would work like you've posted.  I was able to get it to work by using:

CODE

' Get monitor object from session
set myMonitor = mySession.Monitor

' Now get Mkde clients from monitor
set myMKDEClients = myMonitor.MkdeClients

Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
http://www.mirtheil.com

RE: Access Pervasive Monitor

(OP)
You're a star - cheers!!

Mighty

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close