Posts

Showing posts from December, 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 …

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.

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=''…

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