Does an OFFLINE Database use space?












0















I took my SQL Server Database OFFLINE. Is it still occupying the same space as when it was ONLINE?



Should I keep it OFFLINE or is it better to BACKUP the database and DROP it?










share|improve this question









New contributor




pds is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • Having no idea what your actual goals are, the only answer is, “I don’t know.”

    – Aaron Bertrand
    3 hours ago











  • Make it occupy Wall Street, may be?

    – mustaccio
    3 hours ago











  • At my new work location, i have seen few databases as OFFLINE so just curious If it's occupying space if we are not going to use it so is it better to take backup and store somewhere .bak file so at least we can free up some space as it's taking few hundred GB of space?

    – pds
    3 hours ago
















0















I took my SQL Server Database OFFLINE. Is it still occupying the same space as when it was ONLINE?



Should I keep it OFFLINE or is it better to BACKUP the database and DROP it?










share|improve this question









New contributor




pds is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • Having no idea what your actual goals are, the only answer is, “I don’t know.”

    – Aaron Bertrand
    3 hours ago











  • Make it occupy Wall Street, may be?

    – mustaccio
    3 hours ago











  • At my new work location, i have seen few databases as OFFLINE so just curious If it's occupying space if we are not going to use it so is it better to take backup and store somewhere .bak file so at least we can free up some space as it's taking few hundred GB of space?

    – pds
    3 hours ago














0












0








0








I took my SQL Server Database OFFLINE. Is it still occupying the same space as when it was ONLINE?



Should I keep it OFFLINE or is it better to BACKUP the database and DROP it?










share|improve this question









New contributor




pds is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












I took my SQL Server Database OFFLINE. Is it still occupying the same space as when it was ONLINE?



Should I keep it OFFLINE or is it better to BACKUP the database and DROP it?







sql-server storage offline






share|improve this question









New contributor




pds is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




pds is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 2 mins ago









Peter Vandivier

1,0271622




1,0271622






New contributor




pds is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 3 hours ago









pdspds

1




1




New contributor




pds is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





pds is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






pds is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.













  • Having no idea what your actual goals are, the only answer is, “I don’t know.”

    – Aaron Bertrand
    3 hours ago











  • Make it occupy Wall Street, may be?

    – mustaccio
    3 hours ago











  • At my new work location, i have seen few databases as OFFLINE so just curious If it's occupying space if we are not going to use it so is it better to take backup and store somewhere .bak file so at least we can free up some space as it's taking few hundred GB of space?

    – pds
    3 hours ago



















  • Having no idea what your actual goals are, the only answer is, “I don’t know.”

    – Aaron Bertrand
    3 hours ago











  • Make it occupy Wall Street, may be?

    – mustaccio
    3 hours ago











  • At my new work location, i have seen few databases as OFFLINE so just curious If it's occupying space if we are not going to use it so is it better to take backup and store somewhere .bak file so at least we can free up some space as it's taking few hundred GB of space?

    – pds
    3 hours ago

















Having no idea what your actual goals are, the only answer is, “I don’t know.”

– Aaron Bertrand
3 hours ago





Having no idea what your actual goals are, the only answer is, “I don’t know.”

– Aaron Bertrand
3 hours ago













Make it occupy Wall Street, may be?

– mustaccio
3 hours ago





Make it occupy Wall Street, may be?

– mustaccio
3 hours ago













At my new work location, i have seen few databases as OFFLINE so just curious If it's occupying space if we are not going to use it so is it better to take backup and store somewhere .bak file so at least we can free up some space as it's taking few hundred GB of space?

– pds
3 hours ago





At my new work location, i have seen few databases as OFFLINE so just curious If it's occupying space if we are not going to use it so is it better to take backup and store somewhere .bak file so at least we can free up some space as it's taking few hundred GB of space?

– pds
3 hours ago










2 Answers
2






active

oldest

votes


















2














An OFFLINE database is indeed still occupying space on disk. You can verify this by finding the location of the database files with a quick peek at sys.master_files and then navigating in windows explorer to the directory location.



select * 
from sys.master_files
where database_id = db_id('my_offline_db');


If it's not bothering you, then there's no need to drop the database. You might run into some maintenance processes that don't play nice with an offline database, but it's a matter of preference whether you modify these processes to gracefully handle and offline database or you remove the offline db from your instance.



If you choose to drop the database to free up disk space, you will need to remember to manually delete the files afterwards. If you want to quickly browse some reasons why you might keep the offline database around, this ServerFault question is a good read.






