viernes, 26 de octubre de 2012

Reusing a server in a SharePoint farm


The last days we have been working hard to get some farms built in a record time, and the main issue and time consuming was the fact that we´re reusing servers. Now I can say it´s the worst idea ever.

When you remove a server form a SharePoint farm (you might check the procedure here) many configurations remain on the server, from the hive folder until the web.config of the Internet Information Services (IIS). If you really need to reuse a server but you don´t have the choice to reinstall the operating system take into account at least some steps to clean up the environment;

  • Delete the hive folder: program Files\Common files\Microsoft Shared\Web Server Extensions\14
  • Remove the Application and IIS feature of the server. And here comes the point; you should first uninstall any SharePoint product, stating always with any language pack.So you should:
    • Remove SharePoint language pack
    • Remove SharePoint server
    • Remove application and IIS feature
    • Restart the server
    • Install the application and IIS feature
    • Install SharePoint prerequisites
    • Install SharePoint server
    • Install language pack (foundation and server) ... for sure I´m missing some restarts of the server ...
 After my experience I´m willing to reinstall the operating system and apply any necessary  update prior to try to reuse a server that was before a SharePoint server.

miércoles, 24 de octubre de 2012

How to add the role of Central Administration in your farm


As part of the high availability procedure, the central administration service should be in more than a server. That way you ensure the availability of the service. What happens when you add the service to a different server? Let´s discover it!

Imagine a farm of 5 servers: 3 WFE, 2 App servers (Query/Crawl) and a SQL server. 

Let´s call them that way:

WFE01.dragons.com >> Central administration
WFE02.dragons.com
WFE03.dragons.com
QRY01.dragons.com
CRA01.dragons.com
SQL01.dragons.com

Let´s look at the AAM (alternate access mapping), select the Central Administration web application and you will see:


Now we want to add the role of the CA to the following server: CRA01.dragons.com

Go to Central administration > services on server and select  the server CRA01.dragons.com. Look for the service "Central administration" and press "start". It will take a while, it depends on how large your farm is. Take it easy.
When it will appear "started" a new site called "SharePoint Central Administration v4" appears in the IIS of the server.

Now let´s check the alternate access mapping and you will find this configuration:

 
Maybe this doesn´t mean anything for you, so let´s check if the get our goal:

Open an IE and write down the new URL of the CA: http://cra01.dragons.com , and after a while it will appear  the CA , could you please let me know which URL appears in the navigator? Maybe this one? http://wfe01.dragons.com?? 

The key is the AAM. It seems that when you add the service SharePoint creates a new entry in the AAM, but as a redirection to the original Site. If we need to ensure high availability of the service we need the service to respond on another server.

Solution: Change the alternate access mapping, and assign the new URL to another Zone. For example:


Now the Central Administration web page will open on both URLs.

viernes, 31 de agosto de 2012

NLB::How to configure the balancer for web front servers


The NLB is the software balance solution from Microsoft, I use it for staging, developer or testing environments normally, while for pre-production and production ones I always head on for the hardware ones; F5, Netscaler …

The configuration is easy, but for virtual environments it´s important to know how to configure it.

The first thing is to decide if we´ll use the same IP address for the NLB or if we´ll use an IP address for the virtual cluster (NLB) and each server will use their own IP for the communication between each other. I would go for the second one, it´s the one I´m used to choose.

Scenario:
In the scenario of today we do have a SharePoint farm with 3 servers (2 WFE + SQL), all based on Hyper-V technology. Each WFE server has 1 NIC. Let´s call the WFE1.contoso.com / WFE2.contoso.com.
We have an IP address for the virtual cluster (NLB): 172.22.25.12




The following Site collections must answer to the IP:

  • First step.
For virtual machines under Hyper-V technology you must enable the spoofing of the MAC, it will not work otherwise. In the Hyper-V console, select the virtual machine, settings, and look for the network adapter you might use for NLB. Under the MAC address there´s a check to enable "Enable spoofing of the MAC address".  The Virtual machine must be stopped to change this parameter.


  • Ensure the feature (NLB) is enabled on the WFE server >> Click Start, click Administrative Tools, and then click Network Load Balancing Manager. If the option does not appear enable the feature following the steps below:

  1. Click Start, point to Administrative Tools, and then click Server Manager. In the Features Summary area of the Server Manager main window, click Add Features.
    -- or --
    In the
    Customize this server area of the Initial Configuration Tasks window, click Add Features.
  1. In the Add Features Wizard, select the checkbox next to Windows Network Load Balancing.
  1. Click Install.


  • Creating a virtual cluster (NLB):

  1. To open Network Load Balancing Manager, click Start, click Administrative Tools, and then click Network Load Balancing Manager.
  1. Right-click Network Load Balancing Clusters, and then click New Cluster.
  2. In Host, enter the name of the host, and then click Connect. In our scenario: WFE1.contoso.com
  1. Select the interface that you want to use with the cluster, and then click Next.
  1. In Cluster IP Addresses, click Add to enter the cluster IP address that is shared by every host in the cluster: in our case 172.22.25.12
  1. In Cluster operation mode, click Unicast (by default)
  2.  right-click the new cluster, and then click Add Host to Cluster. At this time we´ll add the second server: WFE2.contoso.com

