Showing posts with label Microsoft SQL. Show all posts
Showing posts with label Microsoft SQL. Show all posts

Monday, July 9, 2012

Restore content DBs to another SQL server

 

1) Find the content Database

Open SharePoint Central Admin->Application Management->Site Collection List

2) Backup the content database


You could alternatively detach it, and copy it. Just doing a backup in SQL Server 2005/2008 Management studio is easier.

3) Restore content database to new server
Copy the BAK file to new server. Create an empty DB in Management Studio, restore from backup, you may need to change an option in the “options” tab of the restore dialog to get it to work. (Overwrite db).

4) Create Web App on new Server

Central Admin->Application Management->Create or extend Web App->Create New Web App.

5) Associate restored DB with new Web App


Open SharePoint Central Admin->Application Management->SharePoint Web Application Management->Content Databases->Remove Content Database from your new web app.

Now use STSADM to add restored DB to this web app

c:\program files\common files\microsoft shared\web server extentions\12(14)\bin on new server is where you can find the STSADM.

run this command from there.
stsadm -o addcontentdb -url http://yourwebapp:port -databasename yourcontentdb -databaseserver yoursqlserver

6) Run ISSRESET from command prompt

Move SharePoint to another SQL Server

 

  1. Stop any processes that might be accessing your SharePoint databases
  2. Back up all your SharePoint databases on SQL A.
  3. Restore them on SQL B.
  4. Set up a SQL alias on SharePoint that points SQL A to SQL B

Stop any processes that might be accessing your SharePoint databases

Open services.msc and stop:

· SharePoint 2010 Administration

· SharePoint 2010 Timer

· SharePoint Server Search 14

· SharePoint Tracing

· World Wide Web Publishing Service

Check your actual database server in Central Admin and be sure that you are using a SQL alias.

(a SQL alias can be made by using the CLICONFG-command)

clip_image002

Check which databases are being used by SharePoint within Central Admin

clip_image003

Backup all these databases on SQL server A (SQLCluster) with SQL Management Studio

Put all databases on Offline after making the SQL Backup

Copy all BAK-files (SQL Backup files) to the new SQL server

Set up a SQL alias on SharePoint that points SQL A to SQL B (Start-Run-cliconfg)

clip_image004

Enter the same SQL Server alias but change the connection parameters to the new servername\instancename