?
Solved

filegrowth settings

Posted on 2014-11-11
2
Medium Priority
?
88 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 51

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 51

Accepted Solution

by:
Vitor Montalvão earned 2000 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

Does Your Cloud Backup Use Blockchain Technology?

Blockchain technology has already revolutionized finance thanks to Bitcoin. Now it's disrupting other areas, including the realm of data protection. Learn how blockchain is now being used to authenticate backup files and keep them safe from hackers.

Question has a verified solution.

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

In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
In this article, we’ll look at how to deploy ProxySQL.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

743 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