AT - SharePoint

we are SharePoint-ers

stsadm command to add and delete solution

To add a solution:

stsadm -o addsolution -filename webpartabc.wsp

To delete solution:

stsadm -o deletesolution -name "webpartabc.wsp" -override

Filed under  //   MOSS 2007   SharePoint   WSS 3.0  

SharePoint maximum path length

Apparently, files and folders that were created or uploaded to a SharePoint site cannot exceed the allowed limit for path length, which is 260 characters.

Here is an example:

http://www.mysite.com/folderA/folderB/filenameABC.doc

- SharePoint will count the characters starting from folderA and exclude the domain name.  In this case there are 31 characters

Here is how you can check to the total number of characters for your folders and files in SharePoint:

- Run the following SQL Script

SELECT LEN(DirName + 'N/' + LeafName) AS Total, DirName, LeafName 

FROM AllDocs WITH (NOLOCK) 

ORDER BY Total DESC

Filed under  //   MOSS 2007   SharePoint   WSS 3.0  

Content DB has been deleted from SQL Server but still get an error 'A SharePoint database named ‘….. ‘ already exists'

This happened to me after I tried to restore few sites with their content databases from CA.  The restoration failed but the content DBs were created in SQL Server but were not displayed in CA.  I simply deleted those databases from SQL Server.  Unfortunately, this caused me not being able to create a new content DB with the same name from CA.  The error message was

  • 'A SharePoint database named ‘….. ‘ already exists'
The solution to this problem was to run the following script on the SharePoint_Config database
  • Delete FROM Objects WHERE Name = 'name of the ghost db'

 

Filed under  //   Error   MOSS 2007   Restore   SharePoint   WSS 3.0  

Could not find stored procedure 'proc_MSS_GetCrawlHistory' error

You would probably encounter this error when you restore a backup copy of your site that was still on WSS 3.0 or MOSS 2007 SP1 to a farm with SP2 installed.

Upgrade your SharePoint from SP1 to SP2 by following the necessary/required steps.  Backup the site again and do the normal restore procedure. 

How to see actual ASP.NET errors in SharePoint pages

Here are the steps to see the actual exception details:

  • Go to your SharePoint web application virtual directory in the file system - inetpub/wss/virtual directories/[port number]
  • Locate the web.config file
  • Open the file and look for the tag <SafeMode ...
    • This is the first child tag under <SharePoint>
    • You can see the tag syntax something similar to this
    • <SafeMode MaxControls="200" CallStack="false" DirectFileDependencies="10" …….
  • One of the attributes for <SafeMode is called CallStack, which holds the boolean value which tells to SharePoint framework whether to show the actual exception details or not
  • Set the CallStack value to true
  • Set the CustomErrors section to Off
    • <customErrors mode="Off" />

Filed under  //   ASP.NET   Development   Error   MOSS 2007   SharePoint   WSS 3.0  

Steps to restore your contents and configurations to a new server farm

1. Restore MySite from Central Administration

2. Restore SSP from Central Administration

a. After a successful restore, go to your SSP site

b. Go to My Site settings

c. Point the Personal site provider to the restored MySite earlier

d. Correct all the other SSP settings and configurations to point to the new server farm

e. Test MySite and ensure everything including user profiles have been imported successfully into the new server farm

3. Repeat the following steps to restore all site collections:

a. Add a new content database in Central Admin->Application Management

b. Use the following command to restore site collection

i. stsadm –o restore –url http://yoursite/sitecollectioname -filename yourfilename.dat

c. add –overwrite switch at the end if there is an existing site collection

4. Install (deploy & activate) custom solutions on WFE servers

5. Install (deploy & activate) external libraries to Global Assembly Cache (GAC)

6. Restore the following specific folders and files in Web Front End servers from backup:

a. 12 Hive\TEMPLATE\CONTROLTEMPLATES

i. Custom web user control files (.ascx) are located here

