Tuesday, August 11, 2009

Profile Sync not working

I came across an issue with the Site Memberships link when using the Personalization feature Site Memberships. This automatically adds a link that you are a MEMBER of to your MyLinks-SharepointSites feature.

Unfortunately when you are either removed from a membership group or the site gets deleted the links do not get updated.

After researching and finding a resolution it actually resolved another issue we were having. When a user's profile information changes the information within the sites they have access to do not get updated. So for example, my title changed from Assoc. Systems Administrator to Systems Administrator and when logging into the Portal and selected the dropdown on my name on the top of the page and clicking on My Settings which brings you to the _layouts/userdisp.aspx page. The information never gets updated. The only way to update this so far was to login to a site and make some type of edit, upload, delete. This would manually cause the Profile Sync to run.

How did this happen?
We moved content database improperly!
Why does this break the sync? We store the ID for the content database in the Config database. By not moving the content database properly we don't prepare the SSP for a new GUID, and the Timer Jobs will continue to try to sync with the old GUID not allowing us to sync with the new one.

The preparetomove operation was introduced before Infrastructure Update. Once SP2 is applied this is no longer required.
How I fixed was:
a. Run the command stsadm -o sync -listolddatabases 1 You should then get a list of database GUID.
b. Run the command stsadm -o sync -deleteolddatabases 1 This will remove the record from the SSP database but will not touch the actual Content Database.
c. Then wait for the next sync and you should see tags getting updated.

To force the Profile Sync timer job to run use this command:stsadm -o sync -synctiming "m:5" (This sets it to 5 minutes) To set it back to 1 hour use this:stsadm -o sync -synctiming "h:1"

This fixed my user profile issue and the Site Memberships issue. I will wait a few days and verify it's still working.

"Edit in Data Sheet" Display Error on 2003 after installing SP3

When trying to use Edit in Data Sheet view after applying SP3 to Sharepoint 2003 users get nothing. There is a fix I found that resolved the issue.

Open the file ows.js (Path: C:\Program Files\Common Files\MicrosoftShared\web server extensions\60\TEMPLATE\LAYOUTS\1033) on your sharepointserver and search for the Method PortalPinToMyPage. After this insertfollowing javascript code:


function RenderActiveX(str){
document.write(str);
}

Restart your server ( I didn't even have to restart and it worked fine)
Visit any Sharepoint List and Ctrl-F5 the page and It's works !!!!
It came from this post.
http://www.eggheadcafe.com/conversation.aspx?messageid=33280331&threadid=33251953

Delete Orphan App Pools

When I browse to Central Administration -> Operations -> Service Accounts -> Choose Web application pool -> Choose Windows SharePoint Services Web Application. In the list of Application Pools you will see any application pool ever created. Even if they were deleted. I found this post to help me delete them.

I found the ID by using Codeplex free tool SharePoint Manager. Here you will see all app pools as well. I wasn't sure if I could delete from here or not so to be safe I used the command below.
stsadm.exe -o deleteconfigurationobject -id


http://blogs.technet.com/nishants/archive/2008/10/10/how-to-delete-orphan-configuration-objects-from-sharepoint-farm.aspx

You actually can just delete from SharePoint Manager.

Remove Title from RSS Feed.


Edit the webpart and open the XSL editor.
The section in the XSL that affects the display of the feed's Title is

Just comment out the div class="groupheader item medium" piece of code


Site Collection created half-way - Orphan

I tried for weeks to delete a site collection that has somehow got created halfway.

When I go to Central Administration - Application Management - Delete Site collection and click on the site I want to delete I see blank data in the right hand side and when I select it the delete button is greyed out. When trying to delete from stsadm I get the error:

Cannot complete this action.

Please try again.

I tried to delete it with stsadm -o deletsite -force but still same error.
Someone recommended deleting the content db. So what I did was

Created a new content db.
Backed up all Site Collection within the Content DB.
Deleted all Site Collections using that Content DB.
Made the original Content DB offline.
Restored all Site collections back and they automatically get created in the New Content DB.

Then removed the original content db and the half-way created site collection is gone.
No more bogus site collections.

You should also be able to just remove the content db and add it back but I felt I needed to back them up to be safe. I only had a few. If you have hundreds you may have to do it that way.

Go to Content DB where orphan site collection is and make note of all settings. Select remove content db and then go to stsadm and do an addcontentdb with the same exact name. Your site collections will reappear without the orphaned one.

Error deleting site due to MS IT Site Delete

While trying to delete a site collection we are receiving this error:

Delete site operation cancelled by user. Check the log files for additional details

After hours and hours of research I checked the Windows Assembly folder. Though we uninstalled the MS IT Site delete program the .dll was never uninstalled. Once I uninstalled it the site in question now deleted successfully.

Error opening site: HRESULT:0x80041051

Received this error in QA after stopping the Forefront services.
According to this post it states to run:http://social.technet.microsoft.com/Forums/en-US/forefrontSharePoint/thread/3f20ae34-03ba-4da0-af20-2b6cfa61663b/

SELECT *
FROM Docs
WHERE (VirusStatus > 0) AND (VirusStatus IS NOT NULL)

You should get results. Then run:
Update dbo.allDocs Set VirusVendorID=NULL, VirusStatus=NULL, VirusInfo=NULLwhere (VirusStatus > 0) AND (VirusStatus IS NOT NULL)

Sites should be accessible. But we had issues still. So I had to start the Forefront services and stop it from within Forefront by disabling manual scan and bypassing realtime scan. Then ran the queries again and all sites were functional.