call us on 0870 10 10 150
print this page icon Print page | email to a friend icon Email to friend
What we do
Free Newsletter

Sign up now for our FREE newsletter and get all the latest tips and newsletter signuptechnology news plus exclusive info on our latest money saving offers.


Latest News from i-Zimbra

How to restore a Sharepoint database

Thursday, March 12th, 2009

Let’s consider a Sharepoint 3 server failure scenario.  The server has failed and after the hardware fault has been fixed a bare metal restore using Backup Exec fails to get the server up and running in it’s original state.  Or the server comes back up but Sharepoint still isn’t working and restoring sharepoint using backup agents doesn’t work either.  Hmm, not looking great is it.  However if you have the content database (or databases if you are running multiple sites) then there is another method that you can try.

To restore a Sharepoint database file into a new web application you may wish to do a fresh install of Sharepoint to make sure you have a clean system, it’s up to you, but once you can use Sharepoint Central Administration you can try the following: -

1.  Using Sharepoint Central Administration create a new wep application and virtual server.  Let’s say it is called ‘intranet’

2.  Once the new web application is ready, create a site collection (it doesn’t matter which template) and test that it is working and available in a browser

3.  Now, using Sharepoint Central Administration, delete the content database that has just been created for the new web application

4.  Open a terminal command prompt window  (start - run - ‘cmd’ - ok) and change directory to the following path: -    ‘cd  c:\program files\common files\microsoft shared\web server extentions\12\bin’

5.  From this directory execute the following command: -

    stsadm -o addcontentdb -url http://intranet:80 -databasename STS_Server1_878787564 -databaseserver Server1\MICROSOFT##SSEE

    This command will add the content database to the new web application called ‘intranet’. Lets take a closer look at the command arguments: -

    1.  http://intranet:80 is the name of the web application url and the port number it is responding to

    2.  STS_Server1_878787564 is the name of the .mdf database file which is probably in an SQL directory like: -    ‘c:\Program Files\Microsoft SQL Server\MSSQL$SHAREPOINT\Data’

    3.  Server1\Microsoft##SE is the server name and the name of the SQL Server instance that is running the sharepoint databases.  You can find the latter by looking at the name of the server ‘Windows Internal Database’ and see what instance name has been appended to it. eg.  ‘Windows Internal Database (MICROSOFT##SE)’

      If the content database file is consistent, all being well, once the stsadm command has finished all the original content will now be available in your new web application.

      So using stsadm is a route to restore a sharepoint database when all you have is the content database.

      Are you having trouble restoring a Sharepoint database?  Why not contact us.


      Reply to this post using the form below

      Comment Spam Protection by WP-SpamFree

      See also:


      What to do Next

      phone boxWhy not find out more about what we can do to help you and your business today?

      To contact i-Zimbra, simply call us on 0870 770 6989 or email us now.


      Bookmark or share this page with your friends easily using this button:

      Bookmark and Share
      Enquire Online

      Interested in our services? Leave a message and we'll get back to you as soon as possible.







      What our clients say
      Working with i-Zimbra is great because they know how we need to have our sites built. As a web marketing company ourselves, it is vital that our sites look great and are web standards compliant.
      Katherine Dawson
      Marketing Director - Strategy Consulting

      » Read all client testimonials


      Let us call you back
      Let us call you back

      When would you like us to call?


      i-Zimbra Ltd. Registered office: 21 Alexandra Villas, Brighton. BN1 1RF. Company registered in England No. 4216505. Tel 0870 10 10 150 | Fax 0870 10 10 151
      Copyright © i-Zimbra Ltd 2008. All rights reserved. Privacy | Terms and Conditions | Disclaimer
      Home | About us | FAQs | Glossary | Contact | Web Design | SEO | I.T. Consultancy | Hardware & Software Products | I.T. Support | Network Design & Installation | Case Studies | Our Partners | Specialisations | Our Associates | Expertise