Tuesday, September 30, 2008

Event ID 6482,7076,6398,27745

For past few days I have noticed errors in my event logs on the MOSS server. The errors were related to event ids 6482,7076,6398,27745. The description was:

Event Type: ErrorEvent Source: Windows SharePoint Services 3Event Category: General Event ID: 27745Date: 30/09/2008Time: 3:23:52 AMUser: N/AComputer: AUYXUAP310WBC32Description:The description for Event ID ( 27745 ) in Source ( Windows SharePoint Services 3 ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: #50071: Unable to connect to the database SharePoint_Config on SharePointSQLServer_Dev. Check the database connection information and make sure that the database server is running..

Event Type: ErrorEvent Source: Windows SharePoint Services 3Event Category: Timer Event ID: 6398Date: 30/09/2008Time: 3:23:52 AMUser: N/AComputer: AUYXUAP310WBC32Description:The Execute method of job definition Microsoft.Office.Server.Administration.ApplicationServerAdministrationServiceJob (ID 4dbd717a-6f8a-4595-8d03-6e21a6551257) threw an exception. More information is included below.
Not enough storage is available to complete this operation.

And similar errors regarding insufficient memory. There are many other suggestions on web but the one that fixed the errors for me was:

-For errors related to Event IDs 6482,7076,6398, I have to install hotfix 923028 available here:http://support.microsoft.com/kb/923028

-For error related to Event ID 27745, I have to stop and start the Windows SharePoint Services Timer service with following command:

net stop “Windows SharePoint Services Timer”
net start “Windows SharePoint Services Timer”

Saturday, September 27, 2008

Error When starting Windows SharePoint Search service

Last week I got stuck with few errors when starting WSS Search Service. Below are few errors that were thrown:



Error1:
Event ID: 10036
A database error occurred.
Source: Microsoft OLE DB Provider for SQL Server
Code: 6 occurred 1 time(s)
Description: [DBNETLIB][ConnectionOpen (Connect()).]Specified SQL server not found.

Error2:
Error Description: Could not access the Search service configuration database.


Few tips to avoid this kind of error:


  • Make sure the search service account has got DBCreator role on DB server. You can remove this role once the service is started.

  • Offcourse your normal Farm Admin service account also needs DbCreator and SecurityAdmin role.

  • I have read someone saying to use Named Pipes for remote connection. But this is not true it should work with TCP/IP connection as well. So in your SQL server make sure that your remote connection is enabled for either TCP/IP or Named Pipes or for both.

  • Make sure the DB Server name in your connection string is consistent in your farm for all other webapps, admin content config database etc etc..

  • Finally the solution that worked for me was that I was using "DB server name\Instance, port" as the connection string and this format of connection string uses Named Pipes. Unfortunately Named Pipes was disabled so I have to use an Alias of the DB server to use the TCP/IP connection. Also once the alias is setup for you by the DBA's you have to set it up on the MOSS server under SQL Server Client Configuration settings. You can also use server name if you are using default instance for TCP/IP.

I hope that makes sense. If anybody has any more suggestions or corrections to my suggestions then please do leave a comment.

Cheers,

Kunal

SharePoint Capacity Planning Tool

Not sure if some of you have already come across this tool. So instead of reading the whole capacity-planning documentation, you can get a rough idea of your hardware needs and farm topology design. Just enter information such as the number of users, locations, bandwidth and network topology, preferred hardware, and usage profiles. After you provide the tool with basic information about your organization, the tool provides a first approximation of the topology your organization needs.

Good tool for infrastructre guys!

Download Here or follow the link:

http://www.microsoft.com/downloadS/details.aspx?familyid=DBEE0227-D4F7-48F8-85F0-E71493B2FD87&displaylang=en

Sunday, September 14, 2008

Create Databases before deploying MOSS

In many organizatons there are certain policies and procedures where only DBA's can create databases. Now when installing MOSS 2007, the install creates the databases automatically that means they need to give the service account permissions to create database on DB server. This kind of breaks the organizational policy. Do you agree guys? No? Yes? Anyways these are the policies set by organization and we have to abide by them. So what do we do in these situations? Luckily there is a procedure where we can deploy MOSS using DBA-created databases. TechNet provides us with steps where DBA's can create databases on DB servers and Farm Administrators can configure them separately. Have a look at this TechNet article:

http://technet.microsoft.com/en-us/library/cc262869.aspx

Saturday, August 30, 2008

SharePoint Best Practices

Guys the Best practices series is available on TechNet worth having a read:

http://technet.microsoft.com/en-us/office/sharepointserver/bb736746.aspx

Friday, August 29, 2008

Burn ISO images on a Virtual CD

Found this great tool which allows us to mount ISO images as Virtual CD's. This saves us time and cost of buying CD's or DVD's. The tool is called as Virtual CD Control Panel. This tool allows you to mount any ISO image onto a virtual CD drive. The steps to install and configure this tool are included in the readme.txt file that comes with the download. You can download it from here:

http://download.microsoft.com/download/7/b/6/7b6abd84-7841-4978-96f5-bd58df02efa2/winxpvirtualcdcontrolpanel_21.exe

How good is that?? No need to buy a CD/DVD. Just mount the tool whenever you need to run the install.

Thursday, August 28, 2008

Attaching SPItemEventReceiver with a List Type

In my last post I have talked about writing an SPItemEventReceiver for fetching a workflow instance out of a Task item in a Task List type. Next step that comes to our mind is how we can attach this event receiver with a List. There are two ways in which you can attach your event receiver to a list type. One is through a feature: in elements.xml file you can write CAML and have Receiver attributes. another way is by using object model. I will explain you both the ways:

1) Feature way:

