Moving SharePoint Data Files to Different Location

Current Situations:
When SharePoint installed, all the data/log files are kept in default (C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data) location. Now the data is growing and C Drive is running out of space.

Move the data/log files to a drive where you have lot’s of space

1. Backup your entire database which you’re planning to move
2. Turn off SharePoint Services

Office SharePoint Search Service
Windows SharePoint Services Administration
Windows SharePoint Services Search
Windows SharePoint Services Timer
Windows SharePoint Services Tracing
World Wide Web Publishing Service



3. Detach the databases



Leave all the settings as it is and click OK to detach the database

4. Copy your data/log files from current location and move to destination drive

5. Reattach your databases
Attrach Database in SQL Server

Click add to select the files

Attrach Database in SQL Server Add Files

Click Add and select the location where you moved your database files


once you’re select your database files, Click OK to attach

6. Test your site and if everything’s works fine you can delete the files from old location

7. Start all the services which you stopped.

Published by Aryan Nava

Founder of "BlockchainMind", CTO for two Blockchain startup during 2018, Cloud/DevOps Consultant and Blockchain Trainer

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: