Monday, October 24, 2011

Recovering your SQL Server 2005 db from suspect status

Today I noticed that the central admin application on one of my machines was not responding and after looking in the event log and in Management Studio I found that the db was in suspect status.

How do I make it ok again?

The following advice fixed the problem for me anyway:


Thanks / Jakob


Wednesday, June 1, 2011

Restore SharePoint production content database to test environment

The other day we updated our system test environment based upon SharePoint 2007 with data from production for one of our customers.

The system test was already installed and we wanted to update to a more recent version. There are many different ways to do it if you ask around some more cumbersome than others. The following list is the simple steps that we took to get it up and running with new production data in system tes environment.
  1. Backup database in production and copy backup file to system test
  2. In system test envirionment go into "Central Administration > Application Management > Content Databases > Manage Content Database Settings" check remove and save
  3. Shut down sharepoint services
  4. Restore database with replace checkbox filled in SQL Server Management Studio
  5. Start sharepoint services
  6. In Central administration add content db
  7. Change site collection owner in the central administration for the wanted site collection.
  8. Make a new content crawl in SSP site to enable search
Thats all :)

Happy config

Tuesday, May 31, 2011

SharePoint indexing, mulitilingual search and swedish characters

Having problems finding words that include e.g. "åäö" when doing your SharePoint 2007 searches? You know the words are indexed and you are only able to find them when exchanging "å", "ä" with "a" and "ö" with "o". That would make important search capabilities useless in Sweden where these characters exists.

The underlying problem is that diacritic sensitivity is turned off be default which means that SharePoint treats these characters as accents. To make SharePoint index and search correctly run the following stsadm command:

"stsadm -o osearchdiacriticsensitive -ssp -setstatus TRUE"

The search capabilities can also be enhanced by enabling stemming on the search controls to be able to handle inflections.

Some more links regarding this:



Happy config / Jakob




Monday, April 25, 2011

CSS design

During my parental leave I did som css and SEO studying and tried to put it into practise. The site is a simple setup for my father in law which matches the requirements that he has to update the site to be a bit more clean and visible on the net. For a peak on the site have a look at www.juristfirmanbark.se.

Wednesday, April 13, 2011

ILSpy

Looking for an free alternative to .NET Reflector as Redgate is nowadays charging for Reflector? .NET Reflector is well worth its money but if you want to try an alternative, SharpDevelop has started working on ILSpy.

The tool is as it is in very early development not as powerful as Reflector when it comes to plugins and features but it will be fun to see the future of it. Already all the basic IL-functionality is in place which is great value to everyone when inspecting the internals of any assembly.

To try it out have a look here.

Tuesday, March 22, 2011

SharePoint 2010 accounts

I have installed some SharePoint 2010 servers now and this post will be a reminder for myself and everyone else about which accounts that should be in place on the domain. Essentially you need three accounts:
  1. One standard user account running the Sql Service and agent. I prefer to name it sql_service. No specific priviliges for this account

  2. One setup admin account sp_admin that will be used when installing SharePoint and future pathes and service packs. This account should be a domain user account and member of the local admin group on the machines in the farm. The account should also have securityadmin and dbcreator roles on SQL Server to be able to create databases during setup.

  3. One farm account sp_farm which will be the farm account that is used to login to central administration and accessing databases in the farm. This account have to be member of the local admin group on all servers in the farm.

For more information regarding the accounts:

http://www.sharepointproconnections.com/article/sharepoint/Least-Privilege-Service-Accounts-for-SharePoint-2010.aspx

http://msmvps.com/blogs/shane/archive/2010/07/15/what-service-accounts-do-you-need-to-install-sharepoint-2010.aspx

Happy setups

Saturday, February 12, 2011

customErrors in SharePoint 2010

The other day I wanted to debug an test environment where SharePoint 2010 was installed. To get informative output I made the normal changes that applies for a web application. Changed the customErrors elements mode attribute to "Off", set the debug attribute to "true" in the compilation element and set CallStack to "true" in the SafeMode element.

That would do it I thought.

After going through the different config files on the machine (machine.config and web.config) I found SharePoint 2010 has introduced a new file in the 14hive: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\web.config

In this file the customErrors element is set to "On" which overrides all changes that has been done on the web application level... It did not take so much time to find the solution for it but it was a bit frustrating and gave me some head scratching when all the "standard" settings did not have any effect. What had I done wrong... Good to know for future SharePoint projects :)