share|improve this answer































    0














    The answer to this question depends upon why that database was taken offline in the first place.



    Get a confirmation for the reasons of it's being taken offline followed by any company or vendor policy which needs db to be offline say for x days and then can be dropped entirely from the instance.



    You can check from various scripts online though when it was taken offline. You can get an idea I'd that is sitting there for too long doing nothing but eating up unwanted space. So answer is more from your side of researching to do on that db being taken offline.






    share|improve this answer
























    • Thanks and I agreed with you completely. My concern was to verify that offline DB eating up unwanted space as if we are not going to use it so just take a backup, store somewhere else and drop the DBs.

      – pds
      2 hours ago











    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "182"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });






    pds is a new contributor. Be nice, and check out our Code of Conduct.










    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f227605%2fdoes-an-offline-database-use-space%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2














    An OFFLINE database is indeed still occupying space on disk. You can verify this by finding the location of the database files with a quick peek at sys.master_files and then navigating in windows explorer to the directory location.



    select * 
    from sys.master_files
    where database_id = db_id('my_offline_db');


    If it's not bothering you, then there's no need to drop the database. You might run into some maintenance processes that don't play nice with an offline database, but it's a matter of preference whether you modify these processes to gracefully handle and offline database or you remove the offline db from your instance.



    If you choose to drop the database to free up disk space, you will need to remember to manually delete the files afterwards. If you want to quickly browse some reasons why you might keep the offline database around, this ServerFault question is a good read.






    share|improve this answer




























      2














      An OFFLINE database is indeed still occupying space on disk. You can verify this by finding the location of the database files with a quick peek at sys.master_files and then navigating in windows explorer to the directory location.



      select * 
      from sys.master_files
      where database_id = db_id('my_offline_db');


      If it's not bothering you, then there's no need to drop the database. You might run into some maintenance processes that don't play nice with an offline database, but it's a matter of preference whether you modify these processes to gracefully handle and offline database or you remove the offline db from your instance.



      If you choose to drop the database to free up disk space, you will need to remember to manually delete the files afterwards. If you want to quickly browse some reasons why you might keep the offline database around, this ServerFault question is a good read.






      share|improve this answer


























        2












        2








        2







        An OFFLINE database is indeed still occupying space on disk. You can verify this by finding the location of the database files with a quick peek at sys.master_files and then navigating in windows explorer to the directory location.



        select * 
        from sys.master_files
        where database_id = db_id('my_offline_db');


        If it's not bothering you, then there's no need to drop the database. You might run into some maintenance processes that don't play nice with an offline database, but it's a matter of preference whether you modify these processes to gracefully handle and offline database or you remove the offline db from your instance.



        If you choose to drop the database to free up disk space, you will need to remember to manually delete the files afterwards. If you want to quickly browse some reasons why you might keep the offline database around, this ServerFault question is a good read.






        share|improve this answer













        An OFFLINE database is indeed still occupying space on disk. You can verify this by finding the location of the database files with a quick peek at sys.master_files and then navigating in windows explorer to the directory location.



        select * 
        from sys.master_files
        where database_id = db_id('my_offline_db');


        If it's not bothering you, then there's no need to drop the database. You might run into some maintenance processes that don't play nice with an offline database, but it's a matter of preference whether you modify these processes to gracefully handle and offline database or you remove the offline db from your instance.



        If you choose to drop the database to free up disk space, you will need to remember to manually delete the files afterwards. If you want to quickly browse some reasons why you might keep the offline database around, this ServerFault question is a good read.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 2 hours ago









        Peter VandivierPeter Vandivier

        1,0271622




        1,0271622

























            0














            The answer to this question depends upon why that database was taken offline in the first place.



            Get a confirmation for the reasons of it's being taken offline followed by any company or vendor policy which needs db to be offline say for x days and then can be dropped entirely from the instance.



            You can check from various scripts online though when it was taken offline. You can get an idea I'd that is sitting there for too long doing nothing but eating up unwanted space. So answer is more from your side of researching to do on that db being taken offline.






            share|improve this answer
























            • Thanks and I agreed with you completely. My concern was to verify that offline DB eating up unwanted space as if we are not going to use it so just take a backup, store somewhere else and drop the DBs.

              – pds
              2 hours ago
















            0














            The answer to this question depends upon why that database was taken offline in the first place.



            Get a confirmation for the reasons of it's being taken offline followed by any company or vendor policy which needs db to be offline say for x days and then can be dropped entirely from the instance.



            You can check from various scripts online though when it was taken offline. You can get an idea I'd that is sitting there for too long doing nothing but eating up unwanted space. So answer is more from your side of researching to do on that db being taken offline.






            share|improve this answer
























            • Thanks and I agreed with you completely. My concern was to verify that offline DB eating up unwanted space as if we are not going to use it so just take a backup, store somewhere else and drop the DBs.

              – pds
              2 hours ago














            0












            0








            0







            The answer to this question depends upon why that database was taken offline in the first place.



            Get a confirmation for the reasons of it's being taken offline followed by any company or vendor policy which needs db to be offline say for x days and then can be dropped entirely from the instance.



            You can check from various scripts online though when it was taken offline. You can get an idea I'd that is sitting there for too long doing nothing but eating up unwanted space. So answer is more from your side of researching to do on that db being taken offline.






            share|improve this answer













            The answer to this question depends upon why that database was taken offline in the first place.



            Get a confirmation for the reasons of it's being taken offline followed by any company or vendor policy which needs db to be offline say for x days and then can be dropped entirely from the instance.



            You can check from various scripts online though when it was taken offline. You can get an idea I'd that is sitting there for too long doing nothing but eating up unwanted space. So answer is more from your side of researching to do on that db being taken offline.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered 3 hours ago









            KASQLDBAKASQLDBA

            5,18361943




            5,18361943













            • Thanks and I agreed with you completely. My concern was to verify that offline DB eating up unwanted space as if we are not going to use it so just take a backup, store somewhere else and drop the DBs.

              – pds
              2 hours ago



















            • Thanks and I agreed with you completely. My concern was to verify that offline DB eating up unwanted space as if we are not going to use it so just take a backup, store somewhere else and drop the DBs.

              – pds
              2 hours ago

















            Thanks and I agreed with you completely. My concern was to verify that offline DB eating up unwanted space as if we are not going to use it so just take a backup, store somewhere else and drop the DBs.

            – pds
            2 hours ago





            Thanks and I agreed with you completely. My concern was to verify that offline DB eating up unwanted space as if we are not going to use it so just take a backup, store somewhere else and drop the DBs.

            – pds
            2 hours ago










            pds is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            pds is a new contributor. Be nice, and check out our Code of Conduct.













            pds is a new contributor. Be nice, and check out our Code of Conduct.












            pds is a new contributor. Be nice, and check out our Code of Conduct.
















            Thanks for contributing an answer to Database Administrators Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f227605%2fdoes-an-offline-database-use-space%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            الفوسفات في المغرب

            Four equal circles intersect: What is the area of the small shaded portion and its height

            جامعة ليفربول