cancel
Showing results for 
Search instead for 
Did you mean: 

Seeing what a DB user is viewing, remotely using Sybase SQL Anywhere 16.

gabriel_schroedter
Participant
0 Kudos

Does Sybase SQL Anywhere 16 provide any capability of remotely viewing all content related to an established user session in real time? 

I could use "SQL Anywhere Monitor" to do something like this, but I'd want to know what a particular user was looking at not, overall traffic.

Is there a way to use "Application Profiling" or "Application profiling wizard" remotely? Is there a way to get the actions of a particular user this way? Does this tool slow it down?

I think you can see the level of tracking I'd like to be able to use for this database, does anyone have any experience with this? Is it easier on other versions, or do I need to look a different program to run on top of SQL Anywhere 16?

Thanks,

Accepted Solutions (0)

Answers (2)

Answers (2)

jeff_albion
Employee
Employee
0 Kudos

Hi Gabriel,


but I'd want to know what a particular user was looking at not, overall traffic.


Is this to say you'd like to know which SQL is currently running for a connection in real-time? The best way to do this (graphically) is with the SQL Anywhere Console Utility (dbconsole).

---

Before you can see the SQL statements from connections on the server though, you first have to enable "Last Statement" tracking on the database server. This can be done in a few ways:

  • Add the -zl server option to the database server start line
  • Use the sa_server_option() stored procedure with the 'RememberLastStatement' property:

    CALL sa_server_option( 'RememberLastStatement', 'on' );
  • When connected with the SQL Anywhere Console Utility, change the setting directly in the options ( File > Options... 😞

Once you have 'Remember Last Statement' enabled on the database server, new statements that arrive to the database server from connections will start to be tracked.

---

Once you're connected with the Console Utility, you can then add in the 'laststatement' column for connections to see these statements (File > Options... > Connection Viewer > 'laststatement' 😞

You can then see the active SQL statements in the console (updated as per the connection refresh settings as shown above):

Regards,

Jeff Albion

SAP Active Global Support

JasonHinsperger
Advisor
Advisor
0 Kudos

Application profiling allows you to log profiling data to a different server as part of the setup/configuration.

http://dcx.sybase.com/index.html#sa160/en/dbusage/perform-s-4379192.html

Application profiling does have a performance impact, anywhere from 5-25% depending on the options used when it is enabled.

If you want to, on an ad-hoc basis, see what is happening in a server, you can connect via DBISQL and procedures like sa_conn_info and sa_conn_activity to see what is happening

DocCommentXchange

http://dcx.sybase.com/index.html#sa160/en/dbreference/sa-conn-activity-system-procedure.html*d5e75330

If you turn on the RememberLastStatement option for the server ( "CALL sa_server_option('RememberLastStatement','ON');" ) you can also see the last statement executed by each connection. eg.

SELECT *, DB_NAME( DBNumber ),

  CONNECTION_PROPERTY( 'LastStatement', Number )

  FROM sa_conn_info( );