Solved

Attach DB from storage drive

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

706 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