Create a feature.xml in the normal way as you do for any other feature. Here is the example:



"<"!--Created by Kunal Kochhar at 18/08/2008 10:21:18 AM--">"
"<"Feature Id="66D0E36C-4D48-46D0-90E9-7BFGHFBE4E3C" Title="Item receiver attacher" Description="This feature will attach event handler to a task item generated by Disposition workflow" Version="1.0.0.0" Scope="Web" Hidden="false" ImageUrl="CustomBranding.gif" xmlns="http://schemas.microsoft.com/sharepoint/"">"
"<"ElementManifests">"
"<"ElementManifest Location="elements.xml" /">"
"<"/ElementManifests">"
"<"/Feature">"



Now write the elements.xml file. This file will have Receivers tag. Read here more about Receivers element:

http://msdn.microsoft.com/en-us/library/ms431081.aspx

Let me show you the elements file:

'<'elements xmlns="http://schemas.microsoft.com/sharepoint/"'>'
'<'Receivers ListTemplateId="107"'>'
'<'Receiver'>'
'<'Name'>'TaskAdded'<'/Name'>'
'<'Type'>'ItemAdded'<'/Type'>'
'<'SequenceNumber'>'10043'<'/SequenceNumber'>'
'<'Assembly'>'assemblyname, [full four part]'<'/Assembly'>'
'<'Class'>'namespacename.classname'<'/Class'>'
'<'Data'>''<'/Data'>'
'<'Filter'>''<'/Filter'>'
'<'/Receiver'>'
'<'/Receivers'>'
'<'/Elements'>'



As you can see I am saying ListTemplateId=107 in the Receivers element. This id is the List Template Id for Tasks list type. You can refer to more list template ids here: http://msdn.microsoft.com/en-us/library/ms431081.aspx
Once you deploy and activate this feature on web it will attach your required event handler with all the existing tasks lists or any new ones that you create.

2) Lets see the second approach which is through code. The SPWeb object exposes list templates and contenttypes collections. You can retreive the required list template type and content type and can add your eventreceiver assembly in their eventreceivers collection. Here is an example to add it to a content type:

SPWeb web = SPContext.Current.Web;
SPContentType ct = web.ContentTypes["Tasks"];
SPEventReceiverDefinition receiverDef = ct.EventReceivers.Add();
receiverDef.Name = "Custom_ItemAdded";
receiverDef.Type = SPEventReceiverType.ItemAdded;
receiverDef.SequenceNumber = 10012;
receiverDef.Assembly = "assembly, [full four part assembly details]";
receiverDef.Class = "namespacename.classname";
receiverDef.Update();

I hope this will help some of you. If you have any queries in relation to this then please feel free to write to me.
Dogpile
Powered By Blogger