Solved

Temporarly Disable Database - SQL Management Studio Express

Posted on 2007-03-31
7
277 Views
Last Modified: 2007-03-31
I was given a laptop and it has sql server installed and a bunch of DB's from the old user, I dont want to delete the db, I just want to temporarly make them unavailable.

0
Comment
Question by:B_Dorsey
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 250 total points
ID: 18828895
ALTER DATABASE db_name SET OFFLINE;
http://msdn2.microsoft.com/en-us/library/ms174269.aspx
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 18828896
alternative, if you want to completely remove them from the list of database, but keep the files:
detach them (you can attach the database later).
I would prefer the OFFLINE, though...
0
 
LVL 14

Author Comment

by:B_Dorsey
ID: 18828927
so htere is no way to just remove read/write permissions? For example I see the northwnd db in there and can access it...
0
Backup Solution for AWS

Read about how CloudBerry Backup fully integrates your backups with Amazon S3 and Amazon Glacier to provide military-grade encryption and dramatically cut storage costs on any platform.

 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 18829002
>so htere is no way to just remove read/write permissions?
you could assign the roles db_denydatareader / db_denydatawriter to all the users in the database...
it depends on what exactly you are trying to achieve...
0
 
LVL 14

Author Comment

by:B_Dorsey
ID: 18829100
i just dont want someone trying to access the data, there are other machines that access the data on that laptop and I wanna stop that and have them approach me to find out what applications are flying around that are dependant on this thing...
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 18829187
so, indeed ensure you put correct logins and appropriate user permissions.
if a login has no mapping in a database (ie a user), that login can do NOTHING in that database.
0
 
LVL 14

Author Comment

by:B_Dorsey
ID: 18829215
sorry for making u go through all this, I think I just want to set offline

thanks for your help

b
0

Featured Post

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
I have a large data set and a SSIS package. How can I load this file in multi threading?
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
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

726 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