All posts by Kent Del Castillo

About Kent Del Castillo

I have been a web developer since 1993. I started with simple HTML pages and progressed into more complex tools and languages as the web evolved. Currently, I work with HTML, JavaScript, ActionScript, PHP, ASP.Net, and am expert with products such as Microsoft Office SharePoint Server 2003/2007/2010/2013, SQL Server (various), MySQL, Joomla, various JavaScript toolkits, and many others. Besides the web, I play drums, enjoy movies, and golf when I can.

Restore a production sharepoint web farm to a new web farm

Restore a production sharepoint web farm to a new web farm

If you have a production WSS 3.0 sharepoint environment and need to copy the production data into a test environment web farm (different web farm), it can be done using SQL backups and restore.

I am more comfortable using this method than using stsadm tool. This could also be helpful when your production system crashes and you need to quickly get a backup sharepoint farm up and running with the latest production data.

Note: Make sure that you have a database maintenance plan, that backs up your production content databases nightly.

Production sharepoint farm steps

 In SQL Server Enterprise Manager, back up all Windows SharePoint Services 3.0 databases.

Target farm steps ( if you are setting up a brand new WSS 3.0 farm)

1.  Install Windows SharePoint Services 3.0 on the target farm computer. Do not create a web application.

2.  In SQL Server Enterprise Manager, restore to the target farm computer, all Windows SharePoint Services 3.0 databases except the configuration database and the central administrator content database. Use the Restore Databases menu option.

3.  In the Windows SharePoint Services 3.0 central administrator console, create a web application for the portal site. If you have more web applications in the source farm, create the corresponding web applications in the target farm.

4.  In the Windows SharePoint Services 3.0 central administrator console, detach the content database from the newly created web application by doing the following:

5.  From the Application Management page click the Content Databases link under the SharePoint Web Application Management section.

6.  Change the web application from the drop down list.

7.  Select the content database.

8.  Select Offline for Database Status and check the remove content database

9.  Click OK.

10.  Attach the restored site Content database for the newly created web application.

11. On the Application Management page click Content Databases under SharePoint Web Application Management.

12.  Change the web application from the drop down list

13.  Click Add a content database.

14.  Enter the SQL Server name and the name of the restored database.

15.  Click OK.

16.  Start the search crawl from the Search Setting page.

17.  Click OK on the pop up dialog to resume the crawl.

You have now created a brand new web farm that is a copy of the production web farm.

Target farm steps (if WSS 3.0 farm is already Installed  and has web applications)

1. Make sure that you have same number of web application on this target server as the production server. You will need to use this web application for the restore of the production web application.

2.  Go to  Windows SharePoint Services 3.0 central administrator console, select the web application from the web application list.

3.  Select the content database.

4.  Select Offline for Database Status and check the remove content database

5.  Click OK.

6. Go to the SQL Server and delete the content database

7. Create an empty database on the SQL server and name it the same as the content database that you want to restore from the production web farm

8. Restore the backup taken from the production on this empty database.

9. Go back to Central Administration site
10 On the Application Management page click Content Databases under SharePoint Web Application Management.
11.  Change the web application from the drop down list
12.  Click Add a content database.
13.  Enter the SQL Server name and the name of the restored database.
14.  Click OK.
15.  Start the search crawl from the Search Setting page.
16.  Click OK on the pop up dialog to resume the crawl.

You should now have a copy of the production web farm in a test environment.

Site Collection Sizes & Subsite Sizes

While there is an easy way to get the size of a Site Collection in SharePoint 2007:

STSADM.exe -o enumsites -url http:// YOURSITENAMEHERE > c:SiteList.txt

there seems to be no easy way to get that info for a specific site.

One thing you can do is to open your site in Windows Explorer (e.g. \YOURSITENAMEHERE) and navigate to the folder of the site you want to know the size of. Then simply right-click and choose “Properties” and that'll give you the size of everything within that folder plus any subsites that may exist. It's not a quick way to do things but it works.

SharePoint Feature GUIDs

Here's a handy reference to those SharePoint GUID's that can be used when your error log uses it:

=====================

WSS Features

=====================

 

SPWebApplication Feature Status
—————————————-

SPSearchFeature
GUID: 2ac1da39-c101-475c-8601-122bc36e3d67
Hidden: True
Scope: WebApplication

 

SPSite Feature Status
—————————————-

CTypes
GUID: 695b6570-a48b-4a8e-8ea5-26ea7fc1d162
Hidden: True
Scope: Site

Fields
GUID: ca7bd552-10b1-4563-85b9-5ed1d39c962a
Hidden: True
Scope: Site

IssueTrackingWorkflow
GUID: fde5d850-671e-4143-950a-87b473922dc7
Hidden: False
Scope: Site

BasicWebParts
GUID: 00bfea71-1c5e-4a24-b310-ba51c3eb7a57
Hidden: True
Scope: Site

 

 

 

SPWeb Feature Status
—————————————-

WebPageLibrary
GUID: 00bfea71-c796-4402-9f2f-0eb9a6e71b18
Hidden: True
Scope: Web

IssuesList
GUID: 00bfea71-5932-4f9c-ad71-1557e5751100
Hidden: True
Scope: Web

WorkflowHistoryList
GUID: 00bfea71-4ea5-48d4-a4ad-305cf7030140
Hidden: True
Scope: Web

NoCodeWorkflowLibrary
GUID: 00bfea71-f600-43f6-a895-40c0de7b0117
Hidden: True
Scope: Web

SurveysList
GUID: 00bfea71-eb8a-40b1-80c7-506be7590102
Hidden: True
Scope: Web

GridList
GUID: 00bfea71-3a1d-41d3-a0ee-651d11570120
Hidden: True
Scope: Web

GanttTasksList
GUID: 00bfea71-513d-4ca0-96c2-6a47775c0119
Hidden: True
Scope: Web

LinksList
GUID: 00bfea71-2062-426c-90bf-714c59600103
Hidden: True
Scope: Web

MobilityRedirect
GUID: f41cc668-37e5-4743-b4a8-74d1db3fd8a4
Hidden: True
Scope: Web

workflowProcessList
GUID: 00bfea71-2d77-4a75-9fca-76516689e21a
Hidden: True
Scope: Web

TasksList
GUID: 00bfea71-a83e-497e-9ba0-7a5c597d0107
Hidden: True
Scope: Web

TeamCollab
GUID: 00bfea71-4ea5-48d4-a4ad-7ea5c011abe5
Hidden: False
Scope: Web

AnnouncementsList
GUID: 00bfea71-d1ce-42de-9c63-a44004ce0104
Hidden: True
Scope: Web

PictureLibrary
GUID: 00bfea71-52d4-45b3-b544-b1c71b620109
Hidden: True
Scope: Web

ContactsList
GUID: 00bfea71-7e6d-4186-9ba8-c047ac750105
Hidden: True
Scope: Web

CustomList
GUID: 00bfea71-de22-43b2-a848-c05709900100
Hidden: True
Scope: Web

DocumentLibrary
GUID: 00bfea71-e717-4e80-aa17-d0c71b360101
Hidden: True
Scope: Web

DiscussionsList
GUID: 00bfea71-6a49-43fa-b535-d15c05500108
Hidden: True
Scope: Web

DataSourceLibrary
GUID: 00bfea71-f381-423d-b9d1-da7a54c50110
Hidden: True
Scope: Web

EventsList
GUID: 00bfea71-ec85-4903-972d-ebe475780106
Hidden: True
Scope: Web

XmlFormLibrary
GUID: 00bfea71-1e1d-4562-b56a-f05371bb0115
Hidden: True
Scope: Web

 

=========================

*Additional* Standard Features

=========================

 

SPWebApplication Feature Status

—————————————-

PageConverters
GUID: 14173c38-5e2d-4887-8134-60f9df889bad
Hidden: True
Scope: WebApplication

SearchAndProcess
GUID: 1dbf6063-d809-45ea-9203-d3ba4a64f86d
Hidden: True
Scope: WebApplication

BaseWebApplication
GUID: 4f56f9fa-51a0-420c-b707-63ecbb494db1
Hidden: False
Scope: WebApplication

OSearchBasicFeature
GUID: bc29e863-ae07-4674-bd83-2c6d0aa5623f
Hidden: False
Scope: WebApplication

BulkWorkflowTimerJob
GUID: d992aeca-3802-483a-ab40-6c9376300b61
Hidden: True
Scope: WebApplication

 

 

SPSite Feature Status

—————————————-

PublishingPrerequisites
GUID: a392da98-270b-4e85-9769-04c0fde267aa
Hidden: True
Scope: Site

PublishingSite
GUID: f6924d36-2fa8-4f0b-b16d-06b7250180fa
Hidden: False
Scope: Site

LocalSiteDirectorySettingsLink
GUID: e978b1a6-8de7-49d0-8600-09a250354e14
Hidden: True
Scope: Site

WebPartAdderGroups
GUID: 2ed1c45e-a73b-4779-ae81-1524e4de467a
Hidden: True
Scope: Site

Navigation
GUID: 89e0306d-453b-4ec5-8d68-42067cdbf98e
Hidden: True
Scope: Site

ExpirationWorkflow
GUID: c85e5759-f323-4efb-b548-443d2216efb5
Hidden: False
Scope: Site
RegisterForms: Forms*.xsn
GloballyAvailable: true

SignaturesWorkflow
GUID: 6c09612b-46af-4b2f-8dfc-59185c962a29
Hidden: False
Scope: Site
RegisterForms: Forms*.xsn
GloballyAvailable: true

OffWFCommon
GUID: c9c9515d-e4e2-4001-9050-74f980f93160
Hidden: True
Scope: Site

BaseSite
GUID: b21b090c-c796-4b0f-ac0f-7ef1659c20ae
Hidden: False
Scope: Site

PortalLayouts
GUID: 5f3b0127-2f1d-4cfd-8dd2-85ad1fb00bfc
Hidden: True
Scope: Site

PublishingLayouts
GUID: d3f51be2-38a8-4e44-ba84-940d35be1566
Hidden: True
Scope: Site

PublishingResources
GUID: aebc918d-b20f-4a11-a1db-9ed84d79c87e
Hidden: True
Scope: Site

SearchWebParts
GUID: eaf6a128-0482-4f71-9a2f-b1c650680e77
Hidden: False
Scope: Site

IPFSSiteFeatures
GUID: c88c4ff1-dbf5-4649-ad9f-c6c426ebcbf5
Hidden: True
Scope: Site

LocalSiteDirectoryControl
GUID: 14aafd3a-fcb9-4bb7-9ad7-d8e36b663bbd
Hidden: True
Scope: Site

ExcelServerSite
GUID: 3cb475e7-4e87-45eb-a1f3-db96ad7cf313
Hidden: True
Scope: Site

ReviewWorkflows
GUID: 02464c6a-9d07-4f30-ba04-e9035cf54392
Hidden: False
Scope: Site
RegisterForms: Forms*.xsn
GloballyAvailable: true

TranslationWorkflow
GUID: c6561405-ea03-40a9-a57f-f25472942a22
Hidden: False
Scope: Site
RegisterForms: Forms*.xsn
GloballyAvailable: true

Reporting
GUID: 7094bd89-2cfe-490a-8c7e-fbace37b4a34
Hidden: False
Scope: Site

 

 

SPWeb Feature Status
—————————————-

TransMgmtLib
GUID: 29d85c25-170c-4df9-a641-12db0b9d4130
Hidden: False
Scope: Web

PublishingWeb
GUID: 94c94ca6-b32f-4da9-a9e3-1f3d343d7ecb
Hidden: False
Scope: Web

RelatedLinksScopeSettingsLink
GUID: e8734bb6-be8e-48a1-b036-5a40ff0b8a81
Hidden: True
Scope: Web

AnalyticsLinks
GUID: 56dd7fe7-a155-4283-b5e6-6147560601ee
Hidden: True
Scope: Web

Publishing
GUID: 22a9ef51-737b-4ff2-9346-694633fe4416
Hidden: True
Scope: Web

SlideLibrary
GUID: 0be49fe9-9bc9-409d-abf9-702753bd878d
Hidden: True
Scope: Web

