Skip to main content

Thinking out aloud - Dave Hunter's SharePoint Blog

Go Search
Home
Blog
  

Locations of visitors to this page


 Useful Links

  Microsoft UK events
  SharePoint 2007 on CodePlex
  SharePoint Community Portal
  SharePoint User Group
  SharePoint Community Portal
  SharePoint Pedia
  SharePoint MSDN Forums
  SharePoint University

 Other Blogs

  Andrew Connell
  Angus Logan
  Arpan Shah
  Bill English
  Charles Emes
  Chris Hines
  From the field
  Heather Solomon
  Joel Oleson
  Lawrence Liu
  Mark Harrison
  Martin Kearn
  Microsoft ECM
  Nick Mayhew
  Patrick Tisseghem
  Penny Coventry
  SharePoint Team
  Steffan Gossner
  Todd Bleeker
Home > Thinking out aloud - Dave Hunter's SharePoint Blog
My thoughts and findings on Microsoft Information worker technologies, including MCMS and SharePoint 2007 (MOSS).
SharePoint 2007 Post SP1 Issues - Event ID 5214

I've been recently building some SharePoint Virtual Machines, looking at the media I had available which was SharePoint 2007 RTM, I decided it was best to get a fresh copy of SharePoint 2007 with SP1.  I planned to install the Infrastructure Update and instead of installing RTM, applying WSS SP1 and MOSS SP1 and Infrastructure for WSS and MOSS - 4 updates in total sounded daunting.

After installing MOSS SP1 I started to configure the services, during this I got the usual and scary "Cannot complete this action" error, especially as I've used MOSS SP1 before without any errors.

The errors in the event log are:

-----------------------------------------------------------------------------------------------------------------------------

Event Type: Error

Event Source: Windows SharePoint Services 3

Event Category: Database

Event ID: 5214

Date: 04/12/2008

Time: 14:37:38

User: N/A

Computer: COMPUTER_NAME

Description:

Insufficient SQL database permissions for user 'MOSS DATABASE ACCESS ACCOUNT' in database 'SharePoint_AdminContent_c4cfffb3-2065-49e4-b705-33b11b07fcf9' on SQL Server instance 'COMPUTER_NAME'. Additional error information from SQL Server is included below.

EXECUTE permission denied on object 'proc_GetWebNavStruct', database 'SharePoint_AdminContent_c4cfffb3-2065-49e4-b705-33b11b07fcf9', schema 'dbo'.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

-----------------------------------------------------------------------------------------------------------------------------

Event Type: Error

Event Source: Windows SharePoint Services 3

Event Category: Database

Event ID: 5214

Date: 04/12/2008

Time: 14:37:38

User: N/A

Computer: COMPUTER_NAME

Description:

Insufficient SQL database permissions for user 'MOSS DATABASE ACCESS ACCOUNT' in database 'SharePoint_AdminContent_c4cfffb3-2065-49e4-b705-33b11b07fcf9' on SQL Server instance 'COMPUTER_NAME'. Additional error information from SQL Server is included below.

EXECUTE permission denied on object 'proc_GetWebNavAcls', database 'SharePoint_AdminContent_c4cfffb3-2065-49e4-b705-33b11b07fcf9', schema 'dbo'.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

-----------------------------------------------------------------------------------------------------------------------------

I haven't installed SharePoint for a while so questioned whether the permissions were correct.  I have four accounts:

Account Purpose Privileges
Set up user Person who installs and configures SharePoint Member of the administrators group for each WFE
Database Access Account Used as the main service account for MOSS and the Application pool user for CA.

Service account with SQL Roles (DB Creator and Security Admin) privileges and a member of local Administrators group

Server Farm Account Used to run services and identity of application pools Member of the administrators group
Default Content Access Account Used to index content None

 

The account the error message complains about is the database access account, but this has DB Creator and Security Administration.  I reviewed the following information here "Event ID 5214 (Windows SharePoint Services health model)" - http://technet.microsoft.com/en-us/library/cc561019.aspx with no success.

