Wednesday, November 4, 2009

SubSite to Site Collection

Lets consider a scenario where a subsite (web) becomes substantially larger and you wish you could have a separate content database and hence decide to have a site collection (top-level site) instead of a subsite and you also want your users to continue browsing the same way they were doing earlier.

e.g. You have a subsite called TestSite http://ServerName/global/it/testsite. Now you want TestSite to become a Site Collection as you want to host it in a separate content database.

Here is the steps to confgure -

- Login with SharePoint Service Account (Farm Account)
- We have a subsite at http://ServerName/global/it/testsite
- STSADM -o export -url http://ServerName/global/it/testsite -filename C:\testsite.cmp -includeusersecurity -versions 4 (Make sure C:\ has got sufficient space to hold export for the TestSite)
- Delete the subsite http://ServerName/global/it/testsite
- Created an 'Explicit inclusion' at /ServerName/it/testsite from Central Administration > Application Management > Define Managed Paths
- Create a new site collection using stsadm –o createsiteinnewdb command > Choose /ServerName/it/testsite and create a site collection with a blank template
- STSADM -o import -url http://ServerName/global/it/testsite -filename C:\testsite.cmp -includeusersecurity
Browse to http://ServerName/global/it/testsite > Path looks exactly like previous subsite and the site is successfully imported and now testsite is a site collection.

