Solved

changing the location of mdf and ldf files in MSSQL2005

Posted on 2009-07-09
2
322 Views
Last Modified: 2012-05-07
I have installed the database files (.mdf files) in D:/ drive. My D:/ drive has gone full and I need to change the location of the .mdf location. Currently I am not able to do it SQL2005. Please share the procedures.
I have installed the database files (.mdf files) in D:/ drive. My D:/ drive has gone full and I need to change the location of the .mdf location. Currently I am not able to do it SQL2005. Please share the procedures

Open in new window

0
Comment
Question by:Karthi_devaraj
[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 Comments
 
LVL 6

Accepted Solution

by:
rpassero earned 500 total points
ID: 24815168
0
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 24815173
here is an example

ALTER DATABASE AdventureWorks
MODIFY FILE (NAME = AdventureWorks_Data, FILENAME = 'D:\SQLData\AdventureWorks_Data.mdf');
ALTER DATABASE AdventureWorks
MODIFY FILE (NAME = AdventureWorks_Log, FILENAME = 'D:\SQLData\AdventureWorks_Log.ldf');
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
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…
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

735 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