Monday, 30 April 2012

Change the location of the IIS log files - IIS7

At some point - you'll need to stop IIS logging to the C:\

Open the SharePoint 2010 Management Shell
 The IIS snap-in first needs to be loaded using Import-Module WebAdministration

 Here is the command to change the log file directory for the default web site:

Set-ItemProperty 'IIS:\Sites\Default Web Site' -name logFile.directory -value 'D:\IISLogs'
Now, open up the IIS Manager console, expand Sites, click on the site you changed the log directory for and double click on Logging under the IIS section. You should see the new directory location under Log File

 You will need to perform this on each server in the farm.

User profile properties Diagram



SQL for SharePoint Administrators

SANs and LUNs
· SAN configurations affect performance. Nowhere is that more important than with SQL Server. Every document, every list item, every search result, and every user profile is delivered out of a SQL Server database. If those databases are on a slow drive, then SQL Server is slow. If SQL Server is slow, then no amount of configuration trickery can make SharePoint fast. SQL Server really is that important
· The (virtualized) Production farm should have the best-performing LUNs that the SAN can provide
· Ideally, place the tempdb database, content databases, Usage database, search databases, and SQL
Server 2008 transaction logs on separate physical hard disks/LUNs/SAN drive
· Is the search index on a super fast SAN drive? Currently on D:\
· When prioritizing data among faster disks, best practice is to use the following ranking:
1. Tempdb data files and transaction logs
2. Database transaction log files
3. Search databases, except for the Search administration database -
4. Database data files
Optimization
· Limit the content database size to 100GB; use multiple content databases if necessary.
o 100GB is a soft limit imposed by backup times
o DBs are supported up to 200GB
· Create multiple data files and spread them across multiple disks; only create files in the
primary filegroup
· The number of data files should be less than or equal to the number of core CPUs; count dual
core processors as two CPUs; count each processor that supports hyper-threading as one CPU
· Create data files of equal size
Backups of Content DBs
· Governance policy required: e.g. Sites are backed up daily and recoverable up to 14 days
o How far back are sites recoverable now?
o How long do current backups take?
Planning content DBs

Myportal
o Content DB Name: SP_myPortal_CDB
o Read-only: No
o Site collections: 15
o Warning:2000
o Max:5000
Mysite
o Content DB Name: SP_MySite_CDB
o Read-only: No
o Site Collections: 60
o Warning:2000
o Max:5000
· The preferred way for creating databases is to have the DBA pre-create them so that you can just reference the database names when you configure your farm, or create service or web applications.
o The goal is to have the databases available ahead of time, complete with all the settings required by SharePoint
· When SharePoint creates its multitudes of databases, it makes assumptions. E.g. the autogrow settings:
o The database files grow by 1MB at a chunk, almost ensuring that they're going to autogrow with every upload. Not only does this slow down SQL Server (which slows down SharePoint), but it also results in database files that are spread all over your drives in 1MB chunks
o Best practice - Set autogrow to 500MB/1GB
o Autogrow should also be a last resort. Someone, either the SharePoint administrator or a dedicated DBA, should pregrow your databases so that autogrow is unnecessary.
· Recovery model setting needs to be consistent with your disaster recovery plans.
o Do we need transaction logs? If so make sure we're performing routine log backups to keep those .ldf files in check.
o If we don't need transaction logs, switch the databases to the simple recovery model. Doing so will keep your .ldf files from swelling up
· SharePoint only really cares about the Collation, which should be LATIN1_General_CI_AS_KS_WS. Growth settings, file locations and the like are configured at your own discretion. Naturally, you should figure them out when planning your deployment, taking into account the fact that content databases will grow larger (and more quickly) than configuration databases, and that databases for Search can experience some heavy hits in large environments
How is Content DB growth being monitored?
o Web applications are not restricted to a single content database, which means that you can spread site collections within that web application over multiple content databases, keeping them manageable from a backup point of view
o If we have 3 Content DBs - at what point do we need to make another? What is the process for adding a new content DB?
o Limiting DB size will improve manageability, performance, and ease of upgrade for the environment
· Capacity notes
· MS recommends a maximum of 300 content databases per web application in your farm
· MS recommends a maximum of 200 GB of content per content database
· MS recommends site collections be no more than 100 GB in size
· SharePoint's only disk requirement is an 80GB system drive
o SharePoint itself doesn't need much disk space: It uses about 1GB, excluding logs, search index files, and any custom solutions. But that disk also needs to hold Windows and all its associated patches for the next few years. And the disk needs enough space for SharePoint's logs, plus enough space to perform a memory dump in the unlikely event of a problem. Also, NTFS gets fussy when disks are more than 90-percent full, so leave enough space for some overhead, too.
o SharePoint requires at least 80GB, but sometimes that isn't enough. If a SAN is hosting your SharePoint drives, expanding that 80GB system drive to, say, 120GB is painless

Sunday, 29 April 2012

Rebuilding a new mysite host


Had a situation the other day where MySites went down - users were only getting 404s.

IE - unchecked show friendly http messages and this was the error:

HTTP/1.1 200 OK Server: Microsoft-IIS/7.5 Error -

I then discovered that the MySite host site collection was missing - no longer listed in view all site collections where it should have been listed as mysite.domain.com/

Googling has revealed to me that you get this error message when the root site collection is missing from the Web App

First step: detached and reattached the mysite content db from the farm - required to clear any entries in the Config DB

Second step: recreated the MySite on the root

And all is well again

The reason the MySite host got deleted was because I setup auto site deletion policy on the MySite web app - all good governance but the problem was that the MySite host site collection site admins were a couple of service accounts with no email addresses - hence instead of 28 days of warning emails - BAM! - the site just got vapourized

Lesson - make sure you can access your MySite host

Monday, 16 April 2012

Metadata and Content Types in SharePoint 2010

Metadata

When you create/upload a document you may be prompted to enter some additional information

How much and what types will vary depending on how the Team Site has been set up

For Example: In this case when the document is uploaded the user is prompted to enter a title for the document, select a project and select a SharePoint category






















The user enters the title, selects a Project and then clicks the browse button next to the SharePoint category field

The user then selects from the available fields:

























Now the document appears in the document library and the Title, Project and SharePoint Category columns are displayed containing the metadata








Metadata just enables you to look quickly at content and determine what it is.

MANDATORY metadata fields are marked by a RED asterisk (*)

To Edit Metadata

(a) Click tick box alongside document 
(b) Choose Documents Tab
(c) From Manage Tab, click on Edit Properties
(d) Amend metadata as appropriate
(e) Click Save to save the metadata changes

To View the Metadata

(a) Click into the tick box alongside the document
(b) On the Documents Tab, in the Manager Group, click on View Properties
(c) The Metadata screen will be displayed

Content Types

When you create a new document from the New button in a document library – the dropdown may contain a selection of templates – these are called Content Types

By default SharePoint creates one Content Type for a Document Library – called Documents

In the case below the Team Site Owner or Administrator has created 3 more:





















Ensure when creating new documents that you are using the correct Content Type. Each Content Type may have different metadata associated with it. Workflows and retention policies may also be mapped to Content Types

SharePoint Information Architecture Diagram

Here is the template I use for Information Architecture designs. It's built using Mindjet and I flesh the nodes out with the low level d...