MS SQL Server auto growth

Brian Wilson 21 Reputation points
2021-01-27T00:16:58.137+00:00

What is the trigger to initiate a database auto growth based on the defined auto growth settings? When does auto growth happen on a database?

SQL Server Other
0 comments No comments
{count} votes

Accepted answer
  1. Sean Gallardy - MSFT 1,901 Reputation points Microsoft Employee
    2021-01-27T00:44:23.077+00:00

    What is the trigger to initiate a database auto growth based on the defined auto growth settings? When does auto growth happen on a database?

    These are essentially the same question. The answer is that the database will autogrow when the database storage management is not able to quickly find free space to allocate to the object. This could be for things such as indexes and heaps, text trees, etc., but SQL Server does not try to be exhaustive for space reuse, thus there will always be a little be of unused space depending on the pattern of the workload over the given time period.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. CathyJi-MSFT 22,396 Reputation points Microsoft External Staff
    2021-01-27T02:58:09.377+00:00

    Hi @Brian Wilson ,

    > What is the trigger to initiate a database auto growth based on the defined auto growth settings? When does auto growth happen on a database?

    An auto-growth event is the process by which the SQL Server engine expands the size of a database file when it runs out of space. Database auto-growth include data file auto-growth and log file auto-growth. The data file will grow automatically when SQL Server needs to insert data and there is no more room left in the current file. The transaction log is a wrap-around file as below screenshot. This cycle repeats endlessly, as long as the end of the logical log never reaches the beginning of the logical log. However, if the end of the logical log does reach the start of the logical log, the file is extended by the amount specified in the growth_increment parameter and the new log records are added to the extension. In a summary, when data file do not have enough space to insert data for current file or log file do not have enough space to insert log records for current file, they will grow automatically.

    60747-screenshot-2021-01-27-105707.jpg

    Please refer to When Does Autogrowth Happen For SQL Server Data Files and Transaction Log Physical Architecture to get more information.

    Best regards,
    Cathy


    If the response is helpful, please click "Accept Answer" and upvote it, thank you.

    2 people found this answer helpful.
    0 comments No comments

  2. Abdulhakim M. Elrhumi 356 Reputation points
    2021-01-27T00:30:52.867+00:00

    Hi

    considerations-autogrow-autoshrink

    Process for creating Auto-growth Settings in New-Database
    Users can set the setting of auto-growth by utilizing SQL Server Management Studio while creating the new database. Even these methods can be used in changing the settings of the existing databases.

    While defining the new database, the initial settings for auto-growth are set to default values. These values are recognized by utilizing auto-growth settings on the database files model. The default values can be viewed on the screen of New Database as shown in the image below.60751-growth.png

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.