Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2003
    Posts
    10

    Unanswered: Logging all SQL statements (optimization)

    Hello.

    We are running Sybase Adaptive Server 11.9.2.4.

    We use it rather heavily and sometimes it is a bottleneck. Therefore, we want to optimize it. The configuration of Sybase itself seems ok. In fact, it is amazing what it can do. The SQL statements passed by our many Java clients to the Sybase server might not be very effficient, though.

    So, what we want to do is log the SQL statements passed to the Sybase server along with the execution times (start and end times).

    How is this done?

    We hava a lot of clients accessing the Sybase server. Augmenting these clients with logging capabilities is a difficult task. Also, it seems naturnal to add the logging centrally at the Sybase server.

    Any help would be appreciated - and, I think, of general use to those wanting to optimize their use of Sybase.

    Thanks,

    Morten

  2. #2
    Join Date
    Feb 2002
    Location
    Willy is on vacation
    Posts
    1,208
    Check out the auditing feature available. BUt if you are looking for per tuning client code, then auditing might be a bit too overwhelming. In addition the java clients connecting through JDBC mostly send stored proc to the server into the tempdb.

  3. #3
    Join Date
    Apr 2003
    Posts
    10

    Audit System

    Ah, yes, quite right. Thanks.

    The keyword "auditing" helped me find the info I needed.

    For other readers, Sybase server contains an entire Audit System (assuming you have installed it...) that allows you to audit (monitor) pretty much all activity in the server. Nice. For more information, see Appendix C of "Sybase SQL Server 11 Unleashed" by Ray Pankins etc.

    Morten

  4. #4
    Join Date
    Sep 2003
    Location
    London
    Posts
    3

    Cool

    Hi,
    Set "enable cis" to 1 then enable traceflag 11202. This will cause all commands for all sessions to be written to the errorlog. Neat, but watch your disk space as your errorlog can seriously grow if lots of clients doing loads of stuff...
    GSi

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •