Wednesday, June 1, 2011

SharePoint 2010 - SAP Integration Kit

Donovan from MS OBA have recently released a SharePoint 2010 - SAP Integration Kit. I am still exploring it, have a look here if you are interested. The kit comes with sample web service, BCS App Definition files, walk through, install guide etc.

Tuesday, May 31, 2011

Mavention SP 2010 Site Checker

Just saw a new tool available in market developed by Waldek Mastykarz. Apparently this tool does a quality check on your SharePoint 2010 Internet facing site. Have a look here. There are some other good useful tools developed by this team. Have an explore!

Keep up the good work guys!

Monday, December 13, 2010

Business Connectivity Services limits

Found this information from one of the blog posts: http://www.astaticstate.com/feeds/posts/default?orderby=updated

Putting the extract here for my future reference.

Business Connectivity Services limits


-There is a hard limit of 5,000 external content type definitions that can be loaded into memory at any given time.
-There is a limit of 500 external system connections that can either be active or open at any given time. The default is set to 200 and it does not matter what type of connection is being used either.
-The default is 2,000 database items that can be returned in a request when using the database connector. The boundary is 1 million.
-There are three variables that you must always consider: the number of items in the external list, the number of columns per item and the size of each item.
-Profile pages display data from external content type data. The performance of these pages is driven by the complexity of the associations to external systems.
-The internal process for bringing external data into SharePoint via BCS is pretty simple. There is load (queries external source and loads into SharePoint), process (applies sort, filter, group processing) and render (display data onto page). BCS does not have in-memory cache for external items. Data has to go through load, process and render each time an external list is refreshed. Knowing this you need to make sure you control the amount of data that is processed at any given time.
-Microsoft's recommendation is to keep the number of items to be processed as possible by reducing the amount of items returned from external systems. It is recommended to keep the number of returned between 100 to 500 rows and it is recommended to not exceed 2.000 rows. -It is recommended to use filters to ensure you work within these guidelines. More can be returned if needed but this needs to be done by an administrator.
-Rendering external list can be intensive for both the WFE and the application server. It is recommended to keep the number of items being displayed at any time to around 30. Note that the number of items that are rendered is not the same amount of items that were processed. The number of items rendered is controlled by the external list view that is on a SharePoint page.
-It is recommended to reduce the number of columns from external list. Obviously a large number of columns will affect performance.
-When rendering it is recommended not to use large-sized columns in list views. Columns larger that 1KB should not be utilized in a view. However performance is more affected by the number of items and not the size. So it is recommended always try to keep the number of items lower for better results.
-When designing an external list which is using BCS, make sure the default view will be the view the user needs to see the most. If the user needs to sort or filter the view, that will require data go back through the load, process and render process.
-For a profile page, the number of associations is the key for good performance. It is recommended to not exceed two associations. There will be lower performance of both throughput and latency when large number of items in an association.
-Diagnostic logging of BCS can become a factor for performance and it is recommended to lower when not doing testing.
-Performance of the external system will have performance implications to BCS and you need to sure those systems perform well.

Friday, July 9, 2010

SP2010-Visual Studio 2010-Console Application:The Web application at could not be found. Verify that you have typed the URL correctly.

As any other application development process we use console application time and again to test piece of code. Now when developing in a Visual Studio 2010 and SharePoint 2010 environment, when using straight console application project and when trying to use :

SPSite site = new SPSite(http://dev/)

It throws an error:

"The Web application at could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application."

We would developing normally thinking that VS 2010 Console Application project template would have taken care of everything, but unfortunately, the platform target for Console App is still X86 but in fact we are on SP 2010 server which is always going to be a 64 bit machine.

Solution:
  • Goto project properties of console app.
  • Click Builds tab
  • Change the Target Platform to "Any CPU"
  • And you should get your SPSite object instantiated successfully.

Tuesday, June 22, 2010

PowerShell Tips for SharePoint 2007 and STSADM Lovers

Here is a quick guide for PowerShell tips in SharePoint 2010:

http://www.powergui.org/servlet/KbServlet/download/2812-102-4534/SharePoint2010PowerShell.pdf

And this Technet article gives a complete mapping of STSADM commands with PowerShell Commands:

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

SharePoint 2010 DataSheet View - The list cannot be displayed in DataSheet view for one or more of the following reasons

After Installing Office 2010 if you try to use DatasheetView option in SharePoint 2010 List, you are thrown with a error:

The list cannot be displayed in DataSheet view for one or more of the following reasons: blah blah.....

For some reason Access is still relying on AccessDatabaseEngine which is a 2007 Office System Driver: Data Connectivity Components. Microsoft doesn't say much about this component as a prerequisite either.

Download and install this component and it will fix your error.

http://www.microsoft.com/downloads/details.aspx?familyid=7554F536-8C28-4598-9B72-EF94E038C891&displaylang=en

Wednesday, May 5, 2010

Web Platform Installer could not start

The error when running Web Platform Installer doesn't say much. Just make sure you have downloaded the right bit version of this software and the error will go away.

x86 version: http://go.microsoft.com/fwlink/?LinkId=146053
x64 version: http://go.microsoft.com/fwlink/?LinkId=146055

Tuesday, February 2, 2010

Update Item properties after document is checked in without checking out again

There might be cases when you would want to update an Item's/Document's property after it has been checked in. You would not want to checkout the item again as you want to maintain the version number that was generated by UI checkin. For example in my case I wanted to update a field when the document was published with major version and approved by approval workflow.

You could not do in ItemUpdating because some fo the fields are not exposed in Item.AfterProperties collection and also it would result in an infinite loop.

Option left is ItemUpdated event, but in this even the document is already being checked in and published with major version. So how can you do it without checking out the document again. This is what you can do:

SPSecurity.RunWithElevatedPrivileges(delegate
{
if (file.Item.ModerationInformation.Status == SPModerationStatusType.Approved)
{

file.Item["DocumentNumber"] = "XYZ";
file.Item.SystemUpdate(false);
}
}

Doing Item.SystemUpdate(false) does not increments the version number and does not update modified date or modified by and running under elevated privilegs it does not look to check out the document.

Hope it will be helpful to some one.

Thursday, December 31, 2009

The form template associated with this form was moved or cannot be accessed. The form template on your computer has the same form ID as the template

Many of you might have come across this shitty error while developing custom InfoPath forms and deploying them to SharePoint. I have spent ages in playing with InfoPath in troubleshooting this error and many others. I will explain quick fix for this error for the moment.

"The form template associated with this form was moved or cannot be accessed. The form template on your computer has the same form ID as the template associated with the form, but it is from a different location."

Now, lot of times you would deploy InfoPath form to SharePoint document library or content type using the Publish wizard feature. In my case I had to deploy my custom DIP (Document Information Panel) to a custom content type. Now I had written a feature receiver for content type which assigns my custom DIP to the content type once the content type is created by feature. Since I had developed InfoPath form on my dev machine and deploying it to dev SP site it complains about Form ID as in above error. This error means that when you developed a form on your machine and saved it, it has added a publishURL attribute as the saved location. Now even if you publish this form to SharePoint, the publish URL remains the same. So the buggy publishing wizard doesn't update this attribute. So when my document with custom DIP is opened it tries to fetch the InfoPath form from SharePoint location where publishedURL is a path on my machine where the form was developed and saved and it gets confused when trying to create it from SharePoint location.

So we know the fix now its easy : Remove the publishURL from the form isn't it?
YES and NO, the solution is easy but actually fixing it is not. To change this URL its pain in right place!!! If you use InfoPath designer option of "Save as source files" and then change the manifest.xsf and then save it again using InfoPath designer then the publishURL attribute is repopulated. So you have to do this removal outside of InfoPath.

Below are the steps to remove publishURL attribute from the form:
  1. Rename .XSN form to .CAB
  2. Extract all files from CAB file to a temporary folder.
  3. Open manifest.xsf file using Visual Studio or in a notepad.
  4. On the very first node (root node), remove name and publishURL attributes. Just get rid of those devils!!!.
  5. Now you need to repackage those files into a cab file - So we will use makecab.exe tool.
  6. Create text file in same location where your folder with extracted files are. Name it something like makefilename.txt. This file is like .ddf file if you have played with generating .wsp packages. Anyways, lets not get distracted, so what will go in this file? Well just copy following script and replace the names:
  7. ;************************************************************
    ; MSDN Sample Source Code MakeCAB Directive File
    ;************************************************************

    .OPTION EXPLICIT

    .Set CabinetNameTemplate=Replacefilename.XSN

    ;*****************************************************************
    ; Change DiskDirectoryTemplate to where you want the CAB/XSN saved.
    ;*****************************************************************
    ;********Replace this path with your where you want to create the cab file********
    .set DiskDirectoryTemplate="C:\Documents and Settings\kk\Desktop\ContentTypes\DocumentTemplates"
    .Set Cabinet=on
    .Set Compress=on

    ;*************************************************
    ; List Every File You Want Added To The CAB (XSN)
    ;*************************************************

    "C:\Documents and Settings\kk\Desktop\ContentTypes\DocumentTemplates\min1\AO.xsl"
    "C:\Documents and Settings\kk\Desktop\ContentTypes\DocumentTemplates\min1\Context.xml"
    "C:\Documents and Settings\kk\Desktop\ContentTypes\DocumentTemplates\min1\Context.xsd"
    "C:\Documents and Settings\kk\Desktop\ContentTypes\DocumentTemplates\min1\dc.xsd"
    "C:\Documents and Settings\kk\Desktop\ContentTypes\DocumentTemplates\min1\dcmitype.xsd"
    "C:\Documents and Settings\kk\Desktop\ContentTypes\DocumentTemplates\min1\dcterms.xsd"
    "C:\Documents and Settings\kk\Desktop\ContentTypes\DocumentTemplates\min1\GetUserProfileByName1.xml"
    "C:\Documents and Settings\kk\Desktop\ContentTypes\DocumentTemplates\min1\GetUserProfileByName3.xsd"
    "C:\Documents and Settings\kk\Desktop\ContentTypes\DocumentTemplates\min1\GetUserProfileByName4.xsd"


    ;*****************
    ; End Of The File
    ;*****************
  8. You will notice in your folder you have either more or less files to be packaged, if they are less then its easy to put them manually, but if the form is higly customised like mine was I had like 20 files to be packaged. You can get all the filenames in a text file easily by running DOS command from the folder location as mentioned below:
  9. dir "." /b >>fileListing.txt
  10. Now you can copy the filenames form filelisting.txt and place them in above makefilename.txt file with paths appended in front
  11. Now run makecab utility as: makecab /f C:\Documents and Settings\kk\Desktop\ContentTypes\DocumentTemplates\makefilename.txt
  12. You can find your new xsn file at the mentioned location.
Now in many cases this problem wouldn't arise because usually you publish the form directly from InfoPath. But since in my case I have to deploy everything as a package I have to make these changes in my .xsn file after it has been designed finally and then generate a deployment package. I will explain you in my next post on how to package your custom InfoPath DIP and apply it to you content type as part of a feature.

Thursday, October 22, 2009

SharePoint 2010 Secrets

Any one interested in knowing about what to expect from SP 2010. Read here: http://www.sharepoint2010beta.com/SharePoint2010SecretsIssue1.pdf

And look for more sneak peek videos here:
http://sharepoint2010.microsoft.com/Pages/default.aspx

Thursday, September 10, 2009

Error while trying to run project: Unable to start debugging ... The components for the 64-bit debugger are not registered

I had installed Visual Studio 2008 64 bit version on Windows Server 2008 and after install it complains about this error. Tried the specifed solution but remote debugging components are not a part of the features list in install setup. So digged down the install cd and found
"Remote Debugger/x64" folder. There we go found the installer about which Visual Studio was complaining. Error is gone! And I can hit F5 in my project without any errors :-).

Thought I will post this if someone might end up in same situation and so don't have to waste time digging around for solutions.

Wednesday, September 9, 2009

Could not normalize the SPItem after installing SharePoint Connector for FAST

I had setup SharePoint connector on my FAST server and provided SharePoint username and password which has go read access to sharepoint site. However, when starting the document processing the content retreiver fails and complains about not being able to retreive content because of unauthorized access to the item its trying to retrieve. Following is the exact error details: com.fastsearch.esp.connector.sharepoint2007.adapter.SPAdapterController: Could not normalize the SPItem 3b370549-3f6f-4d3f-b7c8-1d98884101ce;450526c0-5b6c-452a-a655-b1093b7e9d46;1. Exception: com.fastsearch.esp.cctk.framework.NormalizationException: Could not get content for the url: 'http://moss/Lists/Announcements/DispForm.aspx?ID=1'. Exception: com.fastsearch.esp.cctk.framework.AdapterException: Error downloading file: http://moss/Lists/Announcements/DispForm.aspx?ID=1 from server: moss.gnosispower.com HTTP Status code: 401. HTTP Status msg: Unauthorized Looking on the IIS logs for the get request for "'http://moss/Lists/Announcements/DispForm.aspx?ID=1" no username is associated. Not sure which user account document processing stage is using to retrieve the content.

So investigated further on this issue and ended up solving it by configuring Web Authentication Proxy. For some reason one of the dcoument processing stage when requesting content from sharepoint was not using the SharePoint username/password specified in the configuration. So have to setup Web Authentication Proxy to force it to use a specified account while retrieving content.

Hope it might help some one, sometime :-)