BaseWeb
GUID: 99fe402e-89a0-45aa-9163-85342e865dc8
Hidden: False
Scope: Web

DataConnectionLibrary
GUID: 00bfea71-dbd7-4f72-b8cb-da7ac0440130
Hidden: True
Scope: Web

IPFSWebFeatures
GUID: a0e5a010-1329-49d4-9e09-f280cdbed37d
Hidden: True
Scope: Web

 

 

=======================

*Additional* Enterprise Features

=======================

 

SPWebApplication Feature Status
—————————————-

PremiumWebApplication
GUID: 0ea1c3b6-6ac0-44aa-9f3f-05e8dbe6d70b
Hidden: False
Scope: WebApplication

OSearchEnhancedFeature
GUID: 4750c984-7721-4feb-be61-c660c6190d43
Hidden: False
Scope: WebApplication

ExcelServerWebApplication
GUID: e15ed6d2-4af1-4361-89d3-2acf8cd485de
Hidden: True
Scope: WebApplication

 

 

SPSite Feature Status
—————————————-

PremiumSite
GUID: 8581a8a7-cf16-4770-ac54-260265ddb0b2
Hidden: False
Scope: Site

BizAppsSiteTemplates
GUID: 4248e21f-a816-4c88-8cab-79d82201da7b
Hidden: True
Scope: Site

BizAppsCTypes
GUID: 43f41342-1a37-4372-8ca0-b44d881e4434
Hidden: True
Scope: Site

BizAppsFields
GUID: 5a979115-6b71-45a5-9881-cdc872051a69
Hidden: True
Scope: Site

 

 

SPWeb Feature Status
—————————————-

BizAppsListTemplates
GUID: 065c78be-5231-477e-a972-14177cc5b3c7
Hidden: True
Scope: Web

PremiumWeb
GUID: 0806d127-06e6-447a-980e-2e90b03101b8
Hidden: False
Scope: Web

ReportListTemplate
GUID: 2510d73f-7109-4ccc-8a1c-314894deeb3a
Hidden: True
Scope: Web

IE8 slowdown in Page Edit Mode of SharePoint 2007

An annoying problem happens when using IE8 and you edit a Content Editor Web Part (CEWP) in SharePoint 2007 — it'll come up with an error saying it can not retrieve the properties. If you click OK, it lets you edit the CEWP, but when you go to Save, it'll fail. If you change your browser to use the Compatibility View for that site, you'll be able to save, but then it'll hang and timeout for that save. Very annoying.

The fix is to uncheck “Enable native XMLHTTP support” in Tools > Internet Options > Advanced tab.

A post with wonderful pictures on this issue is here.

 

MSF10 (or WSS 4.0) Is Available

Microsoft SharePoint Foundation 2010 (aka Windows SharePoint Services 4.0) is out and available here. Please note the requirements:

Component Minimum Hardware Requirements

Processor

64-bit, four cores

RAM

4 GB for developer or evaluation use

8 GB for single server and multiple server farm installation for production use

Hard disk

80 GB for system drive

For production use, you need additional free disk space for day-to-day operations. Maintain twice as much free space as you have RAM for production environments.

Minimum Software requirements

Environment Minimum requirement

Database server in a farm

One of the following:

  • The 64-bit edition of Microsoft SQL Server 2008 with Service Pack 1 (SP1) and Cumulative Update 2. From the Cumulative update package 2 for SQL Server 2008 Service Pack 1 (http://go.microsoft.com/fwlink/?LinkId=165962) page, click the View and request hotfix downloads link and follow the instructions. On the Hotfix Request page, download the SQL_Server_2008_SP1_Cumulative_Update_2 file. When you install Microsoft SQL Server 2008 SP1 on Windows Server 2008 R2, you might receive a compatibility warning. You can disregard this warning and continue with your installation.
    Cc288751.note(en-us,office.14).gifNote:
    We do not recommend that you use CU3 or CU4, but instead CU2, CU5, or a later CU than CU5.

  • The 64-bit edition of Microsoft SQL Server 2005 with Service Pack 3 (SP3). From the Cumulative update package 3 for SQL Server 2005 Service Pack 3 (http://go.microsoft.com/fwlink/?LinkId=165748) page, click the View and request hotfix downloads link and follow the instructions. On the Hotfix Request page, download the SQL_Server_2005_SP3_Cumulative_Update_3 file.

Single server with built-in database

Front-end Web servers and application servers in a farm

Client computer

Optional software

Environment Optional software

Client computer

SharePoint’s CMIS Connector

Today, the General Manager of SharePoint Marketing announced that Microsoft will be shipping a Content Management Interoperability Services (CMIS) connector for SharePoint 2010. This will allow for easier communication between large Enterprise Content Management (ECM) systems that a company might have. Working with IBM, EMC, Alfresco, OpenText, SAP, and Oracle, this is a long time coming since it was announced back in 2008. Inclusion of this connector may accelerate the adoption of SP2010 which looks like a good improvement over 2007.

Anonymous Lists on SharePoint 2007

Today I was attempting to create a new list on the Public side of a SharePoint 2007 install. For some reason, I kept getting prompted for credentials even though everything was set to anonymous. Turns out my solution was here. The solution goes likes this:

To resolve this issue, use the Stadm.exe command-line tool to disable the lockdown feature. To do this, follow these steps:

  1. 1) Click Start, click Run, type cmd in the Open box, and then click OK.
  2. 2) Type the following lines at the command prompt. Press ENTER after each line.
  3. cd /d %commonprogramfiles%Microsoft SharedWeb Server Extensions12Bin
  4. stsadm -o deactivatefeature -url http://ServerName -filename ViewFormPagesLockDownfeature.xml
  5. 3) Type exit to exit the command prompt.

Note After you run this command-line tool against your site, you must toggle the Site Settings advanced permissions to turn off Anonymous access. Then, turn on Anonymous access again. You must do this for the command to take effect on content that exists in the site.

I had to do this twice to actually get it to work but it did, finally. More information about anonymous, forms pages, and the lockdown feature can be found here.

Droid Apps

Ok, so I am now a Motorola Droid user. Had to stay on Verizon, their coverage is too good. Anyway, I have had some difficulty finding apps and thought I'd list the apps I currently have and use. All of these are available on the Android Market.

Locale – this will turn on/off/change your ringer, wallpaper, ringtone, wifi, etc. based upon the location you are currently at. Great for work to have it auto-set to vibrate. FREE

fring – IM client for Skype, MSN Messenger, ICQ, Google Talk, Twitter, AIM and Yahoo! buddies. Also does VOIP calls and more. FREE

Seesmic – Twitter client. Pretty simple to use. FREE

Handcent – SMS/MMS replacement that is HIGHLY customizable — LED color, LED flashing frequency, define your own vibration, popup over the locked page, and on and on. A must have. FREE

Dolphin Browser – Excellent browser. Supports multitouch pinch/zoom, tabs, custom swiping, RSS detection, share pages instantly on social networks, and fast window switching like the iPhone's pages. FREE

Touchdown – Exchange 03/07 support. I could never get the native app to work so this had to do instead. Supports remote wiping and PIN, push, and has a lot of customizability (even the LED notification light color!). $10

Astrid – Simple task list. Synchronizes with Remember the Milk. FREE

APNdroid – toggle that prevents your phone from connecting to internet over 3G/EDGE/GPRS. Good for battery saving nighttime stuff.

Tricoder – this is a total nerd app that reveals data on lots of stuff. Currently it can display acceleration; the local magnetic field; an analysis of the local acoustic environment; your location from various providers; the availability and strength of cellular and WiFi signals; and the current state of the Sun and solar wind, including current pictures of the Sun. FREE

Ustream Broadcaster/Viewer – this allows you to use your phone as a 3-second delay internet camera with sound. I don't know when I'll use this but it's pretty cool. FREE

Qik – another broadcaster that allows you to do higher resolution. You might have to enable unsigned apps and go to their website to install this one. FREE

SNesoid – This is a Super Nintendo emulator. ROMs are needed! Works pretty well. $3.49

SportsTap – Decent app giving all the scores for all US sports. It does a little GameCast emulation as well. FREE

ShopSavvy – Barcode scanning app that gives prices online. Pretty accurate. FREE

