Step by Step Guide for Migrate SharePoint’s SQL Server to ... · Step by Step Guide for Migrate...

13
Step by Step Guide for Migrate SharePoint’s SQL Server to another SQL Server December 2013 (Please consult http://www.katprotech.com/Articles.html for the latest version of this paper)

Transcript of Step by Step Guide for Migrate SharePoint’s SQL Server to ... · Step by Step Guide for Migrate...

Page 1: Step by Step Guide for Migrate SharePoint’s SQL Server to ... · Step by Step Guide for Migrate SharePoint’s SQL Server to another SQL Server December 2013 ... Microsoft .NET

Step by Step Guide for Migrate SharePoint’s SQL Server to another SQL Server December 2013

(Please consult http://www.katprotech.com/Articles.html for the latest version of this paper)

Page 2: Step by Step Guide for Migrate SharePoint’s SQL Server to ... · Step by Step Guide for Migrate SharePoint’s SQL Server to another SQL Server December 2013 ... Microsoft .NET

ABOUT KATPROTECHNOLOGIES:

Katpro Technologies is an advanced technology firm offering specialized services in Microsoft SharePoint Consulting, Microsoft .NET based IT development and Cloud based solutions. We work on emerging technologies in the Microsoft Platform providing customers with high performance and comprehensive solutions. We adapt ourselves to changing business needs and deliver our customers with high performance solutions that are relevant, futuristic, and scalable. SharePoint 2010 is all about Collaboration, Portals, Social Computing, Knowledge Management, Governance, Search and Document Management. Microsoft SharePoint 2010 enables far better collaboration and helps people work together so that you can set up website, share information, publish reports and help your company respond to changing business needs. Comprehensive business solutions can be easily assembled to support a company’s information management and business needs. Why Us? 2 3 Focus Technology startup with SharePoint focus. We specialize in SharePoint solution consulting, strategies for 2010 migration, implementation of intranet and internet facing solutions, web content management, and collaboration portals and specialized training solutions. Expertise Dedicated team of highly skilled and performance oriented team with technical expertise in Microsoft Technologies. Commitment Founders have immense technical background and experience working in top IT outsourcing companies in varied roles and responsibilities.

Page 3: Step by Step Guide for Migrate SharePoint’s SQL Server to ... · Step by Step Guide for Migrate SharePoint’s SQL Server to another SQL Server December 2013 ... Microsoft .NET

Steps for Move all databases from one database server to another database server

1. Prepare the new database server. 2. Close all open SharePoint Management Shell windows. 3. Stop all services that are related to SharePoint 2013 and Internet Information Services (IIS). 4. Detach the databases from the current SQL Server instance. 5. Copy or move all files that are associated with the databases (.mdf, .ndf, and .ldf), to the new

destination server that runs SQL Server. 6. Make sure that all of the SQL Server logins, fixed server roles, fixed database roles, and

permissions for the databases are configured correctly on the new destination database server. 7. Attach the databases to the new destination server that runs SQL Server. 8. Use SQL Server connection aliases to point to the new database server and update all web

servers. 9. Restart all services that you stopped in step 3.

Design and Configuration methods for Storage and database of SharePoint 2013

1. Gather storage and SQL Server space and I/O requirements 2. Choose SQL Server version and edition 3. Design storage architecture based on capacity and I/O requirements 4. Estimate memory requirements 5. Understand network topology requirements 6. Configure SQL Server 7. Validate and monitor storage and SQL Server performance 8. SQL Server 2012 for SharePoint Server 2013

Page 4: Step by Step Guide for Migrate SharePoint’s SQL Server to ... · Step by Step Guide for Migrate SharePoint’s SQL Server to another SQL Server December 2013 ... Microsoft .NET

SharePoint’s SQL Server to another SQL Server This is a step by step guide on how you migrate your SharePoint’s SQL Server to another server. There are only 9 steps to perform this task. Following are the steps. The Steps are:

1. Stop all SharePoint and IIS Related Services 2. Stop IIS 3. Detach all related SQL Server databases 4. Move all database files (.mdf, .ldf, and .ndf) to the new server. 5. Set up same user permissions on the new SQL server 6. Attach your databases to the new SQL Server 7. Verify what ports your New SQL is using 8. Go to your SharePoint server and create your SQL Server Alias 9. Start all your SharePoint services, now you have successfully migrated your

database.

1. Stop all SharePoint and IIS Related Services

• SharePoint 2010 Administration • SharePoint 2010 Timer • SharePoint 2010 Tracing • SharePoint 2010 User Code Host • SharePoint 2010 VSS Writer • SharePoint Foundation Search V4 • World Wide Web Publishing Service • SharePoint Server Search 14 • Web Analytics Data Processing Service • Web Analytics Web Service

Page 5: Step by Step Guide for Migrate SharePoint’s SQL Server to ... · Step by Step Guide for Migrate SharePoint’s SQL Server to another SQL Server December 2013 ... Microsoft .NET

2. Stop IIS At the command prompt under admin context, type iisreset /stop3. Detach all related SQL Server databases

• Configuration database • Central Administration content database • Content databases • Service application databases

i.e. Bdc_Service_DB_xxxxxxxxxxxxxx SharePoint_AdminContent_xxxxxxxxxxxxx SharePoint_Config WSS_Content WSS_Logging WSS_Search_xxxxxxxxxxxxxx

Stop and start IIS

There are two ways you can stop and restart IIS: from a DOS command line or from Windows.

From a DOS command line

• To stop IIS, at the DOS command prompt, type,

iisreset /stop

• To restart it, type

iisreset /start

.

From Windows

1. Click Start and point to Programs. Point to Administrative Tools, and then click Computer Management.

2. Expand Services and Applications. 3. Expand Internet Information Services. 4. Right click Default Web Site, and select Stop or Start.

Page 6: Step by Step Guide for Migrate SharePoint’s SQL Server to ... · Step by Step Guide for Migrate SharePoint’s SQL Server to another SQL Server December 2013 ... Microsoft .NET
Page 7: Step by Step Guide for Migrate SharePoint’s SQL Server to ... · Step by Step Guide for Migrate SharePoint’s SQL Server to another SQL Server December 2013 ... Microsoft .NET

4. Move all database files (.mdf, .ldf, and .ndf) to the new server. Place it in the data folder of the SQL Server instance of the new host.

5. Set up same user permissions on the new SQL server

best way to do this is when you use AD accounts is by scripting the users on the old server and running that script on the new server. If you are not using AD accounts then you will have issues with passwords so best way to do that is to follow this -> http://support.microsoft.com/kb/918992

6. Attach your databases to the new SQL Server

Page 8: Step by Step Guide for Migrate SharePoint’s SQL Server to ... · Step by Step Guide for Migrate SharePoint’s SQL Server to another SQL Server December 2013 ... Microsoft .NET

7. Verify what ports your New SQL is using If it’s using a dynamic port change it to static. To do this go to SQL Server Configuration Manager and into the SQL Server Network Configuration Section choose the instance you will be using. Go to the TCP/IP section and if TCP Dynamic Ports are set to 0 (zero) then remove that and assign a static port into the TCP Port Section on all IP’s. For this sample we will be using 14330 <- notice I just added 0 at the end from the default port. Note that as we will need that on the next section also if you changed the port number from dynamic to static you will need to restart your SQL Server before it can take effect.

Page 9: Step by Step Guide for Migrate SharePoint’s SQL Server to ... · Step by Step Guide for Migrate SharePoint’s SQL Server to another SQL Server December 2013 ... Microsoft .NET

8. Go to your SharePoint server and create your SQL Server Alias

If SQL Configuration Manager is installed just head over to the SQL Native Client 10.0 configuration then into Aliases. Create a new alias that points to your new SQL Server by right clicking on the Alias. You need to do this on both 32 and 64 bit instances.

Page 10: Step by Step Guide for Migrate SharePoint’s SQL Server to ... · Step by Step Guide for Migrate SharePoint’s SQL Server to another SQL Server December 2013 ... Microsoft .NET

• On the Alias name put your old SQL Server IP or Name • On the Port the port you indicated on step 7, in this case 14330 • Protocol should be TCP/IP • And on Server the new SQL Server IP or Name together with its instance name if there is

any. In our case it’s SQL2012

Page 11: Step by Step Guide for Migrate SharePoint’s SQL Server to ... · Step by Step Guide for Migrate SharePoint’s SQL Server to another SQL Server December 2013 ... Microsoft .NET

if you don’t have SQL Configuration Manager in your SharePoint Server then run the CLICONFIG again on both 32 and 64 bit instances. For 32 bit go to run command and execute this “%SystemRoot%/SysWow64/CliConfg.exe” and for 64 just this “CLICONFG” all without quotes of course. Add the same info as above.

Page 12: Step by Step Guide for Migrate SharePoint’s SQL Server to ... · Step by Step Guide for Migrate SharePoint’s SQL Server to another SQL Server December 2013 ... Microsoft .NET

9. Start all your SharePoint services, now you have successfully migrated your database.

• SharePoint 2010 Administration • SharePoint 2010 Timer • SharePoint 2010 Tracing • SharePoint 2010 User Code Host • SharePoint 2010 VSS Writer • SharePoint Foundation Search V4 • World Wide Web Publishing Service • SharePoint Server Search 14 • Web Analytics Data Processing Service • Web Analytics Web Service

At the command prompt under admin context, type iisreset /start.

Page 13: Step by Step Guide for Migrate SharePoint’s SQL Server to ... · Step by Step Guide for Migrate SharePoint’s SQL Server to another SQL Server December 2013 ... Microsoft .NET

Steps for moving SharePoint Content Database to a New Server 1. Document database security configuration. 2. Prepare target SQL server. 3. Prepare the SharePoint servers. 4. Detach databases on the source SQL server. 5. Move databases to the target SQL server. 6. Attach databases to the target SQL server. 7. Reassign the DBO of the databases. 8. Point SharePoint servers to the target SQL Server or instance. 9. Restart SharePoint services.