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.
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.
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. :)
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
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.
This tip is for Windows SharePoint Services 2.0/3.0, SharePoint Portal Server 2003, Microsoft Office SharePoint Server 2007 and may apply to SharePoint Foundation 2010 and SharePoint Server 2010.
Okay, enough of the upgrade tips. Today we’ll take a break and do a small tip on navigating a SharePoint web site.
If your SharePoint farm has a large amount of content then detaching the content databases from the web applications before running the SharePoint Products and Technologies Configuration Wizard on the first server in the farm will speed up the installation and upgrade wizard. Of course you will still have to reconnect the databases afterward, but if you are doing the upgrade after hours at least you can get through the manual part of the install and monitor the attach process.
This tip is for Windows SharePoint Services 3.0 and Microsoft Office SharePoint Server 2007.
First step test the update in a test farm. Second, test again. Third, make backups (Database and file system). Okay, now you can start with the upgrade.
Install the Windows SharePoint Services update/Service Pack on all servers in the farm. Install the Microsoft Office SharePoint Server update/Service Pack on all servers in the farm if applicable.
Run the SharePoint Products and Technologies Configuration Wizard on each server in the farm. A good start would be the server running the Central Administration service. Alternatively, you can run psconfig.exe -cmd upgrade –inplace b2b to accomplish this. Some upgrade errors can be fixed by running the psconfig.exe command with the psconfig.exe -cmd upgrade –inplace b2b -force switch also.
In the spirit of Sara Ford's Visual Studio 2008 Tip of the Day (http://blogs.msdn.com/saraford/archive/2007/07/21/introducing-visual-studio-2008-tip-of-the-day.aspx); I am going to attempt to put out a SharePoint Tip of the Day. I will not be version specific, so tips can be from SharePoint 2001/SharePoint Team Services all the way to SharePoint 2010.
One tip per day, no weekends, or holidays(US) ;).
First goal is to get 1 week of tips, then I’ll make a goal of 1 month and then before you know it, the ball should be rolling. It’s like exercising, easy to start but tougher to keep going. First post coming on Monday. Second post hopefully coming Tuesday. ;)