Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

what can cause file growth in data file (other than autogrow % formula)  when there is less/no data activity?

Posted on 2016-08-29
5
Medium Priority
?
46 Views
Last Modified: 2016-09-16
the data growth setting on the data file is 10%
looking at sysfiles system view, there is plenty of unused space yet in the data file.
current data file size 460 GB, used space 370GB, free 90GB.

we wanted to keep the data file size to 410GB since data growth is relatively slow on this database.

so i shrunk the file to 410GB which worked fine.
but today, i see that the file has grown back to 460 GB.

so obviously it has grown more than 10%, and data usage is still @ 370 GB.

what could cause more than 10% growth?
0
Comment
Question by:25112
  • 3
  • 2
5 Comments
 
LVL 40

Expert Comment

by:lcohan
ID: 41774797
Do you have any scheduled jobs/tasks against that DB that are using maybe some staging tables to "load" data then delete it?

Or do you have some maintenance plan to Rebuild Indexes? as this is also growing MDF file(s).
0
 
LVL 5

Author Comment

by:25112
ID: 41774967
there are 4 jobs.. will check in them how they handle..

only inserts are a concern in this context, right? not deletes?
0
 
LVL 40

Expert Comment

by:lcohan
ID: 41774976
INSERTs primarily indeed however a UPDATE in sql is done as an implicit INSERT/DELETE so I'm not sure yet whats happening on on large batch updates so I need to test it.
Also rebuild indexes will definitely grow it.
0
 
LVL 5

Author Comment

by:25112
ID: 41776590
>>Also rebuild indexes will definitely grow it.
yes, one job is rebuilding.

so It makes the data file to bloat and then brings it back to normal range, right?
0
 
LVL 40

Accepted Solution

by:
lcohan earned 2000 total points
ID: 41798452
"so It makes the data file to bloat and then brings it back to normal range, right?"

A SQL datbase file will not "shrink" on is own unless the "Autoshrink" database option is enabled which is totally not recommend.
The T-log file will grow during the index rebuild to a specific size and my advice is to leave it like that because if you shrink it is will just grow again next time your rebuild index will run but make sure you have regular backup T-log jobs so the space inside the T-log is constantly reclaimed for use.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After restoring a Microsoft SQL Server database (.bak) from backup or attaching .mdf file, you may run into "Error '15023' User or role already exists in the current database" when you use the "User Mapping" SQL Management Studio functionality to al…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question