Does an OFFLINE Database use space?
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
New contributor
add a comment |
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
New contributor
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
add a comment |
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
New contributor
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
sql-server storage offline
New contributor
New contributor
edited 2 mins ago
Peter Vandivier
1,0271622
1,0271622
New contributor
asked 3 hours ago
pdspds
1
1
New contributor
New contributor
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
add a comment |
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
add a comment |
2 Answers
2
active
oldest
votes
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.
add a comment |
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.
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
add a comment |
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.
add a comment |
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.
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.
answered 2 hours ago
Peter VandivierPeter Vandivier
1,0271622
1,0271622
add a comment |
add a comment |
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.
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
add a comment |
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.
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
add a comment |
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.
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.
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
add a comment |
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
add a comment |
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.
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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