Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 345
  • Last Modified:

changing the location of mdf and ldf files in MSSQL2005

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
Karthi_devaraj
Asked:
Karthi_devaraj
1 Solution
 
rpasseroCommented:
0
 
Aneesh RetnakaranDatabase AdministratorCommented:
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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now