Friday, August 28, 2009

“Could not connect to config server at 16005”

Today I dived into installing FAST evaluation version at my home server. First thing I see in the Admin GUI Logs is an error thrown something like below:

“Could not connect to config server at 16005”

Initially the error doesn't tell you much about the real issue, but having a closer look at logs list it was complaining something about "License file cannot be checked out".

Well there can be few reasons for this license file complaint, either the format of port details or FQDN or any other entry is not right as it should be or something else that could be missed easily. So I went into the /etc directory where FAST was installed and looked at fastsearch.lic fileAt closer look only (or may be because of my dumbness LOL!!) I found that the license file was expired. So there we go all I have to do is to request for another evaluation version and upgrade my license file at this location:
FASTSEARCH%\etc\fastsearch.lic and restart FAST installation. (restart is done by simply going into Start->Programs->FAST ESP->Stop FAST->Start FAST)

Note: Even the evaluation version is not freely available you will have to be a partner or customer of FAST/Microsoft to be able to get a valid license.

Cheers,
Kunal

Tuesday, July 7, 2009

asp.net ajax client-side framework failed to load

"asp.net ajax client-side framework failed to load"

Many of you must have seen this error on some occasions or the other. While there are many posts if u google regarding this error, saying different things. For me it was a strange situation, so the solution provided in this post might be or might not be applicable in your case. But it's worthwhile to give it a go as there is a reason why this error came up in my situation.

Little bit of background: I had this web app running on my VM. Project was created using VS 2008 and VM was having upto .Net 3.5. And the ajaxcontroltoolkit.dll was in the bin folder.

Now I moved this visual studio solution into my home server having VS 2008 and .Net 3.5 SP1. Everything running fine on home server.

Next day I had to take the solution back into my VM on work machine. So copied the solution, opened it and hit F5 (to run the web app!). And what is see on my face is "asp.net ajax client-side framework failed to load".

I tried looking for various solutions by googling it. But none of the solutions made sense to me or didn't fit my situation. Then I thought of leaving the google aside and stressed my mind trying to find the differences. Offcourse .Net 3.5 SP 1 was not available on my VM, but then why should it effect ajaxcontroltoolkit assembly? Still trying to go with gut feeling, I applied .Net 3.5 SP 1 on my VM and saw that the error ranaway.

Now my web app runs fine and the ajax controls were loading fine. Apparently the assembly was JiTed on my home server with SP1 updates which I have to bring to same state on my VM.

Another option you could also try is to repair your .Net 3.5 or .Net 3.5 SP1.

Tuesday, January 20, 2009

Is MOSS a Records Management System?

I have been asked now and then from my clients and friends a question: Whether MOSS is a Records Management System?

To answer the question in 2 letters. "NO" its not a Records Management System. Having said that MOSS does provide lot of features and capabilities to work as a records management system. Out of the box MOSS provides us with a Records Centre Site template which gives great deals of webparts and features that suits Records Management System. Want to see in detail? Check Here: http://technet.microsoft.com/en-us/library/cc261706.aspx

As per some of the requirements in Commonwealth Government Archiving policy following statements has to be met for a records management system:

· management and tracking of both physical and electronic documents and records, specifically semi-active and inactive records
· records disposal
· document and records metadata and classification
· conversion of record types, other than those created with MS Office products, to long-term, open preservation formats
· reporting for records management purposes
· electronic recordkeeping storage for automated workflows which would enable documents to be captured as records as part of normal business processes, and
· maintain records in series, consignments, unit for archiving.

More details on the archiving policy is found here:
http://www.naa.gov.au/Images/archweb_policy_tcm2-902.pdf

Lot of the requirements as per the policy can be achieved with MOSS by having a Record Centre portal where documents or records can be directed from main MOSS portal. Check here .Now depending upon to what level the policy needs to be met, customization will be required. Customization could involve following:

-Redirection code from MOSS portal to MOSS records center.
-Records disposal can be achieved by using the Information
-RightsManagement Policy – Expiration policies.
-Metadata information can be stored with the document using content types in MOSS.
-Conversion of records created from Office products will involve custom code or use of conversion tools.
-Reporting of records management is available to an extent for any further reporting it will involve development of custom reports.
-Workflows can be initiated to divert documents to records centers from MOSS portal.

However, TRIM is used as a records repository in most of the government departments. If we need documents in MOSS portal to be integrated with TRIM, then there are 3rd party solutions available which does seamless integration between MOSS-TRIM. These solutions can be leveraged to achieve the desired requirements, some of them available and know in the market are as follows:

TiPS for SharePoint from Infocentrik : http://www.infocentrik.co.nz/solution-partners/tower-software/tips-sharepoint-integration/index.html . This tool does the integration and automatic routing in a great way. Also provides search capabilities and more.

HP TRIM Module: http://h71028.www7.hp.com/ERC/downloads/4AA2-0922ENW.pdf . This is a well known tool as well which does routing of documents and other integration levels.

There is a solution provided by TowerSoftware for TRIM Context.

So in nutshell if just MOSS needs to be used for Records Archiving to meet the archiving policy we need some customization. If TRIM is being used then we need to look for options for integration.

Saturday, January 3, 2009

How to repair a SUSPECT SQL database

Firstly a very Happy and a Prosperous new year to everyone!

As usual I was doing things on my VPC and I noticed that one of my SQL database was marked suspect. After some thought I guessed that the reason for the database to be marked suspect is because of me turning off my VPC without proper shutdown. The same reason why a DB can be marked suspect after a power failure. Now I was in a fix because I didn't had backup (Another dumb thing to miss on my part). So what should I do now? Well some research brought me good results, ended up framing following query:

EXEC sp_resetstatus ‘DBname’;
ALTER DATABASE DBname SET EMERGENCY
DBCC checkdb(’DBname’)
ALTER DATABASE DBname SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DBCC CheckDB (’DBname’, REPAIR_ALLOW_DATA_LOSS)
ALTER DATABASE DBname SET MULTI_USER

So all you have to do is copy and paste above query in query analyzer and replace DBName with your database name. And you are good to go now!

Friday, November 14, 2008

SPDisposeCheck Tool will be available soon

Memory management in SharePoint coding is always been an ongoing issue and topic of dicsussin among developers. When to dispose SPWeb and SPSite objects when not to is been a biggest confusion. There have been many best practices and white papers from experts which talks about this but there are some confusions still pending and it becomes diffcult to judge and find when you have 1000s of lines of code and classes written. Microsoft wants to help us developers for writing quality code which takes care of memory dispose and makes best use of available memory. There is a tool coming up soon as mentioned in MSDN SharePoint blog. Read more here and wait for the Memory Doctor to be released ;-)

http://blogs.msdn.com/sharepoint/archive/2008/11/12/announcing-spdisposecheck-tool-for-sharepoint-developers.aspx

Thursday, November 6, 2008

MCTS 70-542

Ok its been quite busy in last few weeks. Lot of developments and excitements happening. News! I have successfully passed MOSS Application development exam (70-542). Some tips to clear this exam:

A very good undeerstanding of MOSS as a platform.
Good hands on creating and developing BDC's.
Good knowledge on Excel services and UDF's and related object model
Understand Search configurations, settings and related object model.
Understanding of IRM policies.
Portal template.
Some understanding on Audience and User profile.

