DBCC Shrinkdatabase run every week?

  • SQLRNNR (4/29/2015)


    Steve Vassallo (4/29/2015)


    Our company was just acquired by another. They DBA team there added some jobs to our servers and one was a DBCC Shrinkdatabase command followed by a DBCC Reindex command. These are SQL Server VM's. I know in the past that running of the DBCC ShrinkDatabase constantly was a bad thing. Does this still apply to VM's? Should this command be run on a scheduled job once a week? This is coming from the Database Manager at our new company.

    Thanks

    Steve

    It's been said nicely.

    I'll be blunt that these maintenance practices are piss poor. Whether physical or virtual, you should not be performing these tasks. I would have this crap ripped off the server and the DBA that put it there put under probation. They need to be taught and they need to have their eyes opened wide.

    I was going to recommend borrowing my clue bat (the hickory one with the lead core), but I thought I'd try the nice approach first. Ha!

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Grant Fritchey (4/29/2015)


    SQLRNNR (4/29/2015)


    Steve Vassallo (4/29/2015)


    Our company was just acquired by another. They DBA team there added some jobs to our servers and one was a DBCC Shrinkdatabase command followed by a DBCC Reindex command. These are SQL Server VM's. I know in the past that running of the DBCC ShrinkDatabase constantly was a bad thing. Does this still apply to VM's? Should this command be run on a scheduled job once a week? This is coming from the Database Manager at our new company.

    Thanks

    Steve

    It's been said nicely.

    I'll be blunt that these maintenance practices are piss poor. Whether physical or virtual, you should not be performing these tasks. I would have this crap ripped off the server and the DBA that put it there put under probation. They need to be taught and they need to have their eyes opened wide.

    I was going to recommend borrowing my clue bat (the hickory one with the lead core), but I thought I'd try the nice approach first. Ha!

    Problem with the clue bat is that the recipients will be closing their eyes (though it could be fun for the person giving the clue buahahaha).

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • I suggest sending a copy of Brad McGhee's Maintenance Plan book https://www.simple-talk.com/books/sql-books/brads-sure-guide-to-sql-server-maintenance-plans/[/url] to each and every DBA in that team, especially the manager!

    Or any other recommended book on Maintenance Plans.:-D

  • SQLRNNR (4/29/2015)


    It's been said nicely.

    I'll be blunt that these maintenance practices are piss poor. Whether physical or virtual, you should not be performing these tasks. I would have this crap ripped off the server and the DBA that put it there put under probation. They need to be taught and they need to have their eyes opened wide.

    +1000.

    Touche, Jason. I admit it...I was trying to be nice...perhaps too nice. I agree wholeheartedly - they're crap. They're unreliable SSIS packages that brute-force everything they do with no intelligence. In short, they suck.

    I've not had to work with VMs, so I only know the physical side of it, but I don't see how it would be any different.

    Do they get the beginner going at first? Yes.

    Should the servers remain that way for long? No.

    Should someone more experienced being setting the server up at first and teaching someone else how to do it? Yes.

    Steve: Please pursue this with your management. If you were just bought by another company, then perhaps you can affect change in the larger parent company if you have a superior approach at the local level.

  • This is coming from the Database Manager at our new company.

    That seems to have been missed. Sadly it is MANAGEMENT/LEADERSHIP that is forcing these ridiculous requirements, not some Jr. DBA!! :angry: I don't think the lead-cored hickory clue bat will work on management. :crying:

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • TheSQLGuru (4/30/2015)


    This is coming from the Database Manager at our new company.

    That seems to have been missed. Sadly it is MANAGEMENT/LEADERSHIP that is forcing these ridiculous requirements, not some Jr. DBA!! :angry: I don't think the lead-cored hickory clue bat will work on management. :crying:

    Well, we have to agree on the meaning of the word "work." Cause it'll work. It just might not work. Know what I mean?

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • TheSQLGuru (4/30/2015)


    This is coming from the Database Manager at our new company.

    That seems to have been missed. Sadly it is MANAGEMENT/LEADERSHIP that is forcing these ridiculous requirements, not some Jr. DBA!! :angry: I don't think the lead-cored hickory clue bat will work on management. :crying:

    If the hickory won't work because they're management, that means that a highly-paid consultant would work. 😉

  • Ed Wagner (4/30/2015)


    TheSQLGuru (4/30/2015)


    This is coming from the Database Manager at our new company.

    That seems to have been missed. Sadly it is MANAGEMENT/LEADERSHIP that is forcing these ridiculous requirements, not some Jr. DBA!! :angry: I don't think the lead-cored hickory clue bat will work on management. :crying:

    If the hickory won't work because they're management, that means that a highly-paid consultant would work. 😉

    In which case, I know some consultants that can fix this problem quite nicely. 😉

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • SQLRNNR (4/30/2015)


    Ed Wagner (4/30/2015)


    TheSQLGuru (4/30/2015)


    This is coming from the Database Manager at our new company.

    That seems to have been missed. Sadly it is MANAGEMENT/LEADERSHIP that is forcing these ridiculous requirements, not some Jr. DBA!! :angry: I don't think the lead-cored hickory clue bat will work on management. :crying:

    If the hickory won't work because they're management, that means that a highly-paid consultant would work. 😉

    In which case, I know some consultants that can fix this problem quite nicely. 😉

    Hey, I was first on that bandwagon!! 😀 Oh, wait, I'm not "highly-paid"! :ermm:

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • TheSQLGuru (4/30/2015)


    SQLRNNR (4/30/2015)


    Ed Wagner (4/30/2015)


    TheSQLGuru (4/30/2015)


    This is coming from the Database Manager at our new company.

    That seems to have been missed. Sadly it is MANAGEMENT/LEADERSHIP that is forcing these ridiculous requirements, not some Jr. DBA!! :angry: I don't think the lead-cored hickory clue bat will work on management. :crying:

    If the hickory won't work because they're management, that means that a highly-paid consultant would work. 😉

    In which case, I know some consultants that can fix this problem quite nicely. 😉

    Hey, I was first on that bandwagon!! 😀 Oh, wait, I'm not "highly-paid"! :ermm:

    :hehe:

    FTR - same thing I said earlier applies to the DBAs putting this crap on servers and using the manager as an excuse. It is their job to educate the manager and not do something so stupid.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • More gas for the fire. Four hour transaction log backups. I am assuming data loss of 4 hours or less is acceptable which is amazing to me. Again I am being removed from the DBA role and assuming a new role. I am trying to initiate change or shed light without ruffling feathers.

  • Steve Vassallo (4/30/2015)


    More gas for the fire. Four hour transaction log backups. I am assuming data loss of 4 hours or less is acceptable which is amazing to me. Again I am being removed from the DBA role and assuming a new role. I am trying to initiate change or shed light without ruffling feathers.

    In and of itself, this doesn't necessarily mean something bad.

    Some databases or business RPO and RTO allow for a 4hr window. This really should be documented.

    The better practice on this is to ensure that every database has an appropriate tlog backup schedule. Some databases can be in simple, some may just require hourly log backups, some every 15 minutes. It comes down to an evaluation of the business requirements and how much skin the DBA wants to lose in the event of a database outage.

    But I bet they are using the maint plans for tlog backups just like they used for shrink and index rebuilds.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Steve Vassallo (4/30/2015)


    More gas for the fire. Four hour transaction log backups. I am assuming data loss of 4 hours or less is acceptable which is amazing to me. Again I am being removed from the DBA role and assuming a new role. I am trying to initiate change or shed light without ruffling feathers.

    Yep. That's the definitive answer. "We're willing to lose up to 4 hours."

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Steve, sorry for your loss. It sounds like knee-jerk and brain-dead. Applying a blanket solution with no good reason is terrible.

    Often folks that have had issues with log growth on databases are alarmed at the file sizes. Once the log growth is controlled a shrink of the log portion might be OK.

    OK everybody else check me on this. SQL server is a bit vulnerable during a shrink operation. A full backup should be done right before it. If not then be prepared to know where all the backups since the last full till now reside. If something goes bad during the shrink then a restore is likely to be needed.

    Usually SQL Server does a wonderful job of reusing pages. So if you have a lot of pages that are unused then SQL Server will use those pages rather than grow the file. One of the things that a shrink can do is to move all of the used pages toward the front of the file and drop the unused space at the end of the file.

    I know that I'm not being real specific here but there are a number of options to shrinks and I don't have specifics about what is actually being run.

    You might inquire if the DBAs that wrote these plans have a background with Access. That often required a Repair/Compact to avoid it losing its way.

    ATBCharles Kincaid

  • The shrink and regrow will result in these files becoming more and more fragmented.

    All I can suggest is that you start providing statistics around the fragmentation of the database files at the filesystem level. The contig utility from SysInternals will show the fragmentation per file for a folder.

    These people obviously understand that fragmentation is bad. That's why they're defragmenting the indexes!

Viewing 15 posts - 16 through 30 (of 33 total)

You must be logged in to reply to this topic. Login to reply