Solved

filegrowth settings

Posted on 2014-11-11
2
84 Views
Last Modified: 2014-11-26
1) Can I ask if there's an easy way to query in a single SQL statement, a database size, and its file-growth configuration (i.e. size/percentage.

2) How do the filegrowth settings work - for example if you don't set a max-size for a database - how do you know when the next growth increment will occur?

3) If you have configured a maxsize - is there any way to run an SQL query to list the maxsize of the DB and how far off the current size of the DB is to that maxsize?
0
Comment
Question by:pma111
  • 2
2 Comments
 
LVL 48

Expert Comment

by:Vitor Montalvão
ID: 40434642
1) sp_helpdb 'DatabaseName'
2) It only grows when it fills the file. If you have an history of the file growth then you can try to guess when the next grow will occur.
3) You need to calculate by yourself or using any 3rd-tool that will do that for you.
0
 
LVL 48

Accepted Solution

by:
Vitor Montalvão earned 500 total points
ID: 40434646
You can also work a little bit on the next code:
SELECT d.name, f.physical_name, f.name, f.type_desc, f.size, f.max_size, f.growth, f.is_percent_growth
FROM sys.master_files f
	INNER JOIN sys.sysdatabases d 
		ON f.database_id=d.dbid

Open in new window

0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Access 2016 Query with Proper Case logic 2 36
Solar Winds can't see SQL Server Express 17 35
Query for timesheet application 3 20
Amazon RDS Server load 2 17
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how the fundamental information of how to create a table.

828 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