Sunday, June 13, 2021

 Content database upgrade from SharePoint 2013 to SharePoint 2016

Pre-upgrade checks

  1. Make sure that if you have any site collection which has already been migrated to SharePoint 2013 but if they are in “SharePoint 2010” mode do upgrade them to the SharePoint 2013 UI and PowerShell ( You can follow this article for any quick help) .
  2. On source web application on SharePoint 2013 take not of all the managed path site collections if any and create them in the new SharePoint 2016 environment.


  3. Backup all content databases of the SharePoint 2013 databases using the SQL Server management studio.
  4. Make the source sites (Web Application/site collection) in read-only mode as part of your downtime window.
  • Using SharePoint Central Administration, we can Set the lock for a particular site collection, which is pretty straight forward. Since, It’s possible to set the site collection to read-only mode using PowerShell, We can loop through the each and every site collection in the web application and set the site collection's status to read-only. Once done with the migration/maintenance, you can unlock the sites again.
  • SharePoint Web Application to Read only using PowerShell 
# Get the Web Application
$WebApp=Get-SPWebApplication "http://SharePoint.neelam.com"
 
#Loop through all site collections and Set read only status
    foreach ($SPsite in $webApp.Sites)
    {
       $SPsite.ReadOnly = $true
       #Or you can use: Set-SPSiteAdministration -LockState "Unlock" -Identity $SPsite.url
    }
                  • Alternatively, you can make a note of all the content databases and set them as read only from the SQL Server managements studio.

                  Upgrade Procedure

                  1. Restore the databases which you had backup earlier at point 3 in the new SharePoint 2016 SQL instance/cluster.
                  2. Now you need to provide the db_owner rights to all the databases to the account which is running the SharePoint PowerShell commands in the new environment. (example neelam\sp_farm2016).
                  3. Before we start the upgrade make sure the new SP2016 Web Application has all features/solutions etc have been installed.
                  4. Run the below command. This command tests to make sure the new web application http://portal.neelams.com has all the solutions/features/templates as per its assets from the source web application.
                  5. Test-SPContentDatabase -Name WSS_Content_WADB_2013 -WebApplication http://portal.neelams.com
                  6. If the above commands returns no results and you back to the command prompt congrats you are good with the next step, else you might need to fix the missing components and install them in the new SP2016 environment.
                  7. Run the below command. This command proceeds with the upgrade process for the specific database  WSS_Content_WADB_2013.
                  8. Mount-SPContentDatabase -Name WSS_Content_WADB_2013 -WebApplication http://portal.neelams.com
                  9. Wait for the process to complete to 100% and then try to access the new site collection.
                  10. If you get “Site is not being shared” error please go the Application management > Change Site collection administrators and add the new primary and secondary site collections administrator to the newly migrated site collection.

                  Post upgrade checks

                  1. You can now go Central Admin > Upgrade and Migration > click on “Check upgrade status” under Upgrade and Patch Management. This section shows all the upgrade activities status, their timing, warnings and it will also give you the location of the upgrade log file path which is actually at the 16 Hive.
                  2. You now view the file for the verbose logging information here with the below filename.

                  C:\Program files\Common Files\Microsoft Shared\Web server extensions\16\Logs\Upgrade-YYYYMMDD….guid.log and and also a file ending with -error if any.


                  Thank you viewing my blog. 

                  Monday, January 21, 2019

                  Changing Domain of SharePoint Servers

                  Below are some quick list of steps you might need to take to change the domain of a three server farm from one domain to another.

                  Note : Please take proper backups before proceeding.

                  SQL1 : SQL server
                  Web1 : Web Server
                  App1 : Application server

                  1. Create a SQL mixed mode (SYSAdmin/Security Admin)account.
                  2. You will need this account to login to SQL after it is unjoined from domain and rejoined to new domain.
                  3. Web1 : Run config wizard to unjoin the server from the SP Farm.
                  4. App1 : Run config wizard to unjoin the server from the SP Farm.
                  5. SQL1 : Unjoin and re-join the new domain
                  6. Web1/App1 : Add servers to the new domain.
                  7. Create new SPFarm account with Sysadmin or dbo role on SP config/admin databases and all content databases.
                  8. App 1 : Run config wizard to join to existing farm and choose the SQL1
                  9. Web 1 : Run config wizard to join to existing farm and choose the SQL1
                  10. Login to CA and web Applications with the farm account and verify all accessible with the new account.
                  11. If your company is specific about using different accounts for App Pool, Service Apps etc, please add new accounts in the managed accounts and assign accordingly to the pools or svcapps etc.
                  12. Run the stsadm or Powershell to migarte the below.

                  Migrate groups >> olddomain\GroupName to newdomain\GroupName
                  Migrate Users >> olddomain\Username to newdomain\UserName

                  I will post more detailed steps in my next post.

                  Monday, September 26, 2016

                  Office Web App Error (SharePoint 2013)

                  Office Web App Error (SharePoint 2013)

                  Office Web Apps Server (OWA) is a new Office server product that delivers browser-based versions of Word, PowerPoint, Excel, and OneNote. A single Office Web Apps Server farm can support users who access Office files through SharePoint 2013, Lync Server 2013, Exchange Server 2013, shared folders, and websites. The new stand-alone deployment model means that you can manage updates to your Office Web Apps Server farm independently of other Office Server products that are deployed in your organization.


                  Today I am here to share a simple issue which could have roots connected to different components in your environment. Below is the generic error which my users to face.




                  Initially I started looking though all my OWA Application server logs (standard windows application and other logs), then started digging through my OWA ULS logs location (C:\ProgramData\Microsoft\OfficeWebApps\Data\Logs\ULS). 

                  In the meantime I found that even my search had issues. You need do a complete full crawl for the OWA to render the office documents in the browser. Though my environment was stable for quiet sometime now, I was still not convinced that my search errors was a leading cause for the OWA.

                  Caution : Some errors might be misleading at times and if your environment was stable enough for a while DO NOT go about drastic measures like recreating search application or re configuring OWA etc.Finding the root cause will help us in the long run instead of getting to workarounds.

                  I broke my head all around again and trying to fix the search issues which had like 200K errors (OMG, that unacceptable...!!!). And all of a sudden my search started working fine and after like 7hours and luckily even the OWA was working PERFECT by 11:30pm midnight.I was a happy SharePoint Admin and sent email to my boss to verify early in the morning.

                  The very next day my boss called up and informed the issue still persists.So the search for the issue is ON again.

                  When I logged in early morning my Laptop was showing 8:50am but on the server it was 8:58am. Forgot to mention my servers and users domain are totally different. This pointed me to another clue to check the timings on my servers and I started running a few commands and was shocked to see the inconsistent timings on the servers.



                  By Default all servers in a domain get the time synced from the domain controller.But in my case that was not happening. The reason was because all my servers were virtual and hosted on different Host machines (HyperV Hosts). There is setting on HyperV which forces the guests to get the timing of the Host. Below is the setting.




                  Option one is find out the cause of the Host machine sync issue with the Domain.

                  Second option is uncheck this option on the Hyper-V for the specific server then do a sync to Domain server from the specific server either using GPupdate or set time option. I will not go into the specific details here.

                  Once you fix the timings of all the servers in the farm the OWA should be working as per normal. In case the problem still persists do a full crawl again.



                  This was one of the environmental issue which has bugged me for almost 8 hours. Since I am a SharePoint Admin I always think only from SharePoint perspective. But sometimes you might need to think at a bigger picture and from different angels to get to the root cause.

                  ** Wish you a happy SharePoint/OWA troubleshooting ***


                  Monday, March 14, 2016



                  Configuring a 3 server search application (SharePoint 2013)




                  Assuming we have 3 servers in the Farm

                  NKRWEB1 - Web Server 1  ( WFE one used specifically as web front end )
                  NKRApp1 - App Server 1  ( We will configure Admin, Crawl, ContentProcessing, Analytics Processing on this server)
                  NKRIND1 - Index Server 1( We will configure Query Processing and Index Component on this server, Index component on a non system drive)




                  *** Open SharePoint management console on the App server NKRApp1 ***
                  --------------------------------------------------------------------------------------------
                  # Get App Pool - Get the specific Application Pool.
                  $saAppPoolName = "UAT_ServiceApps_Pool"

                  # Since we are running on the App1 server the computername will be NKRApp1
                  $searchServerName = (Get-ChildItem env:computername).value

                  #Below is the search service application name, So do follow a naming convention if you have any
                  $serviceAppName = "Search Service Application"

                  #Below is the search service application database name, naming convention if you have any
                  $searchDBName = "UAT_Search_Service_DB"

                  # Grab the Appplication Pool for Service Application Endpoint
                  $saAppPool = Get-SPServiceApplicationPool $saAppPoolName

                  # Start Search Service Instances
                  Start-SPEnterpriseSearchServiceInstance $searchServerName
                  Start-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance $searchServerName

                  # Create the Search Service Application and Proxy
                  $searchServiceApp = New-SPEnterpriseSearchServiceApplication -Name $serviceAppName -ApplicationPool $saAppPoolName -DatabaseName $searchDBName
                  $searchProxy = New-SPEnterpriseSearchServiceApplicationProxy -Name "$serviceAppName Proxy" -SearchApplication $searchServiceApp

                  #We will no add the index server
                  $hostB = Get-SPEnterpriseSearchServiceInstance -Identity "NKRIND1"
                  Start-SPEnterpriseSearchServiceInstance -Identity $hostB


                  #Our search application will have two servers but running different search components.
                  $host1 = Get-SPEnterpriseSearchServiceInstance -Identity "NKRAPP1"
                  $host2 = Get-SPEnterpriseSearchServiceInstance -Identity "NKRIND1"


                  Start-SPEnterpriseSearchServiceInstance -Identity $host1
                  Start-SPEnterpriseSearchServiceInstance -Identity $host2



                  Get-SPEnterpriseSearchServiceInstance -Identity $host1
                  Get-SPEnterpriseSearchServiceInstance -Identity $host2


                  $ssa = Get-SPEnterpriseSearchServiceApplication
                  $newSearchTopology = New-SPEnterpriseSearchTopology -SearchApplication $ssa
                  $ssa
                  $activeTopology

                  #***Create search components and assign to the respective servers TWO SERVERs***

                  #Assigning Admin, Crawl, Content Processing and Analytics Processing Component to NKRApp1 Server

                  New-SPEnterpriseSearchAdminComponent -SearchTopology $newSearchTopology -SearchServiceInstance $host1
                  New-SPEnterpriseSearchCrawlComponent -SearchTopology $newSearchTopology -SearchServiceInstance $host1
                  New-SPEnterpriseSearchContentProcessingComponent -SearchTopology $newSearchTopology -SearchServiceInstance $host1
                  New-SPEnterpriseSearchAnalyticsProcessingComponent -SearchTopology $newSearchTopology -SearchServiceInstance $host1


                  #Assigning Query Processing and Index Component to NKRIND1 Server
                  New-SPEnterpriseSearchQueryProcessingComponent -SearchTopology $newSearchTopology -SearchServiceInstance $host2
                  New-SPEnterpriseSearchIndexComponent -SearchTopology $newSearchTopology -IndexPartition 0 -SearchServiceInstance $host2 -RootDirectory "D:\UAT_Indexes"


                  $ssa = Get-SPEnterpriseSearchServiceApplication
                  Set-SPEnterpriseSearchTopology -Identity $newSearchTopology
                  $activeTopology

                  Thursday, April 3, 2014



                  Installing SharePoint 2013 Service Pack 1

                  Ensure proper backups and download necessary files:

                  Before you start installing anything new on your SharePoint server always create a backup of the bellow components

                  Ø  SharePoint databases backup

                  Ø  A System drive backup of all servers in the farm.

                  Ø  Download the exact files you will need to obtain.

                  Ø  Notify your business users the site will be down for half a day or more depending on the number of servers.

                  Sequence of installation

                  Ø  Run (as administrator) the SharePoint Server 2013 SP1 installer (officeserversp2013-kb2817429-fullfile-x64-en-us.exe). Wait for it to finish installing and make sure that it says that the service pack installed correctly.
                  Note: If you have multiple servers in your farm you can run the installer simultaneously on all servers at the same time.



                  Ø  Once all the servers are installed and restarted run the SharePoint Products Configuration Wizard on the application server which hosts the central admin first.





                  Ø One of the application server is completed. You should see a screen as below. “No action required” for the app server but other servers showing as “Upgrade Required“


                  Ø  Proceed for all the servers in the farm, one server at a time and the final screen should be as below if everything goes fine.



                  Trouble Shooting issues

                   Try running the product configuration program manually:

                  1. Open the Start Menu -> Right click on the Command Prompt and run it as Administrator

                  2. Navigate to C:\Program Files\Common Files\Microsoft Shared\Web Server Extenstions\15\BIN

                  3. Type in the following command and then press ENTER: psconfig -cmd upgrade -inplace b2b -wait -force

                  4. After the command finishes running it should say that the configuration completed successfully.

                  Restart the server:

                  Restart the machine and then try re-running the SharePoint Products Configuration Wizard.

                   Check the error logs:

                   Look in the SharePoint log entries for the exact error that occurred during the configuration and then try to resolve that issue. (The logs can be found in C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\LOGS)

                   *** All the best for a happy service pack upgrade ***



                      

                  Tuesday, April 1, 2014

                  Applying software updates to Office Web Apps Server


                  For single server farm

                  Please follow the below steps to install office web apps patch on a single server farm

                  • On the Office Web Apps Server that you want to apply the software update to, open the Windows PowerShell prompt as an administrator and run the following command.


                              Remove-OfficeWebAppsMachine


                  • Install the Office Web Apps Server update on that server. If prompted, restart the server. For service pack 1 please download from here


                  • Open the Windows PowerShell prompt as an administrator and run the New-OfficeWebAppsFarm cmdlet to re-create an Office Web Apps Server farm. Use the below as an example.

                  New-OfficeWebAppsFarm –InternalURL "http://Neelam-OWA" –AllowHttp -EditingEnabled

                  Note: Perform a full crawl of the SharePoint in case you face any issues of OWA not displaying in the SharePoint search.



                  For multi-server farm
                  Please follow the below steps to install office web apps patch on a multi-server OWA farm


                  • On the Office Web Apps Server that you want to apply the software update to, open the Windows PowerShell prompt as an administrator and run the following command. In my case I ran the command on my primary OWAServer01

                            Remove-OfficeWebAppsMachine

                  • Install the Office Web Apps Server update on that server. If prompted, restart the server. For service pack 1 please download from here


                  • Open the Windows PowerShell prompt as an administrator and run the New-OfficeWebAppsFarm cmdlet to re-create an Office Web Apps Server farm. Use the below as an example.

                  New-OfficeWebAppsFarm –InternalURL "http://Neelam-OWA01" –AllowHttp -EditingEnabled


                  • Now run the below command on the secondary OWA server. In my case I am running on OWAServer02

                  Remove-OfficeWebAppsMachine


                  • Install the Office Web Apps Server update on the OWAServer02 server. If prompted, restart the server.
                  • Finally run the below command to join this server to the primary OWA server.

                  New-OfficeWebAppsMachine –MachineToJoin “OWAServer01.neelamdc.com”

                   Repeat steps remove-officewebappsmachine, install update and -machinetojoin if you have multiple OWA servers in your farm.

                  Note: Please perform a full crawl of the SharePoint in case you face any issues of OWA not displaying in the SharePoint search.



                  Wednesday, January 22, 2014

                  Installation of SharePoint 2013 (Part-01)

                  PART-01 Covers prerequisite installation and installing the SharePoint binaries

                  Here we will go through the very basic steps or reminders before you can setup a single server/Multiple or development environment

                  1. First make you you have created all the service and application accounts in the Active Directory. You may refer to the below article for a proper planning [ CLICK HERE ].
                  2.Also make sure you setup all the Service Principle Names (SPN's) in the activer directory to avoid any unknown authentication or other issues.
                  3. Make sure you login to all the SharePoint servers as local admin ( eg. DomainName\SP_Installer).
                  4. Now right the prerequisite.exe installer in the SharePoint 2013 CD > right click > Choose run as administrator and proceed with the below steps.

                  Installing the prerequisites




















































                  5. Once the prerequisite installation is complete do a reboot of the server.

                  Installing the SharePoint binaries

                  1. Open the Setup.exe in the SharePoint 2013 CD > right click > Choose run as administrator and proceed with the below steps.




















                  You may leave the installation directory to the default or change it as per your company rules. To me I just leave it to the default and change the Logs directory later to a non-system drive.





















                  From the below screen "UNCHECK" the option "Run the SharePoint Product Configuration Wizard now" and close the window.






















                  If you have multiple servers in your farm you may perform the steps in Part-01 on all servers in the farm.

                  Let's proceed to PART-02 now.