Solved

changing the location of mdf and ldf files in MSSQL2005

Posted on 2009-07-09
2
327 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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

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…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
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.
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.

739 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