Solved

Attach DB from storage drive

Posted on 2008-06-09
4
754 Views
Last Modified: 2010-04-21
Hi, this will probably sound like a noob question.  But I have a server running windows 2003 and I've installed SQL 2005.  On the server I have 70gb on the 'C' drive and 500gb on the 'E' or storage drive.  I've copied a couple of DB's onto the storage drive and would like to attach them to the SQL instance on the 'C' drive.  However, when I go through the management studio object explorer and right click on 'databases' and attach the database .mdf file stored on the 'E' drive I receive the following error:

the file "E:\MSSQL.1\MSSQL\DATA\Test.mdf" is compressed but does not reside in a read-only database or filegroup.  The file must be decompressed.
Could not open new database 'Test'.  CREATE DATABASE is aborted (Microsoft SQL Server, Error 5118)

Is it even possible to store a database on a drive separate to where SQL is installed?
0
Comment
Question by:marcus72
  • 2
  • 2
4 Comments
 
LVL 8

Accepted Solution

by:
sbagireddi earned 500 total points
ID: 21745080

If you are an SA, go to disk management and unclick "compress disk to save space" for the drive that had the .mdf you are trying to attach.
0
 

Author Comment

by:marcus72
ID: 21745140
Thank you sbagireddi, that worked.  Should I leave the admin databases like Master.mdf / msdb.mdf / mssqlsystemresource.mdf on the 'C' drive or can I attach them from the storage drive?
0
 
LVL 8

Expert Comment

by:sbagireddi
ID: 21745202
I would keep them on the C: drive.
0
 

Author Closing Comment

by:marcus72
ID: 31465479
Thank you for your help.
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

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

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Many companies are looking to get out of the datacenter business and to services like Microsoft Azure to provide Infrastructure as a Service (IaaS) solutions for legacy client server workloads, rather than continuing to make capital investments in h…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

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

23 Experts available now in Live!

Get 1:1 Help Now