Check the preparation guide:
http://www.microsoft.com/learning/en/us/exams/70-542.mspx

Also do the e-learning course collection 6071 if you can (Its worth the money!):
https://www.microsoftelearning.com/eLearning/offerDetail.aspx?offerPriceId=138720

And if you have any questions then feel free to contact me.

Friday, October 17, 2008

Installing 64 bit MOSS with a 32 bit SQL Server (Using SQL Alias)

I have come across a issue which took me a while to figure out the reason.

Problem: I was installing 64 Bit Version of MOSS and configuring the databases on a 32 Bit SQL server. Now on the MOSS server I had 32 bit SQL client tools to setup the SQL server alias. So my connection string when configuring MOSS was "SharePointSQLServer" for the SQL server 10.x.x.x on instance ABC01 port 1435 (10.x.x.x\ABC01, 1435). Now I was setting up the alias on MOSS server using SQL client tools. For some reason confuguration wizard was not detecting the correct SQL alias and was throwing me error of cannot connect to DB server.

Solution and Attempts:
  • I tried different sets of aliases but no help. For example tried using machine name instead of IP, tried using FQDN of machine name, tried without instance name. No help!
  • Then I thought it might be 32 bit client tools. So I tried removing 32 bit version and installed 64 bit version of SQL client tools. Still No help!
  • Worked Solution: Then I went through the registry entries at:
(32 Bit Location)
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\MSSQLServer\Client\ConnectTo

The SQL client tools add the regisrty entry to this location for 32 bit applications running on 64 bit operating System. But MOSS 64 Bit configuration wizard was not reading from this location and instead trying to use the Alias name directly from some other location.

So I went and checked in registry entries at this location:
(64 Bit Location)HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Client

And there was no ConnectTo key. So even after installing 64 Bit version of SQL client tools the conenction string was not getting set at above location and was going into Wow6432Node key which is used for 32 bit applications. So I created a ConnectTo key by exporting from 32 Bit Location (Wow6432Node) and importing into 64 Bit Location so that my registry key on MOSS server looks like this:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Client\ConnectTo

And checked that the value of connection string is: "DBMSSOCN,SharePointSQLServer,PortNumber"

And guess what? Yes it worked!

So on 64 Bit Windows 2003 machines if you get any issues related to entries in regisrty keys then you know where and what to look for :-)

Let me know if you have any questions on this.

Cheers,
Kunal

Wednesday, October 8, 2008

Error Event ID 5555, Event ID 7888 after changing Web App Association with new SSP

I had come across a strange issue which exposes some of the inabilities of MOSS. I had to recreate SSP in a SharePoint Farm. I then went and changed the association of web applications to point to new SSP so that I can get rid of old faulty SSP. (It was faluty because the search was stuck on "Crawling Full (Computing Ranking)" status and when tried to remove the SSP it was then stuck on "Unprovisioning" status). So to remove the old SSP:
- I created a new SSP.
-Associated web applications from old SSP to new SSP through Central Administration.
-Change the default SSP to new one.
-Deleted the old SSP including all associated databases.
-Deleted old SSP web application.

After this next day I saw in event logs there were errors thrown related synchronization of MySite and Portal web application with content databases. The errors were as below:

Event Type: ErrorEvent Source: Office SharePoint ServerEvent Category: User Profiles Event ID: 5555Date: 8/10/2008Time: 1:01:00 PMUser: N/AComputer: AUYXUAP310WBC32Description:Failure trying to synch web application ab1d413c-4e4b-40af-b9f2-61fedadb385d, ContentDB 4876d341-5349-4396-b0a9-3cb6f5110b1c Exception message was Cannot open database "WSS_SharedServices2_DB" requested by the login. The login failed.Login failed for user 'ESDEVAU\SRV-SHRPT07'.
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.

