Thursday, September 15, 2016

An error occurred while getting information about the user at server : The RPC server is unavailable

Problem:
After installing SharePoint 2016 to setup a new farm, tried running SharePoint 2016 products configuration wizard, and the wizard failed at step 3 saying:
Failed to create the configuration database.
An Exception of type System.InvalidOperationException was thrown. An error occurred while getting information about the user <Farm-Admin> at server <Domain-Name>: The RPC server is unavailable
Failed to create the configuration database. Additional exception information: An error occurred while getting information about the user account at server domain: The RPC server is unavailable
Tried creating SharePoint farm using PowerShell, but got the same results.

Troubleshooting:
  • Verified that the SharePoint server is part of the domain and there is no connectivity, network, firewall related issues.
  • Verified that the setup account is granted with DB_Creator & Security_Admin server roles. 
  • Tried Adding the IP of the DC to HOST file of the Local server
  • Tried ipconfig /flushdns - and ipconfig /registerdns commands as per Technet forums, but didn't help!
Solution: Download and install the KB KB3115299 to fix this issue!

As a general recommendation, download and install all latest patches before you create SharePoint 2016 farm. Download latest patches from Microsoft Technet site:
https://technet.microsoft.com/en-us/library/mt715807(v=office.16).aspx#BKMK_2016



You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Sunday, September 4, 2016

How to Hide the Timeline in the Task List of SharePoint 2013/2016

Requirement: Hide timeline from SharePoint 2016 task list
sharepoint task list hide timeline
Solution: Here is how you can hide the timeline in SharePoint 2013/2016 task lists.
  1. Go to the Task List, Click on List Tab and then click on "Modify View" button from the ribbon.
  2. In the Edit view page, scroll down and expand the 'Style' section.
  3. Under the Style selection, Uncheck the checkbox 'Show timeline above the view'
  4. click on 'OK' button to save changes.
Here is the Result:
sharepoint 2013 task list hide timeline

Alternatively, You can edit the page, Edit List view properties, and uncheck "Show Timeline" Checkbox to hide timeline from SharePoint tasks list.

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Thursday, September 1, 2016

Backup-Restore All SharePoint Databases in SQL Server using PowerShell

Requirement: We planned to move our SharePoint's SQL database to a different server. So, we had to backup and restore all SharePoint databases from one SQL Server 2012 instance to another.

Solution:
Here are the steps at high level to move SharePoint from one SQL Server to another:
  1. Get a list of all SharePoint databases
  2. Backup all SharePoint databases from the source SQL Server
  3. Restore the backups to the target SQL server instance
  4. Change the SQL Alias in SharePoint Server to point to the new server.
Step 1: Get all SharePoint databases
#Get All SharePoint Databases and form an Array
Get-SPDatabase | Select -ExpandProperty Name | foreach { $Databases+= $_+"," }

#Export to a txt file
$Databases > databases.txt
This script gets you a list of all SharePoint databases, including configuration database, content databases and service application databases to a comma separated string. Lets take that string and give it to our backup script.
Tips: If you want to get all Content databases, use: Get-SPContentDatabase | Select -Expandproperty Name

Step 2: Backup All SharePoint Databases:
Before taking backup of all SharePoint databases, make sure you set the site(s) to Read-only mode (or set the database to Read-only in SQL Server) in order to avoid any data inconsistency issues.

Here is the PowerShell script to backup all Databases from SQL Server:
#Import SQL PowerShell module
Import-Module SQLPS –DisableNameChecking

#Configuration parameters
$SQLInstance="Cre-SQL-001"
$BackupPath="F:\Backup\"

#Array of Database names, Comma separated
$DatabaseColl="StateService_d73ac2ad313a41ba83d457bfb78cb4f3,Secure_Store_Service_DB_c13a71870bad4decb6f7582d9e26f46a,WordAutomationServices_e290fc12c8ee4ce09c38ba7fc8f089c9,Social DB,Bdc_Service_DB_f937be05fe5f48158d4895b6f2bb9674,WebAnalyticsServiceApplication_StagingDB_9efa01f9-ce98-4e4e-9e2d-ecfc9e19fc79,SharePoint_Config_2010,PerformancePoint Service Application_c1a8062656434a24a9c53f05fc8144f7,Search_Service_Application_CrawlStoreDB_76166d368e4a4ef58aabf8df57d7c670,Search_Service_Application_PropertyStoreDB_1fc75775ee894fd2aa0c4d1e7c75f0c7,Application_Registry_Service_DB_8e93a305ea904c81a34a3dd205265fc7,SharePoint_AdminContent_e0021dbb-cc00-4b58-a16d-9c4c481228ff,WSS_Content,WSS_Content_KM,WSS_Content_MySites,Search_Service_Application_DB_bfdf7354e7f84b1281121c7bdca7b43f,Managed Metadata Service_ff52c4f0cd504d938cd1b3dc9ef9ae8b,Profile DB,WSS_Logging,Sync DB,WebAnalyticsServiceApplication_ReportingDB_894b25ce-a2ba-4c7c-885e-08b3924deec8"

#Convert comma separated into an Array
$DatabaseNames = $DatabaseColl -split ","

#Backup Each Database
Foreach($DBName in $DatabaseNames)
{
  write-host "Backing up the database: $($DBName)"
  Backup-SqlDatabase -ServerInstance $SQLInstance -Database $DBName -BackupFile "$($BackupPath)\$($DBName).bak"
}

Step 3: Restore all databases to the target SQL Server instance
Copy all backup files from the source server to the target and then, use the below PowerShell script to restore SQL Server databases in bulk. Make sure the original location (as in the source database server) do exists in the target server.

PowerShell script to restore SQL Server databases in bulk:
#Import SQL PowerShell module
Import-Module SQLPS –DisableNameChecking

#Configuration parameters
$SQLInstanceName="Cre-SQL-002"
$BackupPath="E:\Backup\"

#Get all Backup files
$BackupFilesColl = Get-ChildItem –Path $BackupPath | where {$_.extension -eq ".bak"}

#Iterate through each backup file
Foreach($BackupFile in $BackupFilesColl)
{
 #Get the full path of the backup file
        $DatabasePath = $BackupPath + '\' + $BackupFile

 #Frame the Database Name
        $DatabaseName = $BackupFile.ToString().Replace(".bak", "")

 #Restore the database
 write-host "Restoring Database: $($DatabaseName)"
 Restore-SqlDatabase -ServerInstance $SQLInstanceName -Database $DatabaseName -BackupFile $DatabasePath
}
Backup-Restore All SharePoint Databases in SQL Server using PowerShell

Step 4: Change SQL Server Alias to Point your New SQL Server:
and as a final step, change your SQL Alias from SharePoint servers to point new SQL server instance. Here is my post on configuring SQL server alias: How to Create SQL Server Alias for SharePoint. Do IISReset once done!

These scripts can be used in scenarios, such as:
  • During SharePoint migrations, where you may be taking all SharePoint databases to a new SQL Server instance.
  • When you have to move SharePoint databases from a Single standalone SQL Server to a highly available cluster, or SQL Server AlwaysOn cluster.


You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


You might also like:

Related Posts Plugin for WordPress, Blogger...