Where – GPS app which does restaurant reviews, movie times, gas prices, weather, local news, etc. FREE

Shazam – this is the app that recognizes song snippets you play it. Amazing how well this works. FREE

Pandora – music streamer. You create a station based on one group and it plays related music. It's come a long way since its inception and will open you up to new music. FREE version seems to be good enough for me.

iMap Weather – I tend to like this more than the Weather.com app. FREE

Photoshop – Photoshop on your Droid! Ok, it only does a couple of things but what the heck! It's FREE

AP Mobile – delivers customizable AP news articles quick with no fuss. FREE

ASTRO – file manager for your droid. It's your windows explorer or finder. FREE

ConnectBot – SSH for the droid. FREE

FBReader – free book reader. Haven't had the opportunity to try this yet. May not be the best one. FREE

Gmote – make your droid into a remote FREE

Google Sky Map – find planets, stars, and constellations using your droid. Everybody loves this app. FREE

TV.com – this is CBS's app. They need more full episodes. FREE

Remote VNC – this is one of the best apps I've seen yet. It's a VNC client so you can connect to a mac/pc remotely. There's a limited FREE version and a FULL version which is a lot better. You can do just about anything you'd want to do with the full app. My favorite is that I can control the mouse with the thumbpad. You can also combine it with bluetooth keyboards and mice and really go crazy. It works fast and seems to use little battery. Use FREE to make sure it works for you but get the full version for everything else for $3.98. It's worth it.

That's it for now but I'm finding more or better apps everyday.

SharePoint Cheat Sheet

Just some notes of things regarding SharePoint and SQL Server:

 

To see that 4gb SQL Express db, install MS SQL Server Management Studio Express and use this as the “Server Name”:

\.pipeMSSQL$MICROSOFT##SSEEsqlquery

——————

To get all users from AD written to a text file, run this on a cmd line:

ldifde -f usersindomain.txt -r “(&(objectCategory=Person)(objectClass=User))

To sync the User Information List:
C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12BIN>
stsadm -o sync

Get all users from “a directory” in AD and put into a text file
L:>ldifde -f usersindomain.txt -r “(&(&(|(&(objectCategory=person)(objectSid=*)(!samAccountType:1.2.840.113556.1.4.804:=3))(&(objectCategory=person)(!objectSid=*))(&(objectCategory=group)(groupType:1.2.840.113556.1.4.804:=14)))(objectCategory=user)(displayName=*)))”

See what databases are out of sync greater than 5 days
c:…12>stsadm -o sync -listolddatabases 5

This is how I set up SSO in MOSS 2007:
1) Create a new domain service account for running SSO service.
2) Change SSO service's Identity to the new service account form Services
console.
3) Add SSO service account as a farm administrator by using “Update farm
administrator's group” link from share point central admin.
4) Right click internet explorer shortcut select “Run As” provide the
credentials for the service account to run it. (This is a very important step
– because of some bug in MOSS i guess). open share point central admin using
this IE window.
5) Setup SSO using this IE window.
6) Remove SSO service account from farm administrator group.

The gacutil lives in C:WINDOWSMicrosoft.NETFrameworkv1.1.4322

———————————————

SQL Version:
SELECT  SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition');

Verify pecentage of SQL Transaction Log Space Used:
DBCC SQLPERF(LOGSPACE);

Truncating the Transaction Logs (make sure you're in the db context with the dropdown):
backup log SharedServices1_DB with truncate_only;
dbcc shrinkfile (SharedServices1_DB_log, 0);

DBCC SHRINKDATABASE;

CSS3 and the @font-face tag

Ars Technica has a good article on the recent re-implementation of the @font-face tag which is supported in Firefox 3.5 or Safari 4. Basically, it is allowing web designers to have a font used in a web page that is stored on the web server. For example, here I am using the font “Jellyka“:

If you have the latest Firefox or Safari, you see this properly!

 

Don't forget to take a look at this page in IE. Quite different! Which is why it is still important to do a browser check.

Notice you can still highlight the text since it is not an image, just text with that font applied.

A good explanation on how to use the @font-face tag is here. Here is another good example of its usage and what it is about.