• Tip 9: Adding Accounts to a Site

    This tip is for Windows SharePoint Services 2.0/3.0, SharePoint Portal Server 2003, Microsoft Office SharePoint Server 2007, SharePoint Foundation 2010 and SharePoint Server 2010.

    The reason I didn’t say in the title of this post “Adding Users to a Site” is that the best practice is not to add user accounts into the SharePoint groups. Rather add Active Directory groups to the SharePoint groups to keep the number of security principals per group down. There is a limit to how many security principals can be added to a SharePoint group. See Plan Site Security for more information.

  • Tip 8: What Is a Configuration Cache and Why Do I Care About It?

    This tip is for Windows SharePoint Services 3.0 and Microsoft Office SharePoint Server 2007 and may apply to SharePoint Foundation 2010 and SharePoint Server 2010.

    Many times when troubleshooting an issue with Microsoft the engineer will have a customer “Clear the Config Cache”, so what does this mean and how invasive is this process?

    The cache goes by many names; file system cache, configuration cache, object cache, bunch of XML files and on and on. What this cache really is though is a cache of the farm configuration database objects. Since most things in SharePoint are objects and all SharePoint servers in a farm need to know information on these objects, it makes sense to cache this information locally on each server to save on database round trips. But like any cache this information can become stale or incorrect for many reasons. Usually this is caused by a change made on 1 SharePoint server in the farm not being written to the configuration database, either because of SQL timeouts, the SQL stored procedure did not complete, the SharePoint server is at a different version level than the rest of the farm, the list goes on.

    Therefore clearing the cache is sometimes needed to get all of the SharePoint servers up to date on the latest farm information. This involves shutting down the SharePoint Timer service on all of the machines and deleting all of the XML files in the %ALLUSERSPROFILE%\Microsoft\SharePoint\Config\<GUID>. Opening the cache.ini file in Notepad.exe and changing whatever value is present to 1; then starting the SharePoint Timer service again on each server in the farm. During this process no timer jobs will be ran obviously, but the sites that SharePoint is hosting will be available barring any major catastrophic problem.

    There is a timer job called Config Refresh on ever SharePoint farm which runs every 15 seconds and updates the cache on all of the SharePoint servers in the farm. When the XML file for an object does not exist on a server a new XML file is created with the current information from the SharePoint’s farm configuration database.

    So long story short; clearing the cache is sometimes needed when there may be inaccurate information in a SharePoint server’s persisted object cache and clearing this cache is most likely safe to perform at any time.

  • Tip 7: Set Diagnostic Logging Back to Defaults

    This tip is for Windows SharePoint Services 3.0 and Microsoft Office SharePoint Server 2007 and may apply to SharePoint Foundation 2010 and SharePoint Server 2010.

    One great way to troubleshoot any SharePoint issue is to set the SharePoint diagnostics logging to “Verbose” for the category which fits with the technology that having an issue. There is an “All” category, but that is usually too much information, so it's best to set logging on different categories. After troubleshooting has been completed how can you get back to the normal logging setting so the logging not impacting performance or logging too much noise? Here is the Stsadm.exe command to set the logging levels back to defaults.

    Stsadm.exe -o setlogginglevel -default

    There you go, back to normal.

    Note that this is farm-wide, so just run once on any SharePoint server in the farm. Note that this will not set the location or the number of log files or minutes to log in each file, we’ll leave that for another tip. :)

  • Tip 6: Browsing to a Document Library

    This tip is for Windows SharePoint Services 3.0 and Microsoft Office SharePoint Server 2007 and may apply to SharePoint Foundation 2010 and SharePoint Server 2010.

    Did you know you can browse to documents in a SharePoint document library without going to the web site?

    To open a document in Windows Explorer you can use 2 formats; HTTP URL and UNC.

    To browse to a document library using HTTP; open My Computer or My Network Places and type the location of the document library in the following format: http://AddressOfSite/DocumentLibrary.

    To browse to a document library using UNC; open “My Computer”, “My Network Places”, “Network” or any Explorer window and type the location of the document library in the following format: \\AddressOfSite\DocumentLibrary. If using UNC path, make sure that the WebClient Windows service is set to Manual or Automatic and start the service. On Windows XP and greater this can be done with the following commands:

    sc config WebClient start= demand. *Note that there is a space after “start=”.

    sc start WebClient

    If using the UNC path you can also map a drive to the location using the NET USE command like so:

    net use z: \\AddressOfSite\DocumentLibrary

    There you go, now you can get to your documents lickety-split.
  • Tip 5: Use a SQL Connection Alias

    This tip is for Windows SharePoint Services 2.0/3.0, SharePoint Portal Server 2003, Microsoft Office SharePoint Server 2007, SharePoint Foundation 2010 and SharePoint Server 2010.

    This tip can save some headaches when making changes to your SQL configuration for SharePoint. Take some time before running the SharePoint products and Technologies Configuration Wizard and creating a new farm. Creating a SQL alias will mean that you will be able to switch SQL servers on the back end without having to reconfigure SharePoint. To create a SQL connection alias simply run cliconfg.exe on each SharePoint server that will be joined to the far, click the Alias tab and click Add. Enter the Alias name, Network Library/Protocol and Connection Parameters.

    Now when running the SharePoint products and Technologies Configuration Wizard specify the alias name instead of the database server\instance when entering the database information. When the farm creation is complete, the Central Administration Servers in Farm page will show the SQL alias instead of the actual SQL server and instance name. For any new SharePoint servers being added to the farm, run the cliconfg.exe and create the same SQL alias on the server before adding it to the farm. Now you will be able to change out your SharePoint farm's entire SQL back end just by moving the databases to another server and updating the SQL alias of each SharePoint servers in the farm.