Solved

Attach DB from storage drive

Posted on 2008-06-09
4
762 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 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

As technology users and professionals, we’re always learning. Our universal interest in advancing our knowledge of the trade is unmatched by most industries. It’s a curiosity that makes sense, given the climate of change. Within that, there lies a…
A company’s centralized system that manages user data, security, and distributed resources is often a focus of criminal attention. Active Directory (AD) is no exception. In truth, it’s even more likely to be targeted due to the number of companies …
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how the fundamental information of how to create a table.

733 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