SharePoint / WSS 3.0 SQL Database not found error

By Namwar Rizvi - Last updated: Tuesday, July 21, 2009

While reading the newsgroups, I found a neat solution to share with my readers. If you have deleted content databases of a site collection but you are still getting an error similar to the following in error log

SQL Database ‘WSS_Content_345’ on SQL Server instance ‘DBS1’ not found.

It is because SharePoint config database still has a record of deleted database and trying to connect to it.

Solution:

Run the deletecontentdb stsadm command similar to the following :

stsadm -o deletecontentdb -url http://wss.company.com/sites/name1
-databasename WSS_Content_2

stsadm -o deletecontentdb -url http://wss.company.com/sites/name1

It will delete the old database entry from SharePoint Config database.

Share
Filed in Errors, Solutions, Tips • Tags: , , , , ,

How to display Web Part Maintenance Page in SharePoint

By Namwar Rizvi - Last updated: Sunday, July 19, 2009

Often your web part page starts behaving strangely or giving you errors due to some buggy script or web part. This sometimes even stops you to open page in edit mode because of Java Script errors.

Don’t worry, there is a very simple way to delete those web parts. Just append ?contents=1 at the end of the URL of respective page and SharePoint will open the Web Part Maintenance Page for it.

For example, if the URL of problematic page is

http://MOSServer/Test/default.aspx

then Web Part Maintenance Page url will be

http://MOSServer/Test/default.aspx?contents=1


Share
Filed in Solutions, Tips • Tags: , ,

List of all SharePoint Back-End databases

By Namwar Rizvi - Last updated: Thursday, July 16, 2009
SharePoint stores end-user content and application configurations across multiple relational databases in the back-end database servers. At a high level, the following are the relational databases:
 Configuration database: Stores topology and configuration information for the complete deployment. Every farm has exactly one configuration database. For information about the configuration database protocols, see Configuration Database.
 Central Administration content database: Stores content associated with the Central Administration site.
 Shared Services Providers (SSP) database: Stores content and configuration for Shared Service Providers (SSPs), such as the user profile services. The capabilities of SSPs are described in [MS-SPFEPO], Section 2.2.2 (Shared Service Provider).
 Shared services administration content database: Stores content for the shared services administration site.
 Content database: Stores all end-user and site content. For information about content databases and protocols, see List and Library Storage.
 Search property store: The search metadata index that stores properties related to pieces of content that are indexed for full-text querying. For information, see section 7.4.1.1.2.
11 of 43
[MS-SPBEPO] SharePoint Back-End Protocols Overview – v1.0
[MS-SPBEPO]: SharePoint Back-End Protocols Overview
Copyright © 2008 Microsoft Corporation.
Release: Friday, June 27, 2008
 Single sign-on database: Stores credentials for end-users to access information from external applications through SharePoint. For information about the protocols used to access the single sign-on (SSO) database, see Business Data Catalog Protocols.

As described by Microsoft in SharePoint Back-End Protocols Overview

SharePoint stores end-user content and application configurations across multiple relational databases in the back-end database servers. At a high level, the following are the relational databases:

  1. Configuration database: Stores topology and configuration information for the complete deployment. Every farm has exactly one configuration database.
  2. Central Administration content database: Stores content associated with the Central Administration site.
  3. Shared Services Providers (SSP) database: Stores content and configuration for Shared Service Providers (SSPs), such as the user profile services.
  4. Shared services administration content database: Stores content for the shared services administration site.
  5. Content database: Stores all end-user and site content.
  6. Search property store: The search metadata index that stores properties related to pieces of content that are indexed for full-text querying.
  7. Single sign-on database: Stores credentials for end-users to access information from external applications through SharePoint.
Share
Filed in Architecture, Debugging, Guidance, Management, Tips • Tags: , , , ,

Access Denied while changing name of a Document of Document Library

By Namwar Rizvi - Last updated: Sunday, June 21, 2009

It is natural to assume that if you have Modify permission on any SharePoint item/document then it means you can update any property of that document, right? Wrong! You can update any property of a document/item except Name property. This is because in SharePoint terms, changing the name of the document means two things:

  1. Creating a copy of the current document with the new name and
  2. Deleteing the current document.

If you don’t have Delete permission and just have Modify permission then you can modify every property except the Name property.

So, if you are getting Access Denied error while changing the Name of a document of a SharePoint Documnt Library and you know that you have the Update/Modify permission on that doucment then make sure you also have Delete permission on that document.

Share
Filed in Configuration, Guidance • Tags: ,

How to add custom CSS in your WebPart

By Namwar Rizvi - Last updated: Sunday, June 14, 2009

If you want to add custom CSS file for your webpart, here is the code:

  1. protected override void CreateChildControls()
  2. {
  3. base.CreateChildControls();
  4. CssLink cssLink = new CssLink();
  5. cssLink.DefaultUrl = “/_layouts/Test.css”;
  6. this.Page.Header.Controls.Add(cssLink);
  7. }
Share
Filed in C#, Solutions, Tips • Tags: , ,

Quickest way to copy files from GAC

By Namwar Rizvi - Last updated: Saturday, May 30, 2009

Yes, I know how painful it is to realize that you can not copy an assembly out from Global Assembly Cache (GAC), at least not by usual way of copying a file from a windows folder. Don’t worry, there are some ways to do it and the quickest way to browse the GAC and copy files from it is to just map a drive on Windows\Assembly folder.

