Tuesday, July 14, 2009

Microsoft SharePoint 2010

Take a look at the SharePoint 2010 features!

http://sharepoint.microsoft.com/2010/Sneak_Peek/Pages/default.aspx

Friday, July 10, 2009

Now Using Windows Live Writer to Write Blog

Couldn’t find it easy to login every time on my blog and write an entry. On my laptop with Windows Vista, I never tried Windows Live Writer to create blogs quickly and easily until my colleague told me its usefulness. Now I will be able to write more regularly on what I have been doing in past few months and doing these days.

Wednesday, March 04, 2009

Unable to delete Shared Services Provider in SharePoint (MOSSS)

Sometimes The SSP you create in MOSS are not created properly. This can be result of interruption while SSP was being created or in result of bad migration from SPS03 or MCMS to MOSS.

Symptoms:
1. In left nav of SharePoint Central Administration, the name of your new SSP will not render rather, it will show up as text.
2. If you try to delete that from the Central Admin, the Delete option is disabled.

Resolution:
You should delete the SSP using stsadm command line tool (NOTE: My SSP's name is "SSP" which is specified after "title" in command:

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN>stsa
dm -o deletessp -title "SSP"

However, if you have any dependencies, you will have to delete them first or you will get following error when you try deleting it through command line tool:

An object in the SharePoint administrative framework, "SharedResourceProvider Na
me=SSP Parent=SPFarm Name=SharePoint_Config", could not be deleted because other
objects depend on it. Update all of these dependants to point to null or diffe
rent objects and retry this operation. The dependant objects are as follows:
SPWebApplication Name=SSP_MYSITE Parent=SPWebService
SPWebApplication Name=SSP2 Parent=SPWebService
SPWebApplication Name=super.company.com Parent=SPWebService


To get rid of the dependencies, you will have to use a trick:
Open SQL Server Management Studio and execute following query to fetch the SSP dependencies:
SELECT * from Objects WHERE Objects.name like '%SSP%'
Note that in the "Status" column, you'll find "3". Changing that back to default "0" does the job:
UPDATE Objects SET Objects.Status=0 WHERE Objects.name='SSP'
Now again run the command:
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN>stsadm -o deletessp -title "SSP"

Your currupt SSP is gone!

Now you should be able to create a new SSP without problems.

Wednesday, January 28, 2009

Switch MOSS Database Server / Move MOSS 2007 Site Database

If you want to move a MOSS 2007 databases over to a new DB server, do the following:

1. Run SharePoint configuration wizard (on the web server)
2. Disconnect from existing configuration database (on web server)
3. Move the SITE database over to the new database server (on DB server)
4. Run configuration wizard again and create a new farm (on web server)
5. Give NEW database server and NEW configuration database (on web server)
6. After configuration wizard is finished, create web application by going in the SharePoint Cetral Admin (on web server)
7. Give it any web site name. Here you'll specify the New database server and OLD SITE db name. Hit OK. That's it. So only the combination of New DB server and Old Database name are important to specify in all this scenario.

Now open web browser and open the site with same URL that it had been running before.

You can also follow other processes like descriped on "Ron Grzywacz's Blog"

Monday, December 22, 2008

Error in Upgrade.log: The statistics 'SectionName' is dependent on column 'SectionName'

In Upgrade.log file generated after running upgrade by clicking "Begin Upgrade" in central administration of MOSS, I found following errors in log when upgrading from SharePoint 2003 to MOSS 2007.

"[ProfileDatabaseSequence] [ERROR] [12/21/2008 3:07:31 AM]: Action 12.0.18.0 of Microsoft.SharePoint.Portal.Upgrade.ProfileDatabaseSequence failed.
[ProfileDatabaseSequence] [ERROR] [12/21/2008 3:07:31 AM]: The statistics 'SectionName' is dependent on column 'SectionName'.
ALTER TABLE DROP COLUMN SectionName failed because one or more objects access this column."

I used following query to find table having column "SectionName" in the database, since i didnt know which table had it:
SELECT name FROM sysobjects WHERE id IN ( SELECT id FROM syscolumns WHERE name = 'SectionName')
It returned "ProfileUI" table name.
I expanded the "ProfileUI" table in SPS2003's Profile DB and then explanded "Statistics". There was the dependency caused error. Deleting the SectionName from Statistics of table removed its dependency.
Now upgrade would run the "alter table drop column" command. It would have failed if I had dropped the column, so I didn't drop column manually, just removed the "SectionName" dependency.

I was able to run upgrade successfully after cleaning up and reinstalling MOSS. All the sites are displayed for me to be upgraded one by one.

Upgrade ERROR: The statistics 'SectionName' is dependent on column 'SectionName'.

Msg 5074, Level 16, State 1, Line 1
The object 'IX_ProfileUI' is dependent on column 'SectionName'.
Msg 5074, Level 16, State 1, Line 1
The statistics 'SectionName' is dependent on column 'SectionName'.
Msg 4922, Level 16, State 9, Line 1
ALTER TABLE DROP COLUMN SectionName failed because one or more objects access this column.

Sunday, December 21, 2008

Find database table column

To find out a column you are not sure of where in your entire database, select database from the dropdown and run following query:

SELECT name FROM sysobjects WHERE id IN ( SELECT id FROM syscolumns WHERE name = 'COLUMN_NAME'

Error "Cannot complete this action. Please try again."

"Error: The site http://server/personal/sitename cannot be opened. The site might be corrupted. To fix this problem, delete the site and recreate it.
12/19/2008 03:43:30 Microsoft.SharePoint.SPException: Cannot complete this action.
Please try again. ---> System.Runtime.InteropServices.COMException (0x80004005): Cannot complete this action.
Please try again.
at Microsoft.SharePoint.Library.SPRequestInternalClass.OpenWeb..........."

When accessing a personal site, you may face error above. For a scenario, when you don't have to care about "mysite" if they cause problem. You can do the following:
Open SQL Server 2005 Management studio
Open SITE database of SharePoint Portal Server 2003
Open Sites table by right clicking on it and "Open Table".
Look for the site you want to get rid of.
Copy the "Id" column value of it.
Open new query and select the SITE db to execute it on.
Execute following queries:

1. select * from userinfo where tp_login='' and tp_siteid='565d7b07-ed53-4352-834d-9f7572b96ccb'

Make sure above query brings only your site. If it brings more than 1 sites, go back in Sites table and look for more information to provide in query to bring only your site. Since, in my case above query will brought only one result, execute query below to set it as deleted.

update userinfo set tp_deleted='1' where tp_login='domain\sharepointadmin' and tp_siteid='565d7b07-ed53-4352-834d-9f7572b96ccb'

Now even running prescan tool and upgrading to sharepoint 2007 should work without problems.

Saturday, December 20, 2008

SharePoint 2003: Portal creation failed: The server principal "user" is not able to access the database "db" under the current security context

I tried to restore SharePoint 2003 portal on SQL Server 2005 and it failed with following error even though I granted db owner rights to the user:

Portal creation failed System.Data.SqlClient.SqlException: The server principal "domain\sharepointadmin" is not able to access the database "ORG_SITE" under the current security context. at Microsoft.SharePoint.Portal.Data.a.c(SqlCommand A_0, Boolean A_1) at Microsoft.SharePoint.Portal.Data.a.b(SqlCommand A_0) at Microsoft.SharePoint.Portal.Topology.Database.d(a A_0, String A_1) at Microsoft.SharePoint.Portal.Topology.Database.a(String A_0, String A_1, String A_2, Boolean A_3) at Microsoft.SharePoint.Portal.Admin.c.b() at Microsoft.SharePoint.Portal.Admin.c.f()


Investigation the issue, it ended up as a SQL server's security issue.
Resolution:
I granted the domain\sharepointadmin user sysadmin role on the SQL Server 2005 and problem was solved! It restored portal smoothly.

Rename SQL 2005 Database - Error: The database could not be exclusively locked to perform the operation.

During database restore, I tried to rename existing database in SQL Server 2005 by simply trying following command:
ALTER DATABASE mydatabase MODIFY NAME = mydatabase_OLD

But it didn't work and gave following error:
"The database could not be exclusively locked to perform the operation."

In order to fix, I had to set it to single user for a while, change the name and then set it back to multi-user.

I had to execute following commands to make it work:

ALTER DATABASE mydatabase SET SINGLE_USER WITH ROLLBACK IMMEDIATE
GO
ALTER DATABASE mydatabase MODIFY NAME = mydatabase_OLD
GO
ALTER DATABASE mydatabase_OLD SET MULTI_USER
GO