Change default location for SharePoint Database files: .mdf .ldf

Change default location for SharePoint Database files: .mdf .ldf

  • Comments 2
  • Likes

When installing SharePoint, you may have decided you want to keep your data files for the database on a separate directory / drive.  However, you need to keep in mind that the SharePoint installer is going to create the databases for you automatically. 

To change where the config and content databases are created, you need to change the default file location within SQL Server itself prior to installation. After doing that, when you install SharePoint, it will create the databases in the appropriate locations, one of your choosing.  

To change the default location for the SharePoint databases:

  1. Open SQL Server Management Studio.  Right Click on your server name and select Properties

    image

  2. Select the Database Settings page.  Change the directory path for the Data files and the Log files.

    image



note: I have had one instance where they didn't... After scratching my head a little bit, a reboot of the SharePoint server resolved the issue.  I guess there was a connection still open. 

 

- Dan

Comments
  • For some reason SharePoint ignored this when I set it.

  • Try to restart the SQL Service after change the location and then run the SharePoint Config Wizard.

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment