jump to navigation

Approaches to Backup and Restore a Sharepoint Farm April 29, 2009

Posted by rehmangul in Blogroll, MOSS, MS SharePoint Sever, sharepoint, sps.
Tags: , , , , , , , , , , , , , , , , , , ,
add a comment

It is important to understand the differences between MOVING, MIGRATING or UPGRADING a farm:

http://technet.microsoft.com/en-us/library/cc262370.aspx

I’ll slightly touch these at the bottom of this article. Mainly, I am going to discuss approaches how can you MOVE from one farm to another.

MOVING to another farm:

If you are moving from a test farm to a production farm, this  involves MOVING a farm. You must have similar hardware (32-bit or 64-bit which ever) and you must have similar software (version of sharepoint, windows, all software updates) and you must have similar topology (server names, number of servers) on the farm you are MOVING to.

The reason is becasue the configuration database and the Central Admin database contain computer-specific information. For that reason, you can only move to a new farm if you can configure it to be exactly the same as your original farm. Configuration database will not work for a new environment where topology, server roles or software updates are different.

Okey, if you do not have the same hardware, software or topology, then what to do? Then you should move everything in the farm except Configuration and Central Admin databases, and configure the new farm on your own, wihout expecting this to be done by the restore procedure, since we are not restoring configuration database. OR, you should consider MIGRATING or UPGRADING:

http://technet.microsoft.com/en-us/library/cc262370.aspx

So, let talk about MOVING to another farm. Microsoft says this is the way to “Move to another farm”:

http://technet.microsoft.com/en-us/library/cc261918.aspx

This page has a lot of information, hidden and obvious, I wish to consolidate it here:

There are three possible ways through which you can Backup and Restore your farm (note that I said backup/restore, not move):

  1. STSADM
  2. Central Admin
  3. Sql Server (lets ignore DPM and the others for the time being)

But there is only one way to MOVE your farm to another farm and that is:

  • Sql Server (tools)

MIGRATING to another farm using STSADM and Central Admin (tools) is regarded as obsolete. That means if you are moving to a new or different farm, you should not use Central Admin or STSADM command. So, moving or migrating whatever you may want to call it (because here it just means moving to a different environment), STSADM and Central Admin approach is obsolete. (I couldn’t find anywhere where Microsoft supports/permits you to MOVE to another/different/new farm using STSADM or Central Admin). 

http://technet.microsoft.com/en-us/library/cc262281.aspx (Migrating through Central Admin (Obsolete))

http://technet.microsoft.com/en-us/library/cc263236.aspx (Migrating through STSADM (Obsolete))

We can restore our farm using STSADM and Central Admin, only on the SAME farm from which the backup was taken i.e. no new farm is involved at all:

http://technet.microsoft.com/en-us/library/cc261704.aspx (Restore using STSADM)

http://technet.microsoft.com/en-us/library/cc262928.aspx (Restore using Central Admin)

If you will use Central Admin, you will select “Same Configuration” option for the “Type of Restore” radio button. And for STSADM, you will use “overwrite” value for “-restoremethod” parameter. Using Central Admin, you can take farm level backup but it will not let you restore Central Admin and Configuration databases saying that “Central Admin and Configuration databases cannot be restored from this user interface”.

 Now the only way left while moving to a new farm is SQL Server (tools):

http://technet.microsoft.com/en-us/library/cc261918.aspx

After we have reached this decision, remember that there could be two possibilites:

  1. Your new farm on which you are restoring may have different specs from the farm from which the backup is taken from. Specs means server names, software updates, number of servers.
  2. Your new farm may have exactly the same specs as the farm from which the backup is taken from.

If you plan to move Config and Central Admin databases, your new farm MUST have the same specs. If your new farm has different specs, then you should not move Config and Central Admin databases.

