Developer Reference : Platform Management : Distributed Tuning Objects (DTO) Guide : Monitoring Zen Servers with DTO : DtoSqlClient Object
 
DtoSqlClient Object
Allows you to query information about and disconnect a SQL client.
Properties
AppDesc
Returns a description of the application that created a SQL client.
ConnectTime
Returns the connection time for the SQL client.
CurStatusTime
Returns the time since the last status.
DSN
Returns the DSN associated with a SQL Client.
HostName
Returns the host name for a SQL client.
IP
Returns the IP for a SQL Client.
ProcessID
Returns the process ID for a SQL client.
Status
Returns the status of a SQL client.
ThreadId
Returns the thread identification of a SQL client
UserName
Returns the user name associated with the SQL client.
Methods
Disconnect method
Remarks
Use the DtoSqlClients Collection to obtain all the current SQL clients.
Example
’ Instantiate session and connect
Dim my_session as new DtoSession
Dim result as DtoResult
result = my_session.Connect("myserver", "username", "password")
 
’ Get monitor object from session
Dim my_monitor as DtoMonitor
Set my_monitor = my_session.Monitor
 
’ Now get SQL Clients from monitor
Dim my_sqlclients as DtoSqlClients
Set my_sqlclients = my_monitor.SqlClients
 
’ Pick first client from collection and find
’ the DSN associated with it
Dim first_sqlclient as DtoSqlClient
Dim DSNname as string
Set first_sqlclient = my_sqlclients(1)
DSNname = first_sqlclient.DSN
See Also
DtoSqlClients Collection
DtoMonitor Object
Methods Detail
Disconnect method
Disconnects a specific SQL Client.
Syntax
result = Object.Disconnect
Arguments
Object
DtoSqlClient object
Return Values
result
DtoResult long value indicating the result of the method call. Use the Error property of the DtoSession Object to obtain a description for the result.
Remarks
Call this method for every SQL client you wish to disconnect.
Example
 
result = my_sqlclient.Disconnect