Posts

Showing posts with the label SQL Server 2005

Find Column in Database - SQL Server

Use the following query to find column in your database. Change “yourdbname” and “%ColumnNameToSearch%” column name accordingly. Use yourdbname GO SELECT t.name AS table_name, SCHEMA_NAME(schema_id) AS schema_name, c.name AS column_name FROM sys.tables AS t INNER JOIN sys.columns c ON t.OBJECT_ID = c.OBJECT_ID WHERE c.name LIKE '%ColumnNameToSearch%' ORDER BY schema_name, table_name; Thanks to Pinaldave .

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"

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". T...

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_log...

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.