maxsize information

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?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott PletcherSenior DBACommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
pma111Author Commented:
Thanks scott
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.