After looking further I found this http://www.eggheadcafe.com/software/aspnet/33333060/execute-permission-was-de.aspx where it was confirmed as a known issue and that the August 2008 update resolves this.  For more information please see http://support.microsoft.com/default.aspx/kb/956056/

I choose to install the Infrastructure Update which rolls up these updates.  For more information please see:

Please read the notes carefully, with any update you cannot un-install and with MOSS you need to install the WSS update first and then apply the MOSS version of the update.

History of SharePoint

Joining Dots have a great article about the history of SharePoint.  You can read the article here.  They also have a diagram explaining where SharePoint 2007 has come from and its features.

Joining Dots

 

I've worked with Microsoft CMS just after Microsoft acquired nCompass, then onto MCMS 2002, SharePoint v2 technologies and through to MOSS.  These products have changed over the years, technology and focus.  You programmed against MCMS 2001 using ASP 3 / VBScript and Microsoft CMS 2002 in .NET.

SharePoint 2001 was more focused on Document Management.  The markets changed and collaboration was the main focus.  With MOSS it can feasibly target all markets (Document Management, Content Management, Collaboration, Records Management, Business Intelligence, Business Process and Enterprise Search).  Get yourself a piece of the MOSS pie :)

How to add the site title to a page layout or masterpage in SharePoint

I recently got asked how to add the site title to a page layout.  Off the top of my head I said use the project property web control and specify the site title property.... which was close.

The project property web control looks like:

<SharePoint:ProjectProperty Property="Title" runat="server"/>

The Property attribute takes the following values:

Name

Description

BlogCategoryTitle

Category of the current post

BlogPostTitle

Title of the current post

Description

Description of the current site (SPWeb)

RecycleBinEnabled

Returns 1 (recycle bin enabled) or 0 (recycle bin disabled)

SiteOwnerName

User name of the owner for the current site collection

SiteUrl

Url of the current site collection (SPSite)

Title

Title of the current site (SPWeb)

Url

URL of the current site (SPWeb)

   

Example:

Title: <SharePoint:ProjectProperty Property="Title" runat="server"/><br>
Description: <SharePoint:ProjectProperty Property="Description" runat="server"/><br>
RecycleBinEnabled: <SharePoint:ProjectProperty Property="RecycleBinEnabled" runat="server"/><br>
SiteOwnerName: <SharePoint:ProjectProperty Property="SiteOwnerName" runat="server"/><br>
SiteUrl: <SharePoint:ProjectProperty Property="SiteUrl" runat="server"/><br>
Url: <SharePoint:ProjectProperty Property="Url" runat="server"/><br>

How to check if a SPFile exists in a document library

Usually in SharePoint there are several ways to implement some functionality.  With experience you learn which is the best method.  This is true of retrieving a document from a document library.  At first you think the files must be part of a collection so you look at how to access the SPFileCollection and from that access the document you are interested in.

Approach 1

Typically in .NET when access a collection and retrieve a single item either by name, guid or integer you check the item has been returned before using it. This returns an empty structure and you test if it isn't NULL.  The following example tries this with retrieving a document (SPFile) from a document library.

SPWeb currentSite = SPContext.Current.Web;
SPDocumentLibrary docLib = (SPDocumentLibrary)currentSite.GetList(currentSite.Url + "/Documents"); 

if (docLib.RootFolder.Files[fileName] != null) 
{ 
  // do something 

}

This throws an Argument Exception

  arg_ex

Approach 2

SharePoint has a "Exists" property of the SPFile, this returns a boolean flag to indicate if the file exists.

SPWeb currentSite = SPContext.Current.Web;
SPDocumentLibrary docLib = (SPDocumentLibrary)currentSite.GetList(currentSite.Url + "/Documents"); 

if (docLib.RootFolder.Files[fileName].Exists == true) 
{ 
  // do something 
} 

Again this throws a Argument Exception

 arg_ex

Approach 3 

The correct way of checking if an item exists is using the GetFile method of the SPWeb.  The example below illustrates this.

if (currentSite.GetFile(fileName).Exists == true)
{
  // do something
} 

 

Summary

