Results 1 to 4 of 4

Thread: transaction log

  1. #1
    Join Date
    Apr 2003
    Location
    Washington DC area
    Posts
    1,770

    Question Unanswered: transaction log

    Is there code for shrinking the transaction log? I need to add it to a job with a alert.

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Dbcc Shrinkfile
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  3. #3
    Join Date
    Apr 2003
    Location
    Washington DC area
    Posts
    1,770

    Angry Transaction log

    I found the shrink command But I get this error message

    Command:
    BACKUP LOG wslogdb62 WITH TRUNCATE_ONLY
    DBCC SHRINKFILE(wslogdb62_log,1)


    Error:
    Server: Msg 8985, Level 16, State 1, Line 2
    Could not locate file 'wslogdb62_log' in sysfiles.
    DBCC execution completed. If DBCC printed error messages, contact your system administrator.

  4. #4
    Join Date
    Jun 2002
    Location
    Hoffman Estates, IL
    Posts
    14
    Try:

    BACKUP LOG wslogdb62 WITH TRUNCATE_ONLY
    GO

    USE wslogdb62

    DBCC SHRINKFILE(wslogdb62_log,1)

Posting Permissions

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