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
Solved

Temporarly Disable Database - SQL Management Studio Express

Posted on 2007-03-31
7
271 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 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
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 
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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Re-appearing SQL Server Agent jobs 7 29
SSMS Opening Mode 9 19
SQL Syntax Grouping Sum question 7 26
RESTORE MASTER DATABASE -- NOW 2 20
Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

860 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