When retrieving a SPFile from a document library use the SPWeb.GetFile() method and test if it exists using SPFile.Exists.

How to programmatically set the content type while creating a list item

If you create a new list item using the API without setting the content type id you will create a new item using the default content type.  However if you want to create a new list item using a different content type you will need to set the Content Type ID field.

The example below creates a list item using a content type called "Log" in a list called "HistoryLog".

using (SPSite site = new SPSite("http://intranet/"))
{
  using (SPWeb rootWeb = site.OpenWeb())
  {
    SPList historyLog = rootWeb.GetListFromUrl("/lists/historylog/allitems.aspx");
    SPListItem item = historyLog.Items.Add();
    item["LogType"] = "Warning";
    item["LogMessage"] = "Message .....";

    // set the content type id
    item["Content Type ID"] = rootWeb.ContentTypes["Log"].Id;
    
    item.Update();
  }
}
SharePoint Designer - stop that lag when loading

SharePoint Designer (SPD) by default loads the last site you were using when it opens.  I know this is a "feature" and has it benefits when you are working on one site, but I find myself realising that its opening the last site and frantically clicking the stop button in hoping that it will stop loading swiftly.

stop

You can turn this feature off, select Tools > Application Options

You will be presented with the following

spd_options

De-select the first option and click OK.

Timer will not run error because the administrative service is not enabled error

I booted up my server this afternoon and tried to deploy a SharePoint solution package. I ran a deployment script which called stsadm commands to install and deploy several wsp files. The install script looks something like:

SET stsadm ="%CommonProgramFiles%\Microsoft Shared\Web Server Extensions\12\BIN\STSADM.EXE"

%stsadm% -o addsolution -filename "MySolutionPackage.wsp"

%stsadm% -o execadmsvcjobs

%stsadm% -o deploysolution -name "MySolutionPackage.wsp" -allowgacdeployment -allcontenturls -immediate –force

%stsadm% -o execadmsvcjobs

Nothing special is happening here. After both the addsolution and deploysolution commands I get the following error:

The timer job for this operation has been created, but it will fail because the administrative service for this server is not enabled. If the timer job is scheduled to run at a later time, you can run the jobs all at once using stsadm.exe -o execadmsvcjobs. To avoid this problem in the future, enable the Windows SharePoint Services administrative service, or run your operation through the STSADM.exe command line utility.

I checked the services and found out that the Windows SharePoint Services Administration service wasn't running. After starting the service the errors weren't reproduced.

Please note: My install script included the command execadmsvcjobs which runs all jobs that are waiting to be run instead of waiting for the service to pick it up. If you deploy a solution via Central Administration you should run STSADM –O execadmsvcjobs or start the Windows SharePoint Services Administration service.

Just need to find out now why the service didn't start automatically .... TBC

Re-published my MOSS Content Types Viewer on CodePlex
I've re-published my Content Types Viewer on CodePlex.  This release includes full source code (currently it's POC standard, I will update soon).  http://www.codeplex.com/MOSS2K7CTypesViewer
 
For more information please see:

Andrew Connell has a great extension for generating site columns and content types which can be downloaded here http://www.andrewconnell.com/blog/articles/MossStsadmWcmCommands.aspx

My tool was developed before this was available and was aimed to be a visual tool for reengineering existing content types.

Visio Shapes for SharePoint

I was looking to expand my toolbox for designing SharePoint solutions, I've found the following Visio Shapes, enjoy!

Shapes for wireframes

Source

Description

TamTam - Ferry

Shapes for wireframing page level functionality. Download it here http://www.den-dopper.com/2008/10/14/visio-template-and-stencil-for-designing-sharepoint-moss-2007-portals-and-sites/

Nick Finck

This is a generic set of IA shapes but still relevant. Please see http://nickfinck.com/stencils/

 

Shapes for designing and planning SharePoint farms and their structure

Source

Description

Microsoft

Site hierarchy planning tool is part of Microsoft's planning worksheets for MOSS and WSS. For more info http://technet.microsoft.com/en-us/library/cc288346.aspx

SmallSteps.co.nz

