Solved

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

Posted on 2011-03-02
5
579 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

863 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

27 Experts available now in Live!

Get 1:1 Help Now