Monday, February 25, 2013

SQL Agent doesn’t start

SQL Agent won’t start for SQL Server 2008 R2. Everything else works.


When trying to start the SQL Server Agent service, either from the service.msc or the Management Studio error “Unable to start SQLAgent” is given.



Check output from sqlagent.out. To change the path of sqlagent.out

use msdb


sp_set_sqlagent_properties @errorlog_file='c:\temp\sqlagent.out'


Following message in sqlagent.out:

---- - ! [298] SQLServer Error: 229, The EXECUTE permission was denied on the object 'sp_sqlagent_has_server_access', database 'msdb', schema 'dbo'. [SQLSTATE 42000] (ConnIsLoginSysAdmin)


Added the SQL Agent service account as sysadmin on the sql server from Securites.



Thursday, February 21, 2013

Sharepoint search returns property doesn’t exist

This error can occur if refinement calls for values that doesn’t exist in the search services Managed Properties.

When search has been executed, edit page and edit the Refinement Panel webpart property  imageunder Refinement>Filter Category Definition

Below is the standard output on a unedited. Compare to your values and see what differs.

<?xml version="1.0" encoding="utf-8"?><FilterCategories> <Category Title="Result Type" Description="The file extension of the item" Type="Microsoft.Office.Server.Search.WebControls.ManagedPropertyFilterGenerator" MetadataThreshold="5" NumberOfFiltersToDisplay="4" MaxNumberOfFilters="0" SortBy="Frequency" SortDirection="Descending" SortByForMoreFilters="Name" SortDirectionForMoreFilters="Ascending" ShowMoreLink="True" MappedProperty="FileExtension" MoreLinkText="show more" LessLinkText="show fewer"> <CustomFilters MappingType="ValueMapping" DataType="String" ValueReference="Absolute" ShowAllInMore="False"> <CustomFilter CustomValue="Adobe PDF"> <OriginalValue>pdf</OriginalValue> </CustomFilter> <CustomFilter CustomValue="Email"> <OriginalValue>eml</OriginalValue> <OriginalValue>msg</OriginalValue> <OriginalValue>exch</OriginalValue> </CustomFilter> <CustomFilter CustomValue="Excel"> <OriginalValue>odc</OriginalValue> <OriginalValue>ods</OriginalValue> <OriginalValue>xls</OriginalValue> <OriginalValue>xlsb</OriginalValue> <OriginalValue>xlsm</OriginalValue> <OriginalValue>xlsx</OriginalValue> </CustomFilter> <CustomFilter CustomValue="Image"> <OriginalValue>tif</OriginalValue> <OriginalValue>tiff</OriginalValue> </CustomFilter> <CustomFilter CustomValue="Lotus Notes"> <OriginalValue>nsf</OriginalValue> </CustomFilter> <CustomFilter CustomValue="OneNote"> <OriginalValue>one</OriginalValue> </CustomFilter> <CustomFilter CustomValue="PowerPoint"> <OriginalValue>odp</OriginalValue> <OriginalValue>ppt</OriginalValue> <OriginalValue>pptm</OriginalValue> <OriginalValue>pptx</OriginalValue> </CustomFilter> <CustomFilter CustomValue="Publisher"> <OriginalValue>pub</OriginalValue> </CustomFilter> <CustomFilter CustomValue="Text"> <OriginalValue>odt</OriginalValue> <OriginalValue>txt</OriginalValue> <OriginalValue>url</OriginalValue> <OriginalValue>csv</OriginalValue> </CustomFilter> <CustomFilter CustomValue="Visio"> <OriginalValue>vdw</OriginalValue> <OriginalValue>vdx</OriginalValue> <OriginalValue>vsd</OriginalValue> <OriginalValue>vss</OriginalValue> <OriginalValue>vst</OriginalValue> <OriginalValue>vsx</OriginalValue> <OriginalValue>vtx</OriginalValue> </CustomFilter> <CustomFilter CustomValue="Webpage"> <OriginalValue>ascx</OriginalValue> <OriginalValue>asp</OriginalValue> <OriginalValue>aspx</OriginalValue> <OriginalValue>htm</OriginalValue> <OriginalValue>html</OriginalValue> <OriginalValue>jhtml</OriginalValue> <OriginalValue>js</OriginalValue> <OriginalValue>mht</OriginalValue> <OriginalValue>mhtml</OriginalValue> <OriginalValue>mspx</OriginalValue> <OriginalValue>php</OriginalValue> <OriginalValue></OriginalValue> </CustomFilter> <CustomFilter CustomValue="XML"> <OriginalValue>xml</OriginalValue> </CustomFilter> <CustomFilter CustomValue="Word"> <OriginalValue>doc</OriginalValue> <OriginalValue>docm</OriginalValue> <OriginalValue>docx</OriginalValue> <OriginalValue>dot</OriginalValue> <OriginalValue>nws</OriginalValue> </CustomFilter> <CustomFilter CustomValue="Zip"> <OriginalValue>zip</OriginalValue> </CustomFilter> </CustomFilters> </Category> <Category Title="Site" Description="Which site this document is from" Type="Microsoft.Office.Server.Search.WebControls.ManagedPropertyFilterGenerator" MetadataThreshold="5" NumberOfFiltersToDisplay="4" MaxNumberOfFilters="20" SortBy="Frequency" SortByForMoreFilters="Name" SortDirection="Descending" SortDirectionForMoreFilters="Ascending" ShowMoreLink="True" MappedProperty="SiteName" MoreLinkText="show more" LessLinkText="show fewer" /> <Category Title="Author" Description="Use this filter to restrict results authored by a specific author" Type="Microsoft.Office.Server.Search.WebControls.ManagedPropertyFilterGenerator" MetadataThreshold="5" NumberOfFiltersToDisplay="4" MaxNumberOfFilters="20" SortBy="Frequency" SortByForMoreFilters="Name" SortDirection="Descending" SortDirectionForMoreFilters="Ascending" ShowMoreLink="True" MappedProperty="Author" MoreLinkText="show more" LessLinkText="show fewer" /> <Category Title="Modified Date" Description="When the item was last updated" Type="Microsoft.Office.Server.Search.WebControls.ManagedPropertyFilterGenerator" MetadataThreshold="5" NumberOfFiltersToDisplay="6" MaxNumberOfFilters="0" SortBy="Custom" ShowMoreLink="True" MappedProperty="Write" MoreLinkText="show more" LessLinkText="show fewer" > <CustomFilters MappingType="RangeMapping" DataType="Date" ValueReference="Relative" ShowAllInMore="False"> <CustomFilter CustomValue="Past 24 Hours"> <OriginalValue>-1..</OriginalValue> </CustomFilter> <CustomFilter CustomValue="Past Week"> <OriginalValue>-7..</OriginalValue> </CustomFilter> <CustomFilter CustomValue="Past Month"> <OriginalValue>-30..</OriginalValue> </CustomFilter> <CustomFilter CustomValue="Past Six Months"> <OriginalValue>-183..</OriginalValue> </CustomFilter> <CustomFilter CustomValue="Past Year"> <OriginalValue>-365..</OriginalValue> </CustomFilter> <CustomFilter CustomValue="Earlier"> <OriginalValue>..-365</OriginalValue> </CustomFilter> </CustomFilters> </Category><Category Title="Enhet" Description="Enheter" Type="Microsoft.Office.Server.Search.WebControls.ManagedPropertyFilterGenerator" MetadataThreshold="3" NumberOfFiltersToDisplay="3" MaxNumberOfFilters="20" ShowMoreLink="True" MappedProperty="Enhet" MoreLinkText="show more" LessLinkText="show fewer" /></FilterCategories>