“Move to another farm” (http://technet.microsoft.com/en-us/library/cc261918.aspx) provides a step by step procedure to move to a new farm, and it assumes that sharepoint is already installed on the destination farm, which essentially means that Configuration and Central Admin databases are already created. So, if you have the same specs for your new farm, you can go ahead and overwrite Config and Central Admin databases, this will restore the configuration from the backup set.

Now it could be the case that you can live without moving Configuration and Central Admin databases to the new farm i.e. you will configure the new farm by yourself and you dont need to transfer Config and Central Admin databases from your old farm. So, what will you move then:

  1. Content Databases
  2. SSP Databases
  3. Search Databases for SSPs
  4. Search Databases

However, above databases can also be restored using Central Admin and STSADM approaches.

Summary: Moving to a new farm involves SQL Server and a farm with similar specs, otherwise do not move Config and Central Admin databases.

If you are looking to Move only the Content Databases, here is the one stop shop:

http://technet.microsoft.com/en-us/library/cc262792.aspx

MIGRATING to another farm:

If you are changing from 32-bit hardware to 64-bit hardware, this will also be a MIGRATION process (i.e. change in hardware specs as mentioned earlier). If you are planning to change your existing SharePoint Server 2007 platform to Windows Server 2008 (platform), you might have to change to 64-bit hardware. And to upgrade Microsoft Office SharePoint Server 2007 to a 64-bit environment, you must migrate existing servers to a new farm. You cannot upgrade Office SharePoint Server 2007 directly from the 32-bit edition of Office SharePoint Server 2007 to the 64-bit edition.

http://technet.microsoft.com/en-us/library/dd622865.aspx

UPGRADING a farm:

 Upgrade is when you are moving to a different version of SharePoint Server e.g. from SharePoint 2003 to SharePoint 2007.

 If you are moving just the database server (all databases including Config and Central Admin) and not the whole farm, look here:

http://technet.microsoft.com/en-us/library/cc512725.aspx#Section1

If you wish to ditch the farm level backup/restore and just move your website (site collection) to the new farm (and save yourself a lot of hassle), have a look here:

http://rehmangul.wordpress.com/2009/04/18/sharepoint-site-backup-and-restore/

After release of SP2 and CU for April, you can safely backup and restore your site collections to a new farm, without worrying about absolute URL issues:

http://blogs.technet.com/stefan_gossner/archive/2009/05/01/red-is-green-up-is-down-and-the-unsupported-suddenly-becomes-supported.aspx

Hope this helps….

Configuration Wizard fails with system error codes 122 and 997 March 25, 2009

Posted by rehmangul in MOSS, MS SharePoint Sever, error, sharepoint, sps.
Tags: , , , , , , , , , , ,
1 comment so far

Error25:
Configuration wizard failed with “system error code 122″ and then with “system error code 997″. “Error during encryption or decryption”.

Standalone Farm. Sql Server and Web Front End (WFE) on the same machine. Only one WFE. Was trying to disconnect it from the farm and then reconnect with the same farm. Ran configuration wizard to reconnect. Error 122. Run config wiz again. Error 997. Continue to run config wiz and it will fail with error 997. Try disconnecting from the farm. Successfully disconnected. Run config wiz again to try. Same error message pattern repeated.

Fix:
The problem was that the sharepoint service account password was changed sometime ago. All the services failed. However, I gave new password for services and application pools, so everything got back. Then after a few days I had to do as given in the error above. But it bitterly failed, wasted lots of my hours and gave me errors 122 and 997. I went to this very nice post (targeting multi server farm environment):

http://www.sharepointblogs.com/sharepointredneck/archive/2008/05/27/error-during-encryption-or-decryption-system-error-code-997.aspx

However, it doesn’t seem to resolve my problem. The post says that the service account was still trying to receive the incorrect credentials that were cached somehow somewhere in sharepoint. True, this was the problem. Tried using another account but sharepoint wont allow and give the following error:

“The user name entered must be the same the database access account for the server farm you wish to join………”

 new-account-error

 

Alright, run the wiz and let it fail at 122. Run it again, do not disconnect from the farm, and let it fail at 997. Now run the following commands to update farm

credentials:

stsadm -o updatefarmcredentials -userlogin “domain user” -password “newPassword” -local

Do an iisreset /noforce (optional)

Wait for the “Administration Application Pool Credential Deployment” job to go away on the Timer Job Definitions central admin page

Just in case run stsadm -o execadmsvcjobs

stsadm -o updateaccountpassword -userlogin “domain user” -password “newpassword” -noadmin

Run the wiz again, and it should go all the way. However, on the CA page got “internal server error 500″. Double checked password in application pool for Central Admin, in vain. Then checked my errors database and found this: Error4 (see here). So, I ran the setup. It completed and needed system reboot. And it brought back the CA. Good one, it came with preconfigured settings, no Red coloured Config error on the left top corner. We have a problem as well. When I was jus running

config wiz, I saw that it created all the web apps in IIS (which are actually deleted when u disconnect WFE from the farm). App pools are not deleted, they remain there. However, after running sharepoint setup, there was no web apps in IIS except CA. My sharepoint web apps are down. Ran config wiz, in vain.

Though web apps are visible in CA. Error message in IE is “Page cannot be displayed”. So, I created the web app manually in IIS, created the directory under Virtual Directories……and hit the site, it showed some permissions errors perhaps…..i went to the web app directory under virtual Directory and checked for the permissions…….those were alright…..perhaps then checked in IIS and took properties of web app and under Home Directory -> Execute Permissions drop down was selected incorrectly (probably)…..so changed it to Scripts and Executables………then went to the site in browser, so it remvoved permissions error and I saw the directory listing in the browser i.e / (root) and nothing else……So the whole approach was incorrect….then I hit this bearutiful URL:

http://kb.adminprotools.net/kb/?View=entry&EntryID=31

…………….and got the idea………delete the web app in CA, while deleting do not delete the content database, can selet to delete the Web App in IIS (its not there anyways)……….create a new web app……while creating give the name of the existing database to connect with (and not any new database)…..theres no separate space to provide any name if u want to connect to an existing database….jus put the existing database name in the Database Name field. That worked……brought back my web app…..jus a note that i had a custom webpart in there but it is not working….have to look into it……Yeah, I went to the Solution Store and found out that web part solution was not deployed to any web app…..probably coz there were no web apps (at least at IIS level)………tried to deploy it, says scheduled but does nothing, running execadmsvcjobs does nothing either…..I found out that “Windows Sharepoint Services Web Application” service in CA was down (Services in Farm). Started it using the following command:

“stsadm -o provisionservice -action stop -servicetype SPWebService”

……….but still the actual problem is not resolved….repaired sharepoint running the setup…….nothing happened…..same waiting forever on Retracting or Deploying solution….Shared Services is not reachable, u can see the link but cannot click it, its not a link jus text…..finally thinking to uninstall sharepoint and install again……..and I uninstalled and installed again………when u uninstall, all content dbs and config db remain there…..these are not deleted………got all my web apps back up and running (………got CA all preconfigured, search etc (no red error on the left top corner)…..and problem of timer jobs resolved……tried to deploy the solution and it was instantly deployed…….then retracted it and it started retracting (no freaking scheduled thingy)………..cooooool man……after all that mess……it feels things are back alive.

Hope this saves some mess to you guys…….

Moss Errors And Their Fixes March 10, 2009

Posted by rehmangul in MOSS, MS SharePoint Sever, development, error, event handlers, moss kpi, sharepoint, sps.
Tags: , , , , , , , , , , ,
3 comments

Some microsoft office sharepoint server errors and their fixes or workarounds. Hopefully these make a few lives easier….. Apologies for the crudeness of the writing, these are just coming straight from my personal ‘moss errors and their fixes’ database……with a very little or no editing at all……….

In order to go directly to the error/fix that you are looking for, press Cntrl+F, put your keywords in the ”Find” text box and press ”Next”… 

Error1:
Your backup is from a different version of Windows SharePoint Services and cannot be restored to a server running the current version. The backup file should be restored to a server with version ‘12.0.0.6318′ or later.

Fix:
Install Infrasturcture update for wss.
(if done check for infra update for moss). sp1 for both moss and wss.

Error2:
Configuration wizard Fails at the very end on 8th task.

Fix:
check upgrade log and most importantly event viewer. event viewer gives good info. My problem was resolved using event viewer. It told me that it was looking for assemblies in GAC which were deployed using solutions but could not be found. I had retracted the solution. So I redeployed and the assemblies were in place and configuration wizard ended successfully.

Error3:
Solution is not being deployed or retracted. It says scheduled but do nothing although you selected deploy NOW as the option.

Fix:
go to command prompt and run stsadm -o execadmsvcjobs, it will retract or deploy what ever was waiting and doing nothing.

Error5:
Create Hierarchies option for language variation doens’t work.

Fix:
Do not run variation simply logging into site using browser (may it be an administrator). You must be directly logged into the machine or should be using remote session like mstsc (Remote Desktop Connection).

Error6:
Content Type Mismatch error while running sharepoint language variations.

Fix:
First check if it is a default.aspx page or not. If default page, then it should fail since anything related with site definition like default page should not have custom content type for variation to run successfully. If it has a custom content type then you must provided custom site definition.

If it is not a default.aspx page then this should not stop variation from running since the page is not the part of the site definition.

Error7:
A broken kind of page is displayed with error message ‘An unexpected error has occured’.

Fix:
you might be typing an incorrect url e.g. instead of https://www.goodmanintl.com:9443/en, you might be typing https://www.goodman.com:9443/en i.e. intl is missing. This is when a site is extended from the other. Look for the difference of https and http.

Error8:
ssl site is not being restored.

Fix:
Always restore ssl on a non ssl web application. Then you can extend it to an ssl port. Experience says ssl sites are not restored on ssl web applications.

Error9:
Error in red on right hand top corner of Central Administration page saying “Server Farm Configuration Not Complete”.

Fix:
go to central admin->app mgmt->under Office Sharepoint Server Shared Services->click Check services enabled in this farm. Enable everything here. To enable search give full user name i.e. domain\username or machine\username.Then you also need to create SSP. then go again to check services enabled in this farm. One more task to enable search for ssp would appear. enable it and error will go.

Error10:
A broken kind of page is displayed with error message ‘File not found’.

Fix:
You may have just enabled SSL and trying to access your site using new https url but you forgot or havent set alternate access mapping for SSL url in Central Admin for your site. Go to Cental Admin and App Mgmt and Alternate Access Mapping. Edit public urls, select your web application and add the ssl url along with ssl port in any of the internet, extranet or custom boxes.

Error11:
The content was not being crawled. Error shown in crawl log was “SSL certificate sent by the server was invalid and this item will not be crawled”.

Fix:
Go to Central Administration->Application Mgmt->under Search->click Manage search service. On the page click “Farm-level search settings. On this page at the bottom fill the check box saying “Ignore SSL certificate name warnings”.

Error13:
Explorer view not working. My network place not working (creating new network place for a document library). IE->file->open->’open as a web’ folder not working. Upload multiple files not working. Open with windows explorer in document library not working. Edit in Datasheet view not working.

Fix:
Install office 2003. All started working instantly.

Error14:
Approve or publish in bulk. Approve publish items together in one go.

Fix:
Use Site Content and Structure. Select items together, cilck Actions and perform whatever you like.

Error15:
Search is not working.

Fix:
Make sure pages are published, approved and checked In (if you have made some changes to them and want to search based on those changes eg. properties), run incremental crawl and search!

Assuming that scopes are already created and they show crawled items in them (if using scopes).

Error16:
If images are not displayed on sharepoint site.

Fix:
Make sure images are checked In, Published and approved. (and ofcourse have permissions to access them).

Error17:
The site collection could not be restored. If this problem persists, please make sure the content databases are available and have sufficient free space.

Fix:
The error was due to the size problem of database. The sql server was not fully licensed version, like sql express or something. The site we were trying to restore was bigger than 4096 MB. And the error we caught from Event Viewer said:

 ”CREATE DATABASE or ALTER DATABASE failed because the resulting cumulative database size would exceed your licensed limit of 4096 MB per database.”

So our license did not allow creating databases larger than 4096 MBs.

Error18:
Steps if publishing infrastructure is not getting enabled (this may not be an error, jus the way to do it)

Fix:
go to iis and change the application pool of the web application to the one for Central Admin. Do iisreset. Go to the site and enable publishing infrastructure feature. Go back to iis and change app pool back to the original and iisreset.

Error20:
Exception from HRESULT: 0×80040E14

Fix:
It means the SQL server has run out of space for either the logs or the data file. Simply delete some un-needed files from the Hard Disk Drive that the SQL server is writting to and it fixes the problem.

Error21:
Code Block are not allowed in this file

Fix:
If you want to add some inline code in a masterpage or pagelayout file… you probably get the following error message:

An error occurred during the processing of abcd.aspx. Code blocks are not allowed in this file.

To get this working you need to modify the web.config of your web application. For instance, if you want to allow server side script on pages from the masterpage & pagelayout gallery you have to modify the PageParserPaths into:

<.pageparserpaths>
<.pageparserpath virtualpath=”/_catalogs/masterpage/*” compilationmode=”Always” allowserversidescript=”true” includesubfolders=”true”.>
<./pageparserpaths>

Error22:
To find out version of SharePoint:

Fix:
Go to Site Settings, it is displayed on that page. You can also go to control panel, select MS Office Sharepoint Server, and click “Click here for support information” on it, this will also show you the version number, but note this could be the old one……in site settings the latest version is displayed…like the updated version after infra update.

Error23:
SSP gives error:

The following error occurred while querying database ‘SharedServices1_Search_DB’ on server ’sydsrvprod0003\sql2005′: (4060) Cannot open database “SharedServices1_Search_DB” requested by the login. The login failed. Login failed for user ‘SYDNEY\mossadmin_49′.

Fix:
Use a different databse name…sql server could be shared and same database name may already exist there and your login obviously do not have rights on it.

Error24:
“I need to” web part generates following error when put on a master page:

Error “Value cannot be null. Parameter name: webNode” occured processing your request. Review the error message and correct the problem….

Fix:
Site Directory is not created for the web part. Site Directory has a list named “Sites” which is used by “I need to” web part which is not available to the web part. Create site directory and the error should disappear….

Error25:
Configuration wizard failed with “system error code 122″ and then with “system error code 997″. “Error during encryption or decryption”.

Fix25 (Click Here):

Error26:
Title field is set as required in one of the Content Types used in a doc lib. However, when you open the document in Office and save it without providing any value for Title field, the document is saved, then Office will ask if you want to “check in” the doc, you will say Yes and select Major Version: At this point you receive an error message saying:

“Cannot perform this opertation. The file is no longer checked out or has been deleted.”

OR

“This file could not be checked in because the original version of the file on the server was moved or deleted. A new version of this file has been saved to the server, but your check-in comments were not saved………To save comments with the new version of this file on the server, you must delete the local copy of this file, check out the file from the server again, and then check in the file with any comments you want to add.”

Fix26 (Click Here):

Error27:
A link was provided in the site that pointed to something. This link had “/_layouts/….” in it. So there was something under “/_layouts/…..” it was pointing to. Users received IE errors saying: “the Website declined to show this web page…….the website requires you to log in.”

Fix27 (more or less :) (Click Here):

Error28:
Sharepoint generates an error message that you “cannot create the database” while creating a new web application.

Fix:
Even if you are a DBO, you do not have rights to CREATE a new database. Get dbcreator rights on SQL Server and you should be good to go (at server level……Server Roles->dbcreator). Remember, these rights should be granted for the user account being used to create the web application (i.e. the current windows user and not the service account………assuming that you will be authenticated against your windows account on the SQL Server).

A DBO has full permissions on his own database, but creating a new database is a server level task and needs server level permissions.