Monday

How to move SharePoint Content Databases between different storage media within the same SQL Server

This was a solution that I came across when this client of mine needed to free up some space on his SharePoint test environment.

He was running a VM Ware setup and he had run out of space on the C: drive wherein his SQL server was holding his DB files.

I was able to create new drives on the VMWare SQL server wherein the DB files will be kept. Then I created an empty DB (stats_db). This was an “insurance policy” that I wanted to use just in case I loose the site collections if I had to move the content database.

Steps

  1. Create a new drive or identify your new storage media.
  2. In the SQL database create a new database from the Microsfot SQL Server Management Studio.


Right click on Database and select New Database, name it “New_db”

  1. Goto the SharePoint Central Admin >Application Management > Content Databases> and add this database as a content database to the web application you will be moving its content database.


Add the “New_Db” to the Database name and click OK

  1. Remove the old/previous content database.

  1. Then detach the old/previous content database from the SQL server.


  1. Copy the detached Db files (LDF & MDF)to the new media storage.
  2. Reattach the Content database from the new location

Browse to the new location and attach the copied database.

  1. Add the newly attached Db to the web application just like you added the “New_Db”.
  2. Do iisreset.
  3. Test the web application and voila! – this works

SharePoint Recycle Bin


Never ignore your waste bin, it might save you 10days of work and sleepless nights.

Right under my desk i've got a nice little recycle bin, daily i drop in waste, unneeded paper and faulty CDs that didnt copy files as I wanted, but before I drop that stuff, I double check if it needs to be binned!

Over the last week, a client was having issues with restoring a deleted site from backups.

The site was mistakenly deleted by the site admin, and he wanted it back in 10days.

Now, where did that site go? The inhouse SharePoint admin guy gave me a call, breathing heavily...what can you do to help me get out of this predicament. Quite reassuring i sounded. Oh, Steve Jobs no worries I can get you your sites.

I requested for his backups, he didnt have them but had secondary backups eslewhere. He got them for me.

I setup his Db files on a test environment, got them into the SQL server and created a new farm. Got SUSHI to backup and restore the sites. Now while doing this, I remembered my waste bin.


Ohh what a time waster, it has been in the Recycle bin all this while.

The delete sites were kept in the recycle bin temporarily for 30days, so you can restore them if you make a wrong move.


Also I had write a review on the permissions given to SuperUsers/Site Admins such that there are new levels of Site Admin, this means you can have Super Site Admin wherein a normal site admin would not have permission to delete sites except he has the permission to do it.