SCCM DB question

Author Message
Smiley1244

  • Total Posts : 82
  • Scores: 14
  • Reward points : 18270
  • Joined: 6/10/2010
  • Status: offline
SCCM DB question Monday, January 30, 2012 10:20 AM (permalink)
5
[Helpful answer received] / [List Solutions Only]
Hi All,
Firstly I know very little about DB's so please be kind.
We are currently running SCCM 2007 SP2 R3 with FEP 2010 intergrated. SCCM's DB is running on SQL 2005 SP4. This has been running fine (just the normal issues) for over 2 years now.
I am using the SCCM task backup to backup the site to another server.
 
What has me concerned is I happened to look at the Site System Status for the primary site, while the main DB is only 14.5GB, the transaction log size is currently 726.9GB!!? That seems a little excessive to me. Now the server has been busy today so I'm going to monitor it and see if it a) shrinks, b) stabalizes or c) get bigger?!
 
I've been reading up a little and found a lot of people moaning that their transaction logs were over 10GB so I'm guessing something is wrong.
 
Could anyone shed any light on this, is it normal? (I don't think so). Suggestions to reduce or reset the logs? If it's not normal any idea why it's happened?
As always thanks :)

EDIT: As far as I know all the DB settings are STD as set by the initial install, nothing has been manually set. 
 
 
<message edited by Smiley1244 on Monday, January 30, 2012 10:21 AM>
 
