?
Solved

maxsize information

Posted on 2014-08-05
2
Medium Priority
?
296 Views
Last Modified: 2014-08-05
1) Is is possible to query SQL 2005 to see if any databases have a maxsize set? could you provide a syntax? ideally with how much free space is left until the DB hits that maxsize..

2) Is it only the database you set a maxsize for or is the same done for log files? If log files can the query above be tweaked to cover both?

3) If you do set a maxsize for a database - what would ultimately happen if the admin wasnt monitoring remaining space and it hit that maxsize and the admin hadnt added more capacity to the max size?

4) if you don't have a maxsize set, is the only real thing to worry about in terms of space management the free space on the drive on which the databases reside?
0
Comment
Question by:pma111
2 Comments
 
LVL 70

Accepted Solution

by:
Scott Pletcher earned 2000 total points
ID: 40242006
1)  Yes, using view sys.database_files.

SELECT size / 128.0 as size_mb, max_size as max_size / 128.0 as max_size_mb, (max_size - size) / 128.0 as remaining_size_mb, ...
FROM sys.database_files
...
2) Logs too; same as above.
3) SQL would abort some or all modifications, such as DELETE, INSERT and/or UPDATE.
4) Yes
0
 
LVL 3

Author Comment

by:pma111
ID: 40242074
Thanks scott
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone 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

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
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 SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Suggested Courses

862 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