Results 1 to 4 of 4

Thread: clear syslogs

  1. #1
    Join Date
    Jul 2006
    Posts
    7

    Unanswered: clear syslogs

    friends
    anyone has idea to clear content in 'syslogs' table of sybase?

    i know that any operation to 'syslogs' table will result in filling complete database as the update will be recursive.

    tx
    Guru...

  2. #2
    Join Date
    Sep 2002
    Location
    Sydney, Australia
    Posts
    255
    This has got to be Development. You really need to understand how logging works, and how to administer the transaction log (syslogs). RTF Sys Admin Guide. Try:
    Code:
    dump transaction <db> to <fs_file>
    ... there are several options, it depends on how you set up your site, you recovery needs and therefore your recovery regimen, etc., which you need to think about and implement first.

    Also refer to: http://www.dbforums.com/showthread.php?t=1604945

    Your second para is just the final warning from the Table Ref Manual, to prevent people who have no experience or understanding of the product, from attempting to delete/update syslogs directly, and thus further injuring themselves. The idea is (just like any other command) you do not clear syslogs directly, Sybase manages it and clears it when you dump the transaction log.

    Cheers
    Derek Asirvadem
    Senior Sybase DBA/Information Architect derekATsoftwaregemsDOTcomDOTau
    Anything worth doing is worth doing Right The First Time
    Spend your money on standards-compliant development or spend 10 times more fixing it

  3. #3
    Join Date
    Jul 2006
    Posts
    7
    Hi
    Thanks for info. I have tried dump tran. but still there are the same number of rows present in syslogs as it was before dump tran.

  4. #4
    Join Date
    Sep 2002
    Location
    Sydney, Australia
    Posts
    255
    Guru Ji

    Yes, this is not surprising, it depends on the circumstances. I will provide two possibilities (of many):
    1 If you read the thread as per link provided above, you will have understood that only the Inactive portion of syslogs is dumped; what is left is Active, and cannot be dumped. You will need to commit or rollback all Active transactions, before expecting a "small" Active portion.

    2 Look at syslogshold instead. This will also tell you about any
    a long-running transactions and
    b large transactions.
    The latter is the result of thoughtless (innocent or ignorant of recoverability requirements) updates to the db, and the bane (requires manual labour) of DBAs. Managing virtually everything else in Sybase can be automated (scripts, thresholds, etc).
    The syslogs table is fixed length (logsegment size) and circular (after it reaches the end, it continues writing at the begining; when it reaches an Active record is it "full" and further writes to syslogs are suspended). The number of rows used is not particularly meaningful. What's relevant is the
    Code:
    Free
    space on syslogs/logsegment, not the number of rows. To ascertain the free space on syslogs, use either
    Code:
    sp_helpdb
    or
    Code:
    sp_helpsegment logsegment
    Cheers
    Derek Asirvadem
    Senior Sybase DBA/Information Architect derekATsoftwaregemsDOTcomDOTau
    Anything worth doing is worth doing Right The First Time
    Spend your money on standards-compliant development or spend 10 times more fixing it

Posting Permissions

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