Solved

How to Move SharePoint 2010 Databse to a New Volume on Same Server?

Posted on 2011-03-02
5
580 Views
Last Modified: 2012-05-11
Hey Everyone,

I want to move my SharePoint 2010 content database to a new RAID volume with more disk space for future expansion. However, I'm not as well versed in SQL as I should be and I'm not entirely sure how to correctly move the SharePoint database from one volume to another on the same server.

The only support I've found on TechNet was an article about moving the database from one server in a farm to another server in the same farm. However, I'm running my SharePoint installation in standalone mode with default installation settings currently. At the moment the database is fairly small (about 350MB) as its a new installation.

If anyone can provide any help with this I would really appreciate it!

Thanks!!!

0
Comment
Question by:Telecomm
5 Comments
 
LVL 5

Expert Comment

by:Chris-Vielife
ID: 35018336
If you can get some down time.

follow this guide.

http://msdn.microsoft.com/en-us/library/ms345483.aspx

--------------------------
How ever in a live environment you may need to dismount the Content DB from the web application. Then remount when back up.

Cheers
0
 

Expert Comment

by:MDIT
ID: 35018446
You could use the DETACH/ATTACH method.  This method detaches the database from SQL Server, then you copy the files to their new home & re-attach the database.  Here is some example code:

USE master;
ALTER DATABASE AdventureWorks SET OFFLINE WITH ROLLBACK IMMEDIATE
GO

EXEC sp_detach_db @dbname = N'AdventureWorks'
GO

<Go off & copy your files to their new home, say F:\SQLFiles>

USE master;
GO
CREATE DATABASE AdventureWorks
    ON (FILENAME = 'F:\SQLFiles\AdventureWorks_Data.mdf'),
    (FILENAME = 'F:\SQLFiles\AdventureWorks_Log.ldf')
    FOR ATTACH;
GO
ALTER DATABASE AdventureWorks SET ONLINE
GO

The files would be in their new location at this point.
Note that the database will be unavailable, so you will have to schedule an outage if this is in production.
0
 
LVL 6

Accepted Solution

by:
sabby447 earned 500 total points
ID: 35020368
I am a admin person thus hate to do it with queries, The best bet is to move the files using management studio, I think 2010 by default uses SQL 2008 R2 express (Limit is 10 GB for Databases) , You can use management studio to detach/attach easily by right clicking database name and selecting tasks and detach and then attaching back by right click on databases root and select attach from the new locatoin

Hope this helps
0
 

Author Comment

by:Telecomm
ID: 35029391
This may be a ridiculously stupid question, but which database(s) should I be moving over to make sure everything is on the right volume? When I load up Management Studio and connect I get a list of 30+ databases as shown in the attached screen shot. I just want to make sure this is done correctly...

Also - downtime is not an issue as this is in a very limited evaluation deployment pending this database' move (at which time I'm taking it company wide).

Thanks again for the clarification!!
SharePoint-Database-List.JPG
0
 
LVL 6

Assisted Solution

by:sabby447
sabby447 earned 500 total points
ID: 35029834
You can move everything if you would want, The best is to move user database (Just leave the system databases in the above screenshot and rest you can move to another volume)

Hope this helps
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

A procedure for exporting installed hotfix details of remote computers using powershell
A safe way to clean winsxs folder from your windows server 2008 R2 editions
This tutorial will show how to push an installation of Backup Exec to an additional server in both 2012 and 2014 versions of the software. Click on the Backup Exec button in the upper left corner. From here, select Installation and Licensing, then I…
This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…

816 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now