Friday, October 24, 2008

Workflow "Error" System Account An error has occurred after workflow completed MOSS 2007

Problem: If you have a "built in" or custom approval workflow setup for your document library. The workflow runs correctly, however when sometimes you look at the workflow status, you may receive an error after the task has been approved and completed such as, Event Type: Error User ID: System Account Description: An error has occurred in [name of workflow].
Resolution: When you define your workflow, there is a section "Post-completion Workflow Activities", where you can check "Update the approval status (use this workflow to control content approval)". If you check this option, and you do NOT have content approval enabled on the library level, you get the system account error message. If you do not check it, everything works fine.
Reason for occurrences: The account listed in the "User ID" column does not have permission to "something" that is being requested in the workflow code. Workflow usually running as the "system account" within SharePoint and should have access to all the objects within SharePoint. However, the system account may not have access to some resources that are outside of SharePoint and needed by the workflow code. Accessing outside resources is usually done via the .NET worker process account (e.g. NETWORK SERVICE).

Tuesday, October 14, 2008

Move WSS3.0 databases from one SQL Server to another?

How to move WSS3.0 databases from one SQL Server to another?

Configuration:
WSS3.0 Server
Source SQL Server: Win 2003 Server SP2 SQL Server 2000 + SP4
Destination SQL Server: Win 2003 Server SP2 SQL Server 2000 + SP4

STEP1: BACKUP:

1] On Source SQL Server: Backup SharePoint Content databases.
Open SQL Server Enterprise manger
Right Click a database (For ex: WSS_Content)>All Tasks>Backup Database>Database Complete>Backup to disk>Add>Filename>Provide a path & filename>Ok>Ok
Repeat above procedure for all SharePoint databases however we will not restore all of them.
(Do not restore COnfiguraion & WSS_AdminContent... database on new SQL Server)
How to find name of Content databases:
Central Admin>Application Management>Content databases>Select web application from Right Hand Side Top drop down list
Database name will be displayed

-------------

2] On SharePoint Server: Take screenshots of all configured setting on Central administration page
For example:
Central Admin>Operations>Global Configuration>Alternate access mappings
Central Admin>Operations>Outgoing email settings
Central admin>Application management>Define managed paths
etc.

--------------

STEP 2: PREPARE DESTINATION SQL SERVER
We must install either same or Better version than Source SQL Server
Open SQL Server Enterprise manger
Security>Logins>Right Click>New Login
Add SharePoint Service Account in Domain\user format
This account must be either Domain admin or Domain user with Local admin rights on SharePoint server.
Security>Logins>Right Click Service Account>Properties>Server Roles Tab
Check Security Administrators & Database Creators
Click Ok

STEP 3: RESTORE CONTENT DATABASE TO DESTINATION SERVER
Copy backup Content database files to Destination SQL Server
Open SQL Server Enterprise manger
Databases>Right Click>All Tasks>Restore database>Restore as Database>Type name of Content Database>From device>Select device>disk>Add>Browse to backup files>Ok>Ok
Similarly restore all Content databases from backup
Security>Logins>Service Account>Database Access Tab>In upper pane select Content database>In lower pane check DB_OWNER checkbox>Click Ok

STEP 4: DISCONNECT FROM SOURCE SQL SERVER
On WSS3.0 Server
Run SharePoint Products and Technologies Configuration (PSCONFIG ) Wizard
-Select Disconnect from this server farm

-We should get configuration successful message.

STEP 5: CONNECT TO DESTINATION SQL SERVER
Run SharePoint Products and Technologies Configuration (PSCONFIG ) Wizard
-Select No, I want to create a new server farm

-Database Server: Give Destination SQL Server name
-Database Name: Type new Config Database Name
-Username: Use same Service account as used in existing old server
-Password: Password for that account

-We should get configuration successful message.
-After PSCONFIG finishes successfully Central admin page will open automatically.

STEP 6: RESTORING SITES FROM DATABASES

3.Create a new web application http://app on port 80 with content database name WSS_Content_TEST

1] Go to V3 Central Administration Page>Application Management>Create or extend Web Application

2] Click on Create a new web application

3] Choose any unused port no

4] Enter Database Server Name and enter Database name as WSS_Content_TEST

7] Wait for operation to complete

8]After application is created create a site collection

9] Fill the details and select Team site template click Ok

11] Browse to test site http://app

12] Check if it is working

To remove dummy_content_db from a web application

1] Click on Content Databases

2] On right hand side select the newly created web application if not already present
3] Click on Database name WSS_Content_TEST


4] Check remove content database checkbox and click OK

To attach restored content database to a new web application:
Open a command prompt and browse to
c:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Bin>
Run following command
stsadm -o addcontentdb -url -databaseserver -databasename

Now browse to http://app and check if it is working
Similarly add content databases for other web applications.

STEP 7: POST MIGRATION TASKS

From the screenshots taken earlier we need to reconfigure central admin.
If site was using SSL we need to reapply it & change AAM.
We need to redo any customizations if lost after creating new configuration database.
If 3rd party web parts stop working we need to reinstall them.
Integration with other products needs to be reconfigured.
We need to assign the indexer to the sites from Central Admin>Application Management>Content databases>Select web application from Right Hand Side Top drop down list>Click on Database name>Select Search server from drop down list>Click Ok
Use "stsadm -o spsearch -action fullcrawlstart" to force instant crawling of sites.

NOTE:
=====
Do NOT discard Source SQL Server & Databases until the functionality of New SQL Server & WSS3.0 is tested & confirmed.

There are alternatives to above procedure but are quite tricky. :-)

Wednesday, October 8, 2008

500 Internal Error

Error:- 500 Internal Error

Description:- This error comes only for subsites and subsite administrators can browse the subsite without any issues. The parent site collection is also browsable without any issues. Only member or visitors of the subsite get the error "500 Internal Error"

Resolution:
1. Go to the subsite settings page by adding /_layouts/settings.aspx at the end.
2. Select Advanced permissions -> Settings -> Permissions Level
3. Click "Edit Permissions level"
4. Click "Inherit Permissions from parent"

Now the subsite should be browsable by all without any issues.

Total Pageviews