Results 1 to 10 of 10
  1. #1
    Join Date
    Jan 2006
    Posts
    28

    Unanswered: Weird Problem With Log files.

    Can someone explain to me why when I would run
    Code:
    dbcc shrinkfile (casino_log, 1000)
    It would not work. I first had to do
    Code:
    BACKUP LOG casino WITH TRUNCATE_ONLY
    then when I ran the dbcc shrinkfile command it worked. Just wanting to know why I had to do it this way?

  2. #2
    Join Date
    Jan 2004
    Location
    In a large office with bad lighting
    Posts
    1,040
    BOL would be an excellent place to read about transaction log segments. Index transaction logs and click on active portion ... that's a nioce place to start.

    -- This is all just a Figment of my Imagination --

  3. #3
    Join Date
    Jan 2006
    Posts
    28
    stupid question what is BOL. Never heard of it.

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    BOL is an acronym that is frequently used online for SQL Server Books Online, which are installed as standard client tools and also as web pages for both SQL 2000 and SQL 2005.

    -PatP

  5. #5
    Join Date
    Jan 2006
    Posts
    28
    Thanks Never thought about the correlation between the two. I have read about the statements on Books on line but still I am unsure as to why I had to run the backup log. But I will look again. Thanks.

  6. #6
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    It is likely from your description that your database is currently in FULL recovery mode. If it is not important to the users to be able to restore this database to a point in time (so they do not lose a day's worth of work for a 5:00PM DB crash), you could put this database in SIMPLE recovery mode. If the users want the recoverability (or if you want to go above and beyond), you will have to set up regular log backups.

  7. #7
    Join Date
    Jan 2006
    Posts
    28
    I think that was the problem I just got assigned to manage our databases. So there were never any log backups performed. Which I have corrected. The database is in full backup mode because it deals with customers. I got all my SQL servers on a backup plan using the database maintenance plan. One last Question. Since I got them on a maintenance plan that backs up both the database (daily) and transaction logs ( every 3 hours) will I experience this again or is there a chance.

    Sorry for so many questions. I just got thrown into this job so I am starting my journey as a DBA kind of quickly with out much training.

  8. #8
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    No problem with many questions. We have many answers. Of course, most of them start with "it depends...".

  9. #9
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Don't worry, most of us remember those days with varying degrees of revulsion. It seems that most DBAs get started via the "trial by fire" method, and the really good ones survive more-or-less unscathed. Welcome to the party!

    When dealing with log files, there is always some chance of runaway growth. You can manage things so that the risk is negligable, and it sounds like you've managed to do that already. You need to keep an eyeball on the size of the log file for a bit (the length of that bit depends on how cyclic your changes to the database may be, for some databases you might need to watch it for as long as a year, but those are exceptions).

    -PatP

  10. #10
    Join Date
    Jan 2006
    Posts
    28
    Thanks Will do that. Also got a couple of books yesterday so Hopefully that will keep me busy and learning for a while. Thanks everyone for the input and help. Sure I will have more questions to come.

Posting Permissions

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