Results 1 to 5 of 5

Thread: Session Trace

  1. #1
    Join Date
    Oct 2004
    Posts
    2

    Unanswered: Session Trace

    I'd like to see all sql commands sent by my application to the sybase server.
    I have seen command like dbcc traceon but could not find the detailed syntax.
    May be there is a way to get the list sql commands on client side?
    (app is running on SUN , does not use ODBC/JDBC)

  2. #2
    Join Date
    Oct 2004
    Posts
    4
    Hi! You cannot capture all the SQL text sent by the client to the server without any external utility like RIBO or some third party software (Quest SQL Tuning tool has a SQL Inspector functionality that can do the job). But, you can do the following to capture the sql that is currently being executed by a SPID.
    dbcc traceon(3604)
    go
    dbcc sqltext(give_the_spid)
    go

  3. #3
    Join Date
    Oct 2004
    Posts
    2

    Question

    I tried RIBO. It works fine if I'm using isql for simple queries.
    It also works with my test application if I run it without -t (turn off real time translation)
    But if I enable translation than it throuws exception and my app hangs .



    java.lang.NullPointerException
    at com.sybase.tds.SrvErrorToken.dumpDetails(SrvErrorT oken.java)
    at com.sybase.tds.SrvInfoToken.dump(SrvInfoToken.java )
    at com.sybase.ribo.DumpTds.dumpObject(DumpTds.java:63 1)
    at com.sybase.ribo.DumpTds.dumpToken(DumpTds.java:314 )
    at com.sybase.ribo.DumpTds.processTds(DumpTds.java:21 6)
    at com.sybase.ribo.AnalyzeThread.run(AnalyzeThread.ja va:39)
    java.lang.NullPointerException
    at com.sybase.tds.SrvErrorToken.dumpDetails(SrvErrorT oken.java)
    at com.sybase.tds.SrvInfoToken.dump(SrvInfoToken.java )
    at com.sybase.ribo.DumpTds.dumpObject(DumpTds.java:63 1)
    at com.sybase.ribo.DumpTds.dumpToken(DumpTds.java:314 )
    at com.sybase.ribo.DumpTds.processTds(DumpTds.java:21 6)
    at com.sybase.ribo.AnalyzeThread.run(AnalyzeThread.ja va:39)
    java.io.IOException: Bad record header
    at com.sybase.ribo.CaptureInputStream.readRecordFromF ile(CaptureInputStr
    eam.java:363)
    at com.sybase.ribo.CaptureInputStream.readNextRecord( CaptureInputStream.
    java:328)
    at com.sybase.ribo.CaptureInputStream.getSource(Captu reInputStream.java:
    290)
    at com.sybase.ribo.DumpTds.processTds(DumpTds.java:13 6)
    at com.sybase.ribo.AnalyzeThread.run(AnalyzeThread.ja va:39)
    java.lang.NullPointerException
    at com.sybase.tds.SrvErrorToken.dumpDetails(SrvErrorT oken.java)
    at com.sybase.tds.SrvInfoToken.dump(SrvInfoToken.java )
    at com.sybase.ribo.DumpTds.dumpObject(DumpTds.java:63 1)
    at com.sybase.ribo.DumpTds.dumpToken(DumpTds.java:314 )
    at com.sybase.ribo.DumpTds.processTds(DumpTds.java:21 6)
    at com.sybase.ribo.AnalyzeThread.run(AnalyzeThread.ja va:39)
    java.lang.NullPointerException
    at com.sybase.tds.SrvErrorToken.dumpDetails(SrvErrorT oken.java)
    at com.sybase.tds.SrvInfoToken.dump(SrvInfoToken.java )
    at com.sybase.ribo.DumpTds.dumpObject(DumpTds.java:63 1)
    at com.sybase.ribo.DumpTds.dumpToken(DumpTds.java:314 )
    at com.sybase.ribo.DumpTds.processTds(DumpTds.java:21 6)
    at com.sybase.ribo.AnalyzeThread.run(AnalyzeThread.ja va:39)
    java.io.IOException: Bad record header
    at com.sybase.ribo.CaptureInputStream.readRecordFromF ile(CaptureInputStr
    eam.java:363)
    at com.sybase.ribo.CaptureInputStream.readNextRecord( CaptureInputStream.
    java:328)
    at com.sybase.ribo.CaptureInputStream.getSource(Captu reInputStream.java:
    290)
    at com.sybase.ribo.DumpTds.processTds(DumpTds.java:13 6)
    at com.sybase.ribo.AnalyzeThread.run(AnalyzeThread.ja va:39)



    Is there any known issues and workarounds with the ribo.
    I tried to experiment with the filter settings but id did not help.

  4. #4
    Join Date
    Oct 2004
    Posts
    1
    Hi,

    have you thought of using 'auditing' for capturing your sql commands?

    It is quite easy, you need to create the database sybsecurity and run the install script for auditing. (see your manual for details).
    After that you activate a special auditing feature called "sqlcmd" for the user your app logs into sybase.

    cheers,
    crweller

  5. #5
    Join Date
    Oct 2004
    Posts
    1
    Hi,

    have you thought of using 'auditing' for capturing your sql commands?
    It comes with sybase and you do not need an 3rd party software.

    It is quite easy, you need to create the database sybsecurity and run the install script for auditing. (see your manual for details).
    After that you activate a special auditing feature called "sqlcmd" for the user your app logs into sybase.

    cheers,
    crweller

Posting Permissions

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