Event Type: ErrorEvent Source: Office SharePoint ServerEvent Category: Office Server General Event ID: 7888Date: 8/10/2008Time: 1:01:00 PMUser: N/AComputer: AUYXUAP310WBC32Description:A runtime exception was detected. Details follow. Message: Cannot open database "WSS_SharedServices2_DB" requested by the login. The login failed.Login failed for user 'ESDEVAU\SRV-SHRPT07'.
Techinal Details:System.Data.SqlClient.SqlException: Cannot open database "WSS_SharedServices2_DB" requested by the login. The login failed.Login failed for user 'ESDEVAU\SRV-SHRPT07'. at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Open() at Microsoft.Office.Server.Data.SqlSession.OpenConnection() at Microsoft.Office.Server.Data.SqlSession.ExecuteReader(SqlCommand command, CommandBehavior behavior) at Microsoft.Office.Server.Administration.SharedObjectStore.GetObject[T]() at Microsoft.Office.Server.Administration.SharedResourceProvider.Microsoft.Office.Server.Administration.ISharedObjectStore.GetObject[T]() at Microsoft.Office.Server.Administration.SharedApplicationCollection`1.GetValue(SharedResourceProvider sharedResourceProvider) at Microsoft.Office.Server.Administration.SharedApplicationCollection`1.get_Item(SharedResourceProvider sharedResourceProvider) at Microsoft.Office.Server.ServerContext.GetApplication[S,T](String name) at Microsoft.Office.Server.Search.Administration.SearchContext..ctor(ServerContext serverContext, Boolean cached) at Microsoft.Office.Server.Search.Administration.SearchContext.GetContext(SharedResourceProvider sharedResourceProvider) at Microsoft.Office.Server.UserProfiles.SRPSite.SynchronizeManagedPropertyMappings() at Microsoft.Office.Server.UserProfiles.SRPSite._Init(ServerContext serverContext) at Microsoft.Office.Server.UserProfiles.SRPSite..ctor(ServerContext serverContext) at Microsoft.Office.Server.UserProfiles.UserProfileConfigManager..ctor(ServerContext serverContext) at Microsoft.Office.Server.UserProfiles.ContentDBSynchronizer.SynchContentDB() at Microsoft.Office.Server.Diagnostics.FirstChanceHandler.ExceptionFilter(Boolean fRethrowException, TryBlock tryBlock, FilterBlock filter, CatchBlock catchBlock, FinallyBlock finallyBlock)
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.

These errors are related to profile synchronization issues. As WSS and MOSS has got different storage of User Profile data the "SYNC" job runs every 1 hour by default to synchronize data between the content databases. And Web Application stores these profile data. But for some entry in content databases of web application it still thinks that it has to open old SSP database. So now we have to clean the entries in following manner:

-Firtly get the GUIDs of all the web applications and content databases as thrown in the error long.
-Use this GUID to find the web application name because of which sync is going crazy. You can either use SharePoint Inspector or SharePoint Manager to find these details. Both can be downloaded from http://www.codeplex.com/spm and http://www.codeplex.com/spi
-Since I didn't prepared the web application's content database before changing the SSP hence all the issue started. So probably (I haven't tried yet) if we do this step before changing the association then we might not run into this situation. So now we have to fix the synchronization of content databases using "preparetomove" STSADM command. When the preparetomove operation is not run prior to moving the content database, synchronization can fail on a particular content database that has been moved to a new Web application. Synchronization is fixed for that content database by using this command. We will run this command for every web application and corresponding content database as follows:

stsadm -o preparetomove -site %WEBAPP% -oldcontentdb %GUID Of Content DB from Error Log%

-Once this command is run successfully we need to detach and reattach all the faulty content databases with their web applications again. You will do this by using "deletecontentdb" and "addcontentdb" STSADM commands as shown below:

stsadm -o deletecontentdb -url %WEBAPP% -databaseserver %DBSERVER% -databasename %DBNAME%
stsadm -o addcontentdb -url %WEBAPP% -databasename %DBNAME% -databaseserver %DBSERVER%

After doing this you can wait for next synchronization which occurs every hour by default or change the sync timing default value temporarily by using following command:

stsadm -o sync -synctiming "m:5" (This will run synchronization in every 5 minutes)

Wait for 5 minutes and check your error log. You will not see any reported errors.

Reset the sync timing back to default value of 1 hour
stsadm -o sync -synctiming "h:1"

Hopefully this will help you in resolving similar errors or issues.

Kunal
Dogpile
Powered By Blogger