Solved

filegrowth settings

Posted on 2014-11-11
2
81 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 46

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 46

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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Many companies are looking to get out of the datacenter business and to services like Microsoft Azure to provide Infrastructure as a Service (IaaS) solutions for legacy client server workloads, rather than continuing to make capital investments in h…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

861 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now