Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2003
    Location
    Malaysia
    Posts
    3

    Arrow Unanswered: automatic dump the log file

    my sybase always log file full and cause the lock sleep. can any please tell mw how to solve this problem? thanks

  2. #2
    Join Date
    Nov 2002
    Posts
    833
    define a threshold procedure and deploy it

    something like this:

    set nocount on
    go

    use <mydb>
    go

    print "start: adding threshold on <mydb>.logsegment, freepages 15360"
    print " = 15 percent free page threshold from 102400 pages"
    print "result:"
    go
    sp_addthreshold <mydb>, logsegment, 15360, sp_thresholdaction
    go


    where sp_thresholdaction is something like this:

    CREATE PROC sp_thresholdaction @dbname varchar(30),
    @segmentname varchar(30),
    @free_space int,
    @status int

    as
    declare @name sysname,
    @spid smallint
    exec sp__dumptran_truncate @dbname

    select @spid=p.spid, @name=l.name
    from master..sysprocesses p, master..syslogshold h, master..syslogins l
    where p.spid = h.spid and l.suid = p.suid and h.spid != 0
    print "Aelteste aktive Transaktion hat die spid '%1!' und wurde gestartet von '%2!' ",
    @spid, @name

Posting Permissions

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