Home > SQL Server Tips > Database Management and Administration > Avoid database auto-resizing to resolve access dilemmas
SQL Server Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

DATABASE MANAGEMENT AND ADMINISTRATION

Avoid database auto-resizing to resolve access dilemmas


Serdar Yegulalp, Contributor
04.11.2006
Rating: -4.00- (out of 5)


Expert advice on database administration
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


When a data file is created in a SQL Server database, the file's autogrowth factor is set by default: Files are set to grow by 10% of their size whenever they're close to running out of free space -- and they are set to grow in an unrestricted fashion. For modestly sized databases (a few megabytes), this isn't a problem. For databases that grow to be gigabytes in size, this growth model can cause problems, which from the outside look like connectivity issues.

Let's assume you have a 10 GB database file that is used aggressively and is set to grow by 10%. Whenever it runs low on room, SQL Server has to lock all operations to that database and add space on the file. Ten percent of 10 GB is 1 GB. It takes a fair amount of time to allocate that much space on a disk, even on a fast system. What makes the percentile growth model even more problematic is that each successive growth will take a little longer -- 10% of 11 GB is 1.1 GB and so on. Think about the growth requirements for a database that has 50 GB or more and you'll quickly see where this leads.

Eventually, the growth periods become so long that the lack of accessibility for the database during that time becomes noticeable. Any attempts to access the database in question are either held up significantly or time out completely. To people who don't know what's really happening on the back end, it will seem like a connection issue. The problem is exacerbated if you have multiple databases on the same physical drive that do this. Even if those databases resize at different times, the larger ones can slow things down terribly.

The most basic way to prevent this from happening is not to use a percentile growth model on databases that are multiple gigabytes in size. I have a number of databases that grow very aggressively on my SQL Server installation, which are eventually trimmed back (the data is exported for archiving). I use the grow-by-megabytes properties for those files rather than grow-by-percentages. For most files, a 1 MB growth allocation should be more than enough, since 1 MB allocates very quickly and keeps the total growth of the file down to a manageable level.

About the author: Serdar Yegulalp is editor of the Windows Power Users Newsletter. Check it out for the latest advice and musings on the world of Windows network administrators -- and please share your thoughts as well!

More information from SearchSQLServer.com

  • Fast Guide: Controlling access to SQL Server
  • Tip: Access SQL Server securely using Windows domain accounts>
  • Tip: Research best practices for SQL Server access control

  • Rate this Tip
    To rate tips, you must be a member of SearchSQLServer.com.
    Register now to start rating these tips. Log in if you are already a member.




    Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



    RELATED CONTENT
    SQL Server Security
    Password cracking tools for SQL Server
    Meet compliance requirements with improved database security practices
    Hardening the network and OS for SQL Server security
    Securing the server and database in SQL Server
    SQL Server security made simple and sensible
    Blog: Protect your databases from the internal threat
    Setting up SQL Server Service Broker for secure communication
    The keys to database backup protection for SQL Server
    Understanding transparent data encryption in SQL Server 2008
    The fine line between not encrypting your databases and breach notification

    Microsoft SQL Server Performance Monitoring and Tuning
    SQL Server Mailbag: Asymmetric encryption, log shipping issues
    Using traces in SQL Server Profiler
    SQL Server Mailbag: CALs, witnesses and unwanted changes
    SQL Server Mailbag: Data restoration and DB property management
    Working with IntelliSense in SQL Server 2008 Management Studio
    SQL Server Mailbag: Stored procedures, triggers and SSRS reports
    Troubleshooting Distributed Transaction Coordinator errors in SQL Server
    Clearing the Windows page file and its effect on server performance
    Optimizing SQL Server indexes –- even when they're not your indexes
    Performance implications of transaction log autogrowth in SQL Server

    Database Management and Administration
    Password cracking tools for SQL Server
    Using traces in SQL Server Profiler
    Meet compliance requirements with improved database security practices
    Hardening the network and OS for SQL Server security
    Securing the server and database in SQL Server
    How SQL Server 2008 components impact SharePoint implementations
    Troubleshooting Distributed Transaction Coordinator errors in SQL Server
    Achieving high availability and disaster recovery with SharePoint databases
    Clearing the Windows page file and its effect on server performance
    Deploying a SQL Server virtual appliance for Microsoft Hyper-V

    RELATED GLOSSARY TERMS
    Terms from Whatis.com − the technology online dictionary
    data corruption  (SearchSQLServer.com)
    data hiding  (SearchSQLServer.com)

    RELATED RESOURCES
    2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
    Search Bitpipe.com for the latest white papers and business webcasts
    Whatis.com, the online computer dictionary

    DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



    SQL Server Development - .NET, C#, T-SQL, Visual Basic
    HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
    About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
    SEARCH 
    TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

    TechTarget Corporate Web Site  |  Media Kits  |  Site Map




    All Rights Reserved, Copyright 2005 - 2009, TechTarget | Read our Privacy Policy
      TechTarget - The IT Media ROI Experts