Similar to the above but includes lower level shapes for documents, tasks, calendars etc. Download it here http://www.smallsteps.co.nz/articles/VisioStencil.aspx

Maxime Bombardier

Site structure shapes for designing or documenting MOSS. For more information and to download please see http://blogs.msdn.com/maximeb/archive/2007/10/27/updated-visio-stencils-for-sharepoint-2007-site-structures-documentation-version-0-2.aspx

SharePoint vNext – Rumours, Speculation and Confirmed Features

The table below lists the known facts about what we can expect in SharePoint vNext and their probability of happening or making the version.

Feature

Summary

Probability

Source(s)

64 bit only

SharePoint vNext will be a 64 bit version only.

CONFIRMED

TechNet

Silverlight

Silverlight 2.0 webparts or UI will be present.

MOST PROBABLY

Speculation

Super-Lists

SQL tables-like behaviour for SharePoint lists

PROBABLY

Bill Gates

Groove Integration

If the user has Groove client installed, more options will be displayed for data synchronization, in more seamless way.

PROBABLY

Ray Ozzie

Master Data Management

Master data source for keeping only one version of the truth. This data can be surfaced as SQL Server views or SharePoint data. In essence, a rebranded and somewhat expanded version of Stratature product +EDM, now known as Codename "Bulldog".

MOST PROBABLY

Wikipedia
Microsoft MDM

XHTML-compliant output

SharePoint UI will produce clean XHTML-compliant output.

PROBABLY

Speculation

FAST search integration

FAST-based enterprise search as a Search replacement. Webparts that show FAST search results.

MAYBE

CMS Watch

ODF and PDF support

Custom filters won't be necessary to index and extract metadata from ODF and PDF files.

PROBABLY

Microsoft

CMIS support

Content Management Interoperability Services will allow SharePoint to communicate with other ECMs via web services.

MOST PROBABLY

Microsoft

Claims-based Authentication mechanism

Decouples the authentication mechanism from its implementation. It will enable SharePoint to use any interoperable authentication mechanism to authenticate the users.

MAYBE

Network World

 

Thanks to Edin for compiling this list http://edinkapic.blogspot.com/2008/10/sharepoint-v14-2009-feature-list.html.

We've known about the 64 bit feature for some time now and have been recommending 64 bit server deployments ever since (for both performance reasons and future proofing customers environments). Microsoft have released some more information about CMIS here http://blogs.msdn.com/ecm/archive/2008/09/09/announcing-the-content-management-interoperability-services-cmis-specification.aspx.

 

1 - 10 Next
  Copyright
This work is licenced under a Creative Commons Attribution-Noncommercial-No Derivative Works 2.0 UK: England & Wales License
  Site Map

 Dave Hunter

I'm currently a Senior Consultant at Netstore 2e2. I specialise in Microsoft Information Worker technologies (especially MOSS, MCMS and .NET), with over 8 years of experience within this area of specialism. 

I have gained two certifications for MOSS and WSS and look to complete the full certification track soon.

View Dave Hunter's profile on LinkedIn

  Subscribe in a reader


 Latest Posts

Expand/Collapse Year : 2008 ‎(31)
Expand/Collapse Month : 12 ‎(1)
Expand/Collapse Month : 11 ‎(4)
Expand/Collapse Month : 10 ‎(5)
Expand/Collapse Month : 06 ‎(3)
Expand/Collapse Month : 05 ‎(1)
Expand/Collapse Month : 04 ‎(3)
Expand/Collapse Month : 03 ‎(3)
Expand/Collapse Month : 02 ‎(5)
Expand/Collapse Month : 01 ‎(6)
Expand/Collapse Year : 2007 ‎(59)
Expand/Collapse Month : 12 ‎(3)
Expand/Collapse Month : 11 ‎(6)
Expand/Collapse Month : 08 ‎(3)
Expand/Collapse Month : 07 ‎(27)
Expand/Collapse Month : 06 ‎(17)
Expand/Collapse Month : 05 ‎(3)
Posts that contain SharePoint per day for the last 30 days.
Technorati Chart