Syntax for stsadm –o createsiteinnewdb
[More Info at http://technet.microsoft.com/en-us/library/cc262407.aspx]

stsadm -o createsiteinnewdb -url -owneremail someone@example.com

[-ownerlogin] [-ownername] [-secondaryemail] [-secondarylogin] [-secondaryname] [-lcid] [-sitetemplate] [-title] [-description] [-hostheaderwebapplicationurl] [-quota] [-databaseuser] [-databasepassword] [-databaseserver] [-databasename]

Note: The above method is recommended only for team sites. For sites with Publishing Feature activated there are some limitations with STSADM export / import and hence above operation may fail with an error message like “Data at the root level is invalid”. Read more here: http://blogs.technet.com/stefan_gossner/archive/2009/05/27/limitations-of-stsadm-o-export-import-related-to-publishing-sites.aspx

Tuesday, July 7, 2009

Office SharePoint Server Search Service stuck in stopping

Yesterday morning I saw some error in event log related to search. So I restarted search service and it got stuck in stopping, so I disabled search service and restarted server and started service, now it get stuck in starting. I tried to run "stsadm -o osearch -action stop", as lots of people suggested, but no help. Finally, I changed the “Log On As” to Local System, disabled the service and rebooted server. Once server started, re-enabled the service, started it, stopped it. Its working good. Now In central admin search service showing stopped, I restarted from there with service account. wow.. Everything perfect.

Now my next step was to figure out the reason of errors logging into event log. I reset everything, grant the WSS_WPG group Read and Write permissions on the tasks folder of search server. Now everything back to normal.

Hope my experience help others.

Nilesh

Thursday, May 21, 2009

Adding a Document Icon to a SharePoint Library

Steps to add an icon for .pdf files.

1. Save the image you wish to see as the PDF document icon to "\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Template\Images\pdf.gif" - You can download icon image from http://www.adobe.com/misc/linking.html. (17x17)
2. Edit "\Program Files\Common Files\Microsoft Shared\Web server extensions\12\Template\Xml\DOCICON.XML"
3. Add the following line. (Here value sould be your file name).

4. Repeat step 2 and 3 for all WFE.
5. run iisreset

Above given steps are for Sharepoint 2007. For Sharepoint 2003 version folder should be "60" instead of "12".

Monday, May 11, 2009

Save Site as Template not showing for Publishing site

In team subsite you can see a option save site as template under lok and feel. But If ypu want to save your publishing site as template. you won't see this link on site settings. To save publishing site as site template you need to go to the site settings of the site that you want to save as a template and replace the page name to savetmpl.aspx.
Ex:

http://ServerName/SiteName/_layouts/settings.aspx
to
http://ServerName/SiteName/_layouts/savetmpl.aspx

Hope this will help everyone.
If you want save as template should visible under look and feel for publishing site also, then you need to work more. I will publish complete steps in my next post.

Nilesh

Thursday, April 23, 2009

Remove webpart from a page

I was trying to implement a custom webpart on home page of site.Now home page was not accessible at all. Seems something wrong with my custom webpart.
To remove this webpart I just added
?contents=1 in the url and I can see configured web parts list of the page.
I selected culprit custome webpart and deleted. Now my page is back to life.

Thursday, April 16, 2009

Delete orphaned sites or items in sharepoint 2007.

To delete orphaned sites or item from a sharepoint site, we have 2 options.

Option 1.

  • Opened a command Prompt and went to this directory: C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN
  • Type following command to list the orphaned sites: stsadm -o databaserepair -url http://URLofWindowsSharePointServicesSite -databasename DatabaseName
  • To delete orphaned site :stsadm -o databaserepair -url http://URLofWindowsSharePointServicesSite -databasename DatabaseName -deletecorruption
    The above command might delete orphaned sites and items.

If above steps doesn't resolve orphan issue then apply below mentioned Option 2

Option 2

  • Go to command prompt as given in Option 1. Run command stsadm -o deletecontentdb -url http://URLofWindowsSharePointServicesSite -databasename "databasename" (remember database name)
  • Now run command stsadm -o addcontentdb -url http://URLofWindowsSharePointServicesSite -databasename "databasename"

I hope option 2 might resolve orphan issue.

Nilesh

Tuesday, April 14, 2009

When attempting to add content to a List you get the following error "Exception from HRESULT: 0x80040E14".

Check the SharePoint log files for the following error.
{datetime} OWSTIMER.EXE (0x05B8) 0x0934 Windows SharePoint Services Database 6f8g Unexpected Unexpected query execution failure, error code 9002. Additional error information from SQL Server is included below. "The transaction log for database 'SharePoint_Config_xxx' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases" Query text (if available): "{?=call proc_StartTimerRunningJob(?,?,?,?,?,?)}"

As the error states, the Transaction Log database is full or there is insufficient disk space. Trimming this DB or allocating more disk will should resolve the “Exception from HRESULT: 0x80040E14” error. You should not need to restart – it should just come good.

You need to clear some space in Sql Server drive.

Friday, April 3, 2009

Error Scheduling Crawls: Access is Denied (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

When I try to create a schedule in Content sources and crawl schedules of SSP, I get error Access is Denied (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).

So I searched to find out the solution and got this url
http://support.microsoft.com/kb/926959

Some people might be able to run the commands given there and succeeded.

But for me its no luck..

So I ran this command..
cacls %windir%\tasks /E /C /G wss_wpg:c

and did IISRESET.

Now everything perfect. Hope this will help others also.

Nilesh

Friday, March 27, 2009

Personal Sites vs. My Site

Personal sites and the My Site feature are separate features that are both available only in SharePoint Portal Server. Although the names of these two features are often used as synonyms for each other, they are not the same. Site administrators need a good understanding of the architectural differences between the two features to understand differences in the behavior of each.
Personal sites are Windows SharePoint Services sites that are created for individual users. Every user who has the Create Personal Site right can have a personal site. By default, the location of a user's personal site is portalname/personal/username, where portalname is the name of the portal and username is the name of the individual user.
My Site is a single page located in the SharePoint Portal Server site. By default, the path for this page is portalname/My Site/default.asp, where portalname is the name of the portal. Every user who accesses the My Site URL downloads the same page. However, users often don't realize this because some of the information on the page is personalized based on the user's profile information and information from the user's personal site.
So the difference between My Site and personal sites is that My Site is the portal page through which all users must pass to get to their own personal site. A user links to his personal site through the My Site page. It is hard to recognize that the My Site portal page is the same for everyone because it has personalization features. My Site is personalized based on a user's profile information, and it includes links to document libraries and lists that the user has created on her personal site.
The major architectural difference is that the My Site page is owned and controlled by the site owner, while a personal site is owned and controlled by the user. This means that a user can customize the contents and views of her personal site; however, when a user tries to personalize the My Site page, the choices are limited

Thursday, March 26, 2009

Shared Services - provisioning in progress - does not complete

I was trying to create a new SSP for other site collection on MOSS 2007. The 'Configuration of the shared services' seemed never to complete. In 'Manage this Farm's Shared Services' It says: 'Provisioning in progress' for new SSP. I solved this by starting the Windows Sharepoint Services Timer on second server, it was stopped and I also restarted timer on app server.

Monday, March 23, 2009

How to restore site using content db only

To restore a site on the same or different machine using the content db backup follow the steps given below:
Create a new Web application on the destination server.
Go to central admin --> content database . Click on the new web app content db.
Remove the content db.
Go to SQL server mgmt studio and create a new db with the same name as the content db backup you are having.
After creation right click restore. Choose the backup file location. From the options tab choose 'overwrite'.
Restore this db backup.
Go to central admin --> content database again and select ' add a content db ' to the web application.
specify the name of the restored db.
Done

Export sharepoint using stsadm command

if you have already exported a sahrepoint site or subsite then you can import it into another WSS site or into a WSS site sitting underneath your MOSS 2007 site. Here is the command line instructions:
stsadm.exe -o import -url
-filename
-includeusersecurity
-haltonwarning
-haltonfatalerror -updateversions <1-4>

1 - Add new versions to the current file
2 - Overwrite the file and all its versions
3 - Ignore the file
4 - Terminate with conflicts
-quiet
And here is an example:
stsadm.exe -o import -url http://sharepointsitname/NewlyImportedSite -filename C:\backups\backup.bak -includeusersecurity -haltonfatalerror -updateversions 1
This will import my backup file named backup.bak to the site named NewlyImportedSite that sites beneath my MOSS site, it will, of course, include all of the user security from the exported site, it will stop importing if it encounters a fatal error and will update the versions of the site instead of deleting them and replacing them.

Friday, March 20, 2009

The search service is currently offline.

I was configuring search for Sharepoint farm and I got message when I try to search "The search service is currently offline.". I found help from this thread.
Repeating steps again.

1. In the Component Services snap-in, expand Computers, expand My Computer, and double-click DCOM Config.

2. Locate application OSearch.

3. Right-click the program name, and then select Properties.

4. On the Security tab, in the Launch and Activation Permissions group box, select Customize, and then click Edit.

5. Add the user Network Services and grant permissions Local Launch and Local Activation.

6. Restart the computer.

Now search start working..

Sharepoint FBA site with ADAM authentication

I was searching for help to configure ADAM authentication provider for my FBA sharepoint site and I found below link is very useful.

http://blogs.pointbridge.com/Blogs/morse_matt/Pages/Post.aspx?_ID=2.

Hope this will help others also.

Thursday, March 19, 2009

Unprovisioning Shared services hanged

I had to delete my shared services which was not in use and its hanged forever.

Then I applied below command, it took some time, but finally deleted..

stsadm -o deletessp -title SharedServices1 -force

Change association of Shared services in central administration

1. If you do not want to change the web application hosting the my sites, before changing the association, edit my site setting for SSP B, set the my site to point to the old my sites URL and delete the temp my site web application, then perform the association
2. If you start from having just one web application that hosts all the sites (portal, ssp administration site host, my sites) here’s what you need to do to separate them:
Scenario :
portal url : http://portal/
Administration site host for the ssp http://portal/ssp/admin
mysites host http://portal/personal
Issue A: you cannot change the association for the administration site host of an ssp
i : create a new web application to host the administration site for the OLD SSP
http://newsite:10000/
backup the site at http://portal/ssp/admin
stsadm –o backup –url http://portal/ssp/admin –filename c:\sspadmin
ii. create a managed path (explicit inclusion) in the new site to point to /ssp/admin
http://newsite:10000/ssp/admin
restore the backup you just created at this location
stsadm –o restore –url http://newsite:10000/ssp/admin –filename c:\sspadmin –overwrite
change the ssp administration site host from http://portal/ssp/admin to http://newsite:10000/ssp/admin
stsadm –o editssp –title “your old ssp name” –sspadminsite “http://newsite:10000/ssp/admin”
Now you can change the portal association between the SSPs

Issue B:
how to move the mysites from http://portal/personal to a new webapplication at http://mysite/ ?
(mysite web application was created either when creating the new SSP as the new mysite host or manually using My Site Host template, in which case you need to add an wildcard inclusion to /personal manged path)
backup and restore
enumerate all the mysites that were already created (output it to a file for easier work):
stsadm –o enumsites –url http://portal/personal/ > c:\mysites.txt
edit the txt file and create 3 batch files ot of it:
one for backing up the mysites, one for creating the destination mysites , one for restoring from backup at the destination:
for instance, the following line from the initial file resulted (mysites.txt)
http://portal/personal/username Owner="Domain\username" SecondaryOwner="Domain\administrator" ContentDatabase="ContentDBName" StorageUsedMB="0.4" StorageWarningMB="80" StorageMaxMB="100" />

will become (in 3 bat files):
stsadm -o backup -url http://portal/personal/username -filename c:\backup\username.dat
stsadm -o createsite -url http://mysite/personal/username -sitetemplate SPSPERS -owneremail username@domain.com -ownerlogin "Domain\username"
stsadm -o restore -url http://mysite/personal/username -filename c:\backup\username.dat –overwrite
same for the rest of my sites

Retraction or deployment timer job hangs

During the execution of a retraction/deployment the timer job may hang showing 'Retracting' or 'Deploying' and never completes.

This is cause from one of the WFE not being able to finalize the retraction or deployment.

To resolve this issue go to each WFE in the farm and execute stsadm.exe -o execadmsvcjobs.
This command take time to complete.

Tuesday, February 10, 2009

How to install Visual Studio Extensions for Windows Sharepoint Services 1.2 on Vista or Windows XP (VSeWSS.exe)

To install VSeWSS.exe 1.2 on a Vista or XP machine. First download it from Microsoft site then make one change in registry, so that it fool the installer. I added the following key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0]
Then add the string Value:
"Sharepoint"="Installed"
The solution was originally posted by Fernando Felman.
http://fernandof.wordpress.com/2008/02/11/how-to-install-the-sharepoint-2007-vs-2005-extensions-on-a-workstation/

Nilesh

Friday, January 23, 2009

Error message when you open a Web site by using Basic authentication in Sharepoint Designer error pop up "The folder name is not valid"

When you open a Sharepoint Web site by using Basic authentication in Microsoft Sharepoint designer or Microsoft Expression Web on a computer that is running Windows Vista, you may receive the following error message.

"The folder name is not valid"

Check this http://support.microsoft.com/kb/928692

This KB would definitely help.
If "BasicAuthLevel" is already there then check value and change to "2".

Thanks,
Nilesh

A critical error occurred while processing the incoming email drop folder

I see this error in WFE. Its event Id is 6872.

This error is related to your incoming email settings in Central admin.

Go to Central Administration > Operations > Incoming Email Settings
Unchecked Enable sites on this server to receive e-mail and clicked OK.

Then again go back and enable it.

But make sure of email id before enable Incoming email settings and also
Check that your local SharePoint groups have has permissions to c:\inetpub\mailroot\drop
WSS_ADMIN_WPG should have full control
WSS_WPG should have read, execute and list.