Solved

Temporarly Disable Database - SQL Management Studio Express

Posted on 2007-03-31
7
255 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
  • 4
  • 3
7 Comments
 
LVL 142

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 142

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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 142

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 142

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

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.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
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

863 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

21 Experts available now in Live!

Get 1:1 Help Now