b. 12 Hive\TEMPLATE\LAYOUTS\1033\STYLES

i. Custom style sheets (.css) are located here

c. 12 Hive\TEMPLATE\THEMES

i. Custom themes (CUSTOMBLUE) are located here

d. 12 Hive\TEMPLATE\LAYOUTS\1033\spthemes.xml

i. Custom themes folders added in (c.) shall be configured in this configuration file

7. Restore IIS metadata and configuration files from backup:

a. C:\inetpub\wwwroot\wss\VirtualDirectories\portnumber

b. In each of the portnumber folder, the following need to be backed up

i. web.config file

ii. global.asax file

iii. _app_bin folder

iv. Bin folder

Filed under  //   MOSS 2007   Migration   Moving   Restore   SSP   SharePoint   WSS 3.0  

"Cannot connect to the configuration database" error

If you see this error after a successful restore of a site collection, check your SQL Server remote connections settings:

  • Open up SQL Server 2005/2008 Surface Area Configuration
  • Choose Surface Area Configuration for Services and Connections
  • Select Remote Connections under your own database engine
  • Ensure that Local and remote connections is selected
  • Ensure that Using both TCP/IP and named pipes is selected
  • Restart your SQL Server

Filed under  //   Error   MOSS 2007   Restore   SharePoint   WSS 3.0  

OnPostRestore error might be caused by SharePoint Cache

If you get OnPostRestore error during restoration process in SharePoint, one of the things that you might need to do is to clear SharePoint cache

  • Go to Services and stop Windows SharePoint Services Timer service
  • Go to C:\ProgramData\Microsoft\SharePoint\Config\GUID directory
  • Create a copy of cache.ini file
  • Edit the cache.ini file and change the number to 1
  • Delete all the xml files
  • Start Windows SharePoint Services Timer service

Filed under  //   Error   MOSS 2007   Restore   SSP   SharePoint   WSS 3.0  

Items to backup before moving your contents and configurations to a new server farm

  1. Backup MySite from Central Administration
    • Ensure all running processes have been stopped especially the content crawler and other auto backup and restore jobs/timers
  2. Backup SSP from Central Administration
    • Ensure all running processes have been stopped especially the content crawler and other auto backup and restore jobs/timers
  3. Backup all site collections using the stsadm command
  4. Backup all the existing ‘12 Hive’ folder – C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\
  5. Backup the following specific folders and files in Web Front End servers:
    • 12 Hive\TEMPLATE\CONTROLTEMPLATES
      • Custom web user control files (.ascx) are located here
    • 12 Hive\TEMPLATE\LAYOUTS\1033\STYLES
      • Custom style sheets (.css) are located here
    • 12 Hive\TEMPLATE\THEMES
      • Custom themes (i.e. CUSTOMBLUE) are located here
    • 12 Hive\TEMPLATE\LAYOUTS\1033\spthemes.xml
      • Custom themes folders added in (c.) shall be configured in this configuration file
  6. Backup IIS metadata and configuration files
    • C:\inetpub\wwwroot\wss\VirtualDirectories\portnumber
    • In each of the portnumber folder, the following need to be backed up
      • web.config file
      • global.asax file
      • _app_bin folder
      • bin folder

Filed under  //   Backup   MOSS 2007   Migration   Moving   SharePoint   WSS 3.0  

How to delete a default SSP (Shared Service Provider) in MOSS 2007

The default SSP can be deleted only if its the only SSP in the farm.

To delete it, either type in the URL: http://servername/_admin/deletessp.aspx?sspId= or use stsadm –o deletessp –title

Example: http://servername/_admin/deletessp.aspx?sspId=132642e1-0e75-44a5-bebb-dc8d552fa7b2

Sometimes, if the stsadm command for deleting the ssp fails, you've got to add the -force switch.

Filed under  //   MOSS 2007   SSP   SharePoint   WSS 3.0