Wednesday, February 20, 2013

Search doesn’t work

Al too common issue is that searchfunction i Sharepoint blows a fuse for unclear reasons.

Usually when migrating sites from one server to another.

Following situation has occurred with Search Server 2010 Express & Sharepoint Foundation 2010 and Sharepoint Server 2013.


  • Search returns “property doesn't exist or is used in a manner inconsistent with schema settings” clip_image001
  • Search throws an exception “Internal server error exception” clip_image002
  • Search just doesn’t find anything

This usually fixes it.

  1. Create new page based on Enterprise template Basic Search Page. Give it a good name like
  2. Try it if the search works there.
  3. If it does map the main searchfunction to this new searchcenter instead.
    1. Site Collection Administration> Search Settings
    2.  clip_image003
    3. Change Search Center Url to /searchcenter/ and change results page url to the one you got when you search from the searchcenter. Usually results.aspx if someone hasn’t been fiddling.

If the Search Service Application shows any funny business, like not being able to resolve user names. Its usually better to create a new SearchService.

What to think about when creating a new Search Service:

1. Make sure to use an account that has full dbo to the contentdatabases.

2. Make a full crawl after its created, make sure that your sites are listed in the “Content Source>Local Sharepoint Sites” settings in the SearchService Application. It usually is.

3. Edit Web Application Service Connection to make sure that the new Search Service Application is associated. Remove the old one.

Tuesday, February 19, 2013

Can’t update or uninstall Firefox

While trying to install Firefox 19 over previous Firefox 17 installation the following issue occurred.



  • When trying to run installationpackage for Firefox 19 message appears showing “Your computer must be restarted to complete a previous upgrade of Firefox. Do you want to reboot now?”
  • When trying to uninstall Firefox 17 same message occurs.

Restarting didn’t make any difference. Same message after 5 restarts.


  • Delete all files in Mozilla Firefox folder ending with –delete
  • Delete file firefox-exe.moz-upgrade in Mozilla Firefox installation folder.
  • Run uninstall again, and then install Firefox 19.


Check serial on computer

Sometimes this needs to be verified remotely. Script below gets the job done.

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colBIOS = objWMIService.ExecQuery _
    ("Select * from Win32_BIOS")
For each objBIOS in colBIOS 
    Wscript.Echo "Serial Number: " & objBIOS.SerialNumber

Paste in script.vbs

Not my code, but found it long ago and cant find the source.

Schedule reboot of Server 2008 R2

We always need to configure it, but how was that syntax again…

Create new item in scheduler, in action browse for c:\windows\system32\shutdown.exe , add arguments /r /d p:1:1


/r         Full shutdown and restart the computer.

/d [p|u:]xx:yy  Provide the reason for the restart or shutdown.
           p indicates that the restart or shutdown is planned.
           u indicates that the reason is user defined.
           If neither p nor u is specified the restart or shutdown is

P     1       1       Hardware: Maintenance (Planned)

Thursday, February 14, 2013

Workflows doesn’t autostart

still in Sharepoint 2013, the same issue. Though I’ve enabled mailto function on a list the workflows doesn’t start when new item is created.

Check if its activated

1. stsadm –o getproperty –pn declarativeworkflowautostartonemailenabled

If this shows : <Property Exist=”No” />


2. stsadm -o setproperty -pn declarativeworkflowautostartonemailenabled -pv true

Then try mailing the list again and the workflow should kick in.


Wednesday, February 06, 2013

Powershell on Sharepoint server bonkers

If sharepoints powerhell starts with ”the local farm is not accessible. Cmdlets with featuredependencyid are not registered.”
This could be cause for some reason the wrong powershell version starts up.
Try running />powershell –version 2
If need be to add sharepoint modules, use following:
/> add-ps-snapin Microsoft.sharepoint.powershell