Sorry, i didnot make it clear.

i mean i need to parse the packets sent and received in the connection between client and server to know what operations are executed on the server machine. 

the application does not operate the database, but audit the operation to give a warning when it find any dangeous operation,  just like wireshark, but the app will record the operations and show to the database administrator.

well, i install a server on a virtual machine , and  a client on my PC, both are windows operation system.

i wanna  write an application to parse communicating packet between client and  Cache server, 

so i wanna know how many kinds of  connection between client and server.

my current environment  includes  a DbVisualizer as client and a virtual machine as remote database server,

you know i can only access my  database server  with SQL statement,

but i hope i can call my code on the database server  remotely, so what should i do to achieve it ?