Sunday 16 December 2018

Migrating existing SharePoint server SQL to another SQL server

Recently I did the SQL server migration for my SharePoint 2010 machine.
My task is to migrate the existing SharePoint 2010 SQL which was pointing to SQL Server 2008 to SQL Server 2016.

For that I followed below steps:
  1. Took the SharePoint web applications database backup from SQL server 2008. (You can verify the attached DB from Central admin → Manage content database)
  2.  Attached those DB to the new SQL server 2016.
  3. Added the Admin User to the security group using SQL server 2016 management studio.
  4. Provided admin user following permission from Server roles section db_backupoperator db_owner 
  5. In my case I have to migrate the complete SharePoint to a new SQL server, for that, I have to create Central Admin as well, but you cannot migrate CA DB, you have to re-configure it using SharePoint product configuration wizard on the source server.
  6. Before doing this I took the screenshot for AAM settings and extract all WSPs files from CA (source server) using PowerShell, also took managed metadata service applications backups, other services like search, User profile etc, I created using configuration wizard and manually configure them from CA.
  7. Now I configured the CA (in source server) by disconnecting it from existing SQL server and choose "create new server farm", then I provided target SQL 2016 server details like database name, admin credentials, phrase (kind of password), CA port etc. once all required information provided, wizard starts configuring CA on source machine. after that, I configured a few services.
  8. Once CA is ready, I started creating web applications and dismount/mount the DB backups to it using PowerShell, for that first I have to dismount is newly created DB using below cmd: Dismount-spcontentdatabase "newly_created_webapp_db_name"
  9. Then mounted the old db which I already attached to the new SQL 2016 server (step-2) using below cmd: stsadm -o addcontentdb -url "http://newly-created-webapp-url" -databasename WSS_Content_old_db -databaseserver SQL2016SERVERNAM
After all this I was able to see from CA → Manage content database section that this site is connected to new SQL server, now its time to browse it. and it seems working fine. UI is good except some functionality which is related to services and web parts WSPs.
So make them functional again, I have to configure the MMS service which is responsible for my top navigation and again deployed the WSPs, once I did all these deployments and changes, the website works like a charm.

Now final work that I did is to configure the AAM settings for SP site from CA so that it can be accessed thru outside.


No comments:

Post a Comment