Solved

filegrowth settings

Posted on 2014-11-11
2
82 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 47

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 47

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Creating and Managing Databases with phpMyAdmin in cPanel.
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.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

773 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