If you check the IPs in the Network properties or query ipconfig (cmd) it will appear that the NIC have 2 IPs, the original and the new for the NLB.

  • How can I get to resolve the IP address?  You must manually register the NLB cluster name in DNS by using a host (A) or (AAAA).In our case:

New registers  Host (A):
 Nombre : devlab.contoso.com
IP : 172.22.25.12
 Nombre : devmysite.contoso.com
IP : 172.22.25.12

This is an easy configuration that works in this scenario, for other configurations you might review the specifications.

miércoles, 29 de agosto de 2012

Web analytics:: Where are the reports?


Web analytics is a great tool to get an insight of what´s going on in our farm at performance level . Sometimes when the customer asks me where to find a specific report after a while I find myself looking in every possible place where those reports are available and I waste some time looking for them. So here it goes, a collection of where to find the reports, it shouldn´t take me time to find them now!

Localization of the Reports:
Site collection/site > Site´s configuration > acciones del sitio >

    • informes de web analytics del sitio
    • Informes de web analytics of the Site  Collection
Central Administration > Search service application > Web analytics
Central Administration > Monitoring >  Reporting: Web Analytics : reports by web application
Central Administration > Monitoring > Reporting: View health reports:

    • Slowest pages
    • Top Active Users

This post (thanks!!) explains how to get the Slowest Pages report quering the DB:

If you need you can get top slowest pages directly from Usage and Health Data Collection database (WSS_UsageApplication by default) calling proc_GetSlowestPages stored procedure

declare @webApp uniqueidentifier
select @webApp = WebApplicationId from dbo.RequestUsage where ServerUrl = 'http://myWebApplicationUrl'

declare @stime datetime
declare @etime datetime
set @stime = getDate() - 10
set @etime = getDate()

exec dbo.proc_GetSlowestPages
@StartTime = @stime,
@EndTime = @etime,
@WebApplicationId = @WebApp,
@MachineName = null

 
In this great post you might find details regarding to each report: http://blogs.msdn.com/b/ecm/archive/2010/05/03/web-analytics-in-sharepoint-2010-insights-into-reports-and-metrics.aspx

miércoles, 22 de agosto de 2012

Troubleshooting tools, Part I: ULS viewer


This tool helps us administrators to troubleshoot issues in our SharePoint environments. You just select where your SharePoint logs are (the Usage and Health data collection service must be installed and configured) and you can see the logs in real time.

Where are the logs stored? The logs are stored into the DB of the service, standardly named WSS_loging. The tables are named dbo.ULStracelogs_partition X where X is a value between [0-31], in total 32 tables, a new table per each day.

The advantage and disadvantage is in the same place, the number of servers we might monitor at a certain point.

It´s an easy tool when speaking about an standalone installation or a small SP farm, if we have to monitor a medium to large farm we´ll have to open the tool in each of the servers and monitor at the same time, neither comfortable nor efficient.

 

Would you like to know more and get the tool?  http://archive.msdn.microsoft.com/ULSViewer

martes, 21 de agosto de 2012

Removing a server from the SharePoint farm


 

Something as easy as removing a server from a SharePoint farm has its considerations if we don´t want to end up suffering consequences.

In the central administration there´s an easy way of "removing a server" but it is not the correct path unless you don´t have other option.

The first thing is to plan, plan and plan. Some considerations that should receive our attention are:

1-Perform a farm backup. It´s an easy way to protect our farm and recover any service application in short time. Be careful if we´re using the User profile Service application.
2- Reorganize the services from the server/s that are going to be removed to the rest of the servers. Some questions that may help us to rearrange the services are:

Which kind of server do we want to remove? Frontend, application server or SQL?
Before removing the SQL server all the Databases must be moved to another SQL server into the farm.
Does any server you want to remove use any of these services?...

  • Hosts the central administration. Add this service to another server.
  • It´s a search topology component (query, crawl, administration); perform a full crawl in case you change the search topology. Review the logs afterwards.

Take it easy with the UPS and search service applications, both are critical and complex services to take care of.
  
Once all the services are running on the servers that will remain in the farm we might go for the second step.

1- Uninstall the server from the SharePoint Wizard. Using the wizard, the server will be disconnected from the farm, but before all the services and databases associated will be removed in a clean way.

What if the server doesn’t exist anymore or if we cannot uninstall from the SharePoint’s wizard or from control panel? Then we may use the option that appears in the central administration > Manage servers in the farm


In a nutshell even the easier things need our attention to succeed.