?
Solved

Attach DB from storage drive

Posted on 2008-06-09
4
Medium Priority
?
768 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
[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
  • 2
  • 2
4 Comments
 
LVL 8

Accepted Solution

by:
sbagireddi earned 2000 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
In this article, I’ll look at how you can use a backup to start a secondary instance for MongoDB.
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

777 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