Here you go, 

  1. From Start-Run type cmd to launch command prompt
  2. Type subst Z: C:\windows\Assembly and press Enter
  3. Thats it!

Now, you got a drive Z which is mapped to your GAC folder and you can easily open it in Windows Explorer and copy files from it.

Isn’t it easy?

Share
Filed in Management, Tips • Tags: , ,

User Profile Import is not updating changes in Manager property of Active Directory

By Namwar Rizvi - Last updated: Monday, May 25, 2009

Some of you might have experienced an issue that if you update manager  property of any user in Active Directory, it does not get reflected in SharePoint Profile Import. This issue has been identified as a bug in Profile Import and can be fixed by Installing Service Pack 1 of MOSS/WSS.

The reason behind this bug is that SharePoint Profile Import does not detect change in Manager property due to some weired reasons.

If you can not install service Pack 1 then you can fix it by implementing a workaround as follows:

  1. Open SharePoint Central Administration
  2. Navigate to your SharedService Provider e.g. SharedServices1
  3. Under User Profiles and MySites click User Profiles and Properties
  4. Under User Profile Properties , click View profile properties
  5. Click New Property
  6. Add ModifyTimeStamp property and map it to ModifyTimeStamp property of Active Directory.
  7. Click OK
  8. Perform Full Import of user profile
  9. Perform Full Crawl and you are done!
Share
Filed in Uncategorized

Microsoft SharePoint Designer is now Free !

By Namwar Rizvi - Last updated: Tuesday, April 7, 2009

SharePoint Designer Team at Microsoft has announced at its blog here that Anyone can use SharePoint Designer as a free tool. This is really a step in right direction and will help SharePoint community to build better user experiences. 

You can download the SharePoint Designer from here

Share
Filed in Customization, Tools • Tags: , , ,

How to Search on Last Modified By field in SharePoint Advanced Search

By Namwar Rizvi - Last updated: Wednesday, April 1, 2009

If you are wondering why you are unable to find any search result for Last Modified By filed in Advanced Search of SharePoint then don’t worry, you are not alone. This is one of the bug which still exist in SharePoint 2007 Server Search engine. I have found a solution posted by Pritam Dhake ina  SharePoint forum. I have used this solution and it works like a charm.

Here are the steps to manually hook the Last Modified By field to the creawled field.

  1. Open Central administration -> Shared Services -> SharedServices (X being the number of the shared services provider for the site you are creating a mapping)  – > search settings -> metadata property mappings 
  2. Click “Modifiedby” to edit the properties 
  3. Make sure  “Include values from all crawled properties mapped” is selected
  4. Click “add mapping” and select the “Office” category from the dropdown list. 
  5. look for a property named “OFFICE:8” , click “OK
  6. Click “add mapping” and select the “ows_Last_x0020_Modified(text)” from the ALL categories dropdown list, Click “OK
  7. Make sure the box is checked “Allow this property to be used in scopes”, click “OK
  8. Click on “Crawled Properties” link on the left side of the Shared Services Administration page. 
  9. Click On the “Office” Category.
  10. The mapped property you just created should be listed in the “Mapped To” column of the Office:8(Text) category.
  11. Click on the Office:8(Text) category to view the properties.
  12. In the “name and information” section, you should see the “property Set ID:” value is  ‘F29F85E0-4FF9-1068-AB91-08002B27B3D9‘ …This is very important!!!
  13. In the “Mappings to managed properties” section the managed property you edited in steps 2 – 7 should be listed. 
  14. The box to “Include values for this property in the search index” should be checked.
  15. Click “OK” to exit this page.
  16. Open “Shared Services administration” -> “ShareservicesX” -> “Search Settings” -> “Content Sources and crawl schedules” 
  17. Click on “Local Office SharePoint Server sites” to expand the dropdown list and select “Start full crawl” 
  18. When the crawl has completed, navigate to the site collection -> click on the search tab. 
  19. Select “Advanced Search” 
  20. In the properties dropdown list select “Last Modified By
  21. Select contains
  22. Enter a name that you know has added / edited a document
  23. Click the magnifier to execute the search
  24. Get back results.
Share
Filed in Bugs, Search, Solutions • Tags: , , , ,

Solution for "Virtual PC has detected an invalid or missing Product ID" error

By Namwar Rizvi - Last updated: Friday, March 27, 2009

If you are like me and use Virtual PC for developing SharePoint solutions, then you may have encountered the error “Virtual PC has detected an invalid or missing Product ID”.  It happens because Virtual PC try to find its product ID in registry, (Yes! I know Virtual PC never asked you to enter the Product ID during installion) and if it does not find it there then it displays this error.

virtual-pc-product-id-error

Here is the quick fix for this error:

 

  1. Open System Properties window by clicking System in Windows Control Panel
  2. You will get the screen similar to the following
  3. system-properties1

  4. Copy the 20 digit long number displayed under Registered to: 
  5. Goto Start->Run
  6. Type regedit, It will launch the registry editor
  7. Navigate to the following registry node My Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Micorosoft\Virtual PC\5.0\Registration
  8. Edit the value of PID, by double clicking it
  9. Paste the value of Windows Product ID, you have copied earlier. Following is an example screen shot of registry
  10. virtual-pc-registry

  11. Now you can run the Virtual PC normally 🙂
Share
Filed in Configuration, Solutions • Tags: , ,