#1
    tray_0042

    • Total Posts : 121
    • Scores: 4
    • Reward points : 21860
    • Joined: 1/8/2009
    • Status: offline
    Re:SCCM DB question Monday, January 30, 2012 10:29 AM (permalink)
    0
    Holy crap, that seems really high!!!  I'm looking at mine right now, while my DB is only about 1GB which obviously means your environment is probably much bigger than mine, my transaction log is only about 380MB.  I can't really shed any light on the best way to fix that, only because I'm not really a SQL guy, just wanted to say that does not sound normal at all.
     
    #2
      Smiley1244

      • Total Posts : 82
      • Scores: 14
      • Reward points : 18270
      • Joined: 6/10/2010
      • Status: offline
      Re:SCCM DB question Monday, January 30, 2012 10:31 AM (permalink)
      0
      :) Something similar went through my head when I saw how big it was?!
       
      #3
        tray_0042

        • Total Posts : 121
        • Scores: 4
        • Reward points : 21860
        • Joined: 1/8/2009
        • Status: offline
        Re:SCCM DB question Monday, January 30, 2012 10:35 AM (permalink)
        0
        Here's a thought.....do you have a SQL job running periodically that cleans up the DB, shrinks the logs, etc???  I know that on my Primary Site Server, we have those jobs running every night.
         
        #4
          Smiley1244

          • Total Posts : 82
          • Scores: 14
          • Reward points : 18270
          • Joined: 6/10/2010
          • Status: offline
          Re:SCCM DB question Monday, January 30, 2012 10:44 AM (permalink)
          0
          I have all the task turned on in [Primary > Site Maintenance > Tasks] apart from 'Delete Aged Client Access License Data' and 'Summarize Client Access License Weekly Usage Data'
           
          If you mean a separate task setup to run directly against the SQL itself no, we were told that if we did anything directly with the DB then MS would not support us?!
           
          #5
            tray_0042

            • Total Posts : 121
            • Scores: 4
            • Reward points : 21860
            • Joined: 1/8/2009
            • Status: offline
            Re:SCCM DB question Monday, January 30, 2012 11:12 AM (permalink)
            0
            [This post was marked as helpful]
            No no, you definitely want to have some kind of SQL maintenance job running that cleans up the database.  What you're talking about is in SCCM, you have all of those tasks running including Backup ConfigMgr Site Server.  That stuff is great for SCCM, but for SQL itself you really should have some kind of maintenance job for the DB within SQL.  I've never heard of that being a support issue, I've gotten support on SCCM before.  I don't know if your setup is like mine, mine is Primary Site with SQL 2008 loaded locally on the SCCM box.  If you have a remote SQL DB, maybe that matters.  I'm looking at my SQL 2008 job that runs, it runs once a week and it dose a check data, shrink DB, reorganize index, rebuild index, then a history cleanup.  I'm not a SQL guy myself, but when I was first setting up SCCM, I did some research and everybody I could find said to do this. 
             
            #6
              bmason505

              • Total Posts : 3027
              • Scores: 214
              • Reward points : 55970
              • Joined: 1/23/2003
              • Location: Minneapolis, MN
              • Status: online
              Re:SCCM DB question Monday, January 30, 2012 5:47 PM (permalink)
              0
              This is TRANSACTION LOG for sure, not TEMPDB?  Man, I think that's pretty serious.  All data gets into the DB by way of the TxLog.  Until it writes data there, it cannot commit it to the DB.  Why can't the main DB keep up?  What's slowing it?  A slow disk subsystem?  An AV scanner?  
              Brian Mason
              MCSA\MCSE\MS MVP - ConfigMgr
              http://www.mnscug.org/
               
              #7
                Smiley1244

                • Total Posts : 82
                • Scores: 14
                • Reward points : 18270
                • Joined: 6/10/2010
                • Status: offline
                Re:SCCM DB question Tuesday, January 31, 2012 2:40 AM (permalink)
                0
                Hi Again,
                Right the SQL 2005 is running on the same box as SCCM.
                The SCCM console says' [Site_Name] Transaction Log'
                The main DB also says 'Total: 14.5GB, Free: 315.9MB' but it is set to automatically grow and there is plenty of disk space to grow into.
                 
                Brian, I'll double check the box, but it was originally horribly over spec'd and it never seems to struggle. In fact normally it looks like it's not doing anything :)
                So I think it's a config problem?! . . . maybe.
                I'll ask our DB guys to have a look, they had previously been banned due to the obviously wrong information we'd been given.
                 
                I've attached a screenshot of the settings on the SCCM DB, maybe people could shout back with any differences from their own. Like I said this is a default installation, maybe we missed something in the documentation.

                 
                As always, thanks for your help.
                <message edited by Smiley1244 on Tuesday, January 31, 2012 2:41 AM>
                 
                #8
                  Pvt_Ryan

                  • Total Posts : 293
                  • Scores: 3
                  • Reward points : 69140
                  • Joined: 8/25/2009
                  • Location: Belfast, UK
                  • Status: offline
                  Re:SCCM DB question Tuesday, January 31, 2012 4:22 AM (permalink)
                  0
                  [This post was marked as helpful]
                  Now I am not a DBA as such so this is not gospel but...
                  Transaction Logs, log every write to the DB in order to prevent loss of data in the event of a failure/corruption of the database. These logs should automatically get deleted when ever a backup job has run (to the point at which the job ran of course).
                   
                  Now you have 2 ways to fix this.
                  1. (Recommeneded) Turn OFF transaction logging as SCCM does not support the database being recovered in this way (there is a specific backup job in SCCM Console for the SQL Server iirc)
                  2. Ensure you are backing up the SQL server with a client that will tell the server it has performed the backup and thus allow teh server to delete the logs.
                   
                  Hope that helps.
                   
                  Ryan
                  Citrix Desktop Infrastructure Analyst
                  MCTS: SCCM, CCNA

                  Blog/Site: http://ninet.org
                   
                  #9
                    Smiley1244

                    • Total Posts : 82
                    • Scores: 14
                    • Reward points : 18270
                    • Joined: 6/10/2010
                    • Status: offline
                    Re:SCCM DB question Tuesday, January 31, 2012 8:31 AM (permalink)
                    0
                    Ok, I think I'm getting to the bottom of this now but I'd like to know how we got into this situation.
                    Firstly thanks to everyone for their help.
                    The DB is running in Full recovery not Simple mode, so that 765GB transaction log is all transactions since we put SCCM in!!
                    I've got one of our DBA's to truncate the log files and he has shrunk them down to 10GB (which is still 99% free). So this is now manageable.
                     
                    The last question really is as this was a default install, the SCCM installer set the DB to 'Full recovery' not Simple. Should we have changed this? If so could anyone point out in the documentation where it is?
                    It would seem that the SCCM backup doesn't truncate the logs before backup which makes sense if it should be in Simple mode.
                     
                    If I can find anything in the white papers of MS documentation I will do as Ryan suggested and set to Simple. If it's not in the documentation then I wonder how many other SCCM DB's are out there like ours?!
                     
                    #10
                      skissinger

                      • Total Posts : 4645
                      • Scores: 448
                      • Reward points : 75260
                      • Joined: 9/13/2001
                      • Location: Sherry Kissinger
                      • Status: offline
                      Re:SCCM DB question Tuesday, January 31, 2012 9:01 AM (permalink)
                      0
                      [This post was marked as helpful]
                      I don't know if I can find a white paper for you.  Knowing that the SQL db should be in simple (and not full) is just one of those things that I just "know" from years of working with configmgr.
                      mofmaster@myitforum.com
                      My Blog
                      Microsoft MVP - ConfigMgr
                       
                      #11
                        Smiley1244

                        • Total Posts : 82
                        • Scores: 14
                        • Reward points : 18270
                        • Joined: 6/10/2010
                        • Status: offline
                        Re:SCCM DB question Tuesday, January 31, 2012 9:41 AM (permalink)
                        0
                        Well that's pretty good enough for me. I'll watch till this time next week then change the mode to simple. If anyone does find this written down please post it here.
                         
                        Thanks again to everyone!!
                         
                        #12
                          bmason505

                          • Total Posts : 3027
                          • Scores: 214
                          • Reward points : 55970
                          • Joined: 1/23/2003
                          • Location: Minneapolis, MN
                          • Status: online
                          Re:SCCM DB question Tuesday, January 31, 2012 11:27 AM (permalink)
                          0
                          That explains it.  And I'm not sure the CM docs bother to mention it because you can still restore from a full backup set.  The point of a full for SQL guys is that you could say I need to restore at a certain point in time.  That part CM doesn't do.  So there is no point in doing a full.  Simple also has the benefit of allowing that Txlog to be flushed and get small again.
                          Brian Mason
                          MCSA\MCSE\MS MVP - ConfigMgr
                          http://www.mnscug.org/
                           
                          #13
                            Smiley1244

                            • Total Posts : 82
                            • Scores: 14
                            • Reward points : 18270
                            • Joined: 6/10/2010
                            • Status: offline
                            Re:SCCM DB question Tuesday, January 31, 2012 2:06 PM (permalink)
                            0
                            Thanks Brian, I'll get my new friendly DBA to look at that tomorrow :)
                             
                            #14
                              Online Bookmarks Sharing: Share/Bookmark

                              Jump to:

                              Current active users

                              There are 0 members and 1 guests.

                              Icon Legend and Permission

                              • New Messages
                              • No New Messages
                              • Hot Topic w/ New Messages
                              • Hot Topic w/o New Messages
                              • Locked w/ New Messages
                              • Locked w/o New Messages
                              • Read Message
                              • Post New Thread
                              • Reply to message
                              • Post New Poll
                              • Submit Vote
                              • Post reward post
                              • Delete my own posts
                              • Delete my own threads
                              • Rate post

                              2000-2012 ASPPlayground.NET Forum Version 3.9