maxsize information

Posted on 2014-08-05
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?
Question by:pma111
    LVL 68

    Accepted Solution

    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
    LVL 3

    Author Comment

    Thanks scott

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Suggested Solutions

    If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
    In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
    This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
    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.

    779 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

    17 Experts available now in Live!

    Get 1:1 Help Now