Tuesday, December 15, 2009

SharePoint database mirroring or log shipping for failover farm

I have heard the question a lot. There is no distinct answer to this question. Below are pro's and con's and depending on the needs of the client one should be choosen.

Here's a quick list of the main benefits of each technology as well as some limitations:

Database Mirroring benefits:

  • Instantaneous synchronization of changes
  • Easy setup and maintenance
  • Automated failover (in High Availability Mode)
  • Easy to perform failover
  • Fast failover. (if no transactions are queued)
  • Applications can be mirroring aware using failover partner parameter in connection strings

Database Mirroring limitations:

  • Limited number of databases can be mirrored per SQL instance. (however, this number is higher than the 10 you see plastered everywhere, but really depends on your hardware)
  • Mirrored database cannot be queried, backed up, or basically touched in any way (snapshot can be taken however)
  • Only supports one to one server pairings
  • Cannot mirror a database more than once
  • Synchronous mirroring is intolerant to latency and bandwidth constraints (Asynchronous mirroring has no problems with latency or bandwidth

Log Shipping benefits:

  • Very flexible - Independent jobs govern backup/copy/restore behavior
  • Delay of restore job can protect from database corruption
  • Log shipped database can be queried. (in standby mode)
  • Log shipping allows multiple standby databases
  • Perhaps more tolerant to latency than sychronous mirroring.
  • Doesn't affect performance of primary server
  • Easy setup

Log Shipping limitations:

  • No automated failover
  • Cannot synchronize faster than once a minute
  • Failover is more complicated than mirroring
  • Harder to view status of log shipping

Monday, December 7, 2009

How to find the Sharepoint Configuration Database connection string

I come across this small issue sometimes and I thought I would write a quick note on it.

Ever wondered where does Sharepoint saves its configuration database connection information? Sharepoint 2007 saves its connection string for configuration database in registry and you can change it easily if you have moved your configuration database from one server to another.

Following is the registry path
My Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\Secure\ConfigDb
and our required key is dsn

Wednesday, July 29, 2009

How to Determine when to splite a site into a site colleciton

Site collections will allow the IT department freedom to maintain just application itself without the worry of security or content hierarchy maintenance.

The following is a list of what an individual site collection offers.

For the Users:
  • Dedicated Recycle bins
  • Dedicated usage Reports
  • Distributed administration (site collection administrators)
  • Dedicated search scopes, keywords, and best-bets
  • Custom feature deployments
  • Dedicated language translation maintenance
  • Dedicated galleries for web parts, master pages, content types, site columns, site templates, and list templates
  • Dedicated shared libraries, such as site collection images and site collection styles
  • Dedicated real estate (Self Containment)

For the IT Administrators:

  • Site quota templates
  • Distributed administration
  • Site locking
  • Database maintenance options
  • Backup / Restore abilities
  • Content Deployments
  • InfoPath forms services global template targeting

I have 2 big, at least what I think is big, points on why to use site collections. The first one is site quotas and recycle bins. The issue is the recycle bin is based on site collections and the quota for a site collection. If everyone shares a site collection, then they share the recycle bins storage size. The example I usually give is HR deletes 1MB per day and IT deletes 1GB per day. With a 5GB site quota, HR content will be flushed through the system a lot quicker if they share a recycle bin. This results in having to restore a database to get back a single document. (You know it will happen, Murphy’s Law). If they were in separate site collections, then the HR recycle bin would be valid for months maybe years with a 5GB quota because it is only affected by their deletions.

The second point is distributed administration. For most small companies this might be a moot point, but for high content driven organizations with a small IT force. It is a godsend for IT.

Thursday, June 18, 2009

Quick Comparison of WSS 3.0, MOSS 2007 Standard, and MOSS 2007 Enterprise

Sometimes it gets overwelming viewing the huge microsoft comparison Spreadsheets and pricing info, so I decided to simply break down the MAJOR differences of these three products and the pricing information. Other Products such as Office 2007 Forms Server, SharePoint Server for Search, and SharePoint 2003 were discluded from this comparison.

Commonly Used Features Moss Standard Provides Over WSS 3.0


  • Document Management Site Templates
  • Retention and Auditing Plicies
  • Records Repository
  • OOB Workflow
  • Slide Libraries(Store individual powerpt slides in site)
  • Auditing and Complience
  • People Search
  • Relevence Algorithms for Search
  • Search Enterprise Content Sources (File Shares, Exchange Folders, etc)
  • My Sites
  • User Profiles
  • Programability of Search: API's
  • SSO

Commonly Used Features MOSS Enterprise Provides Over Standard

  • Business Intelligence In General
  • BDC and BDC Web Parts and Actions
  • Report Center - Provides consistand management of Reports
  • KPI
  • Filter Web Parts (Filter lists, profiles, etc)
  • Excel Services: fully interactive spreadsheets in browser
  • Excel Spreadsheet extensibilty: Access via web services
  • Business Data Search
  • Browser based Forms

How to Work with Clients on Licensing;

Three Questions to ask the client:

  1. How do you buy your current Microsoft licenses?
  2. Are in aggrement with microsoft(open, select, enterprise)?
  3. Assuming they do not purchase at Best Buy, ask who do you purchase through?

Major Differences between three Aggreement types:

  • Select Agreement: Buy CALS based on forecast. You can buy in chunks.
  • Open Agreement: Buy CALS as you need
  • Enterprise Agreement: Must buy CALS for all users included in the agreement

Related Links:

Tuesday, June 9, 2009

InfoPath - Filtering Values based on Drop Down Selection.

Below is a small Infopath solution I came across today when developing a dynamic InfoPath form.

How to select an item from a dropdown list box, retrieve the database record corresponding to the item, and display the data in fields:

You can do this using a combination of default data, formulas, and filters (available in SP1).
Do the following:
1. Open the properties dialog for the TextBox by double-clicking in the control in the view.

2. Click on the Fx button next to the value field

3. Click the Insert a Field or Group button

4. Choose the correct field for the text box from the secondary data source

5. Click the filter button

6. Click add

7. From the left-most dropdown choose the " drop down list " field from the secondary data source

8. Leave the middle dropdown as "is equal to"

9. Open the right-most dropdown and choose "Select a field or group"

10. Choose the "drop down list" field from the main data source

11. Close all the dialogs


Now, when you preview or open the form and choose a name from the dropdown the gender will display in the textbox.

Monday, May 18, 2009

List of Generic SharePoint issues I have come across.

Below I have included a simple list of some basic SharePoint issues and questions that I have come across in which I thought I would share. This is basically a brief compilation of my requests to "The Google".

How do I make a quick launch that will be more then 2 levels deep?
Use SharePoint Designer and change static levels in the asp code on the MasterPage.
My Sharepoint is only showing 10 web parts and I need the full out of the box list? Activate all features. Especially the publishing feature.
How can I create a Newest Documents web part for the home page?
Either Data View or content query web part http://blogs.msdn.com/sharepointdesigner/archive/2007/04/24/spdatasource-and-rollups-with-the-data-view.aspx - Use the content query web part and filter by content type document and date and select the newest.
How should I break the site up content database wise? You have to make seperate site collections for each.
How can I roll up content from multiple site collections? http://www.devcow.com/blogs/jdattis/archive/2007/04/17/SharePoint-2007-How-to-Rollup-Content-from-multiple-Site-Collections.aspx
How do I take away trashcans and view all site collecitons?
Use Designer. Click on the 'View All Site Content' placeholder. In the Tag Properties, under group Behaviour, select the 'Visible' property and change it from True to False
Why can I not turn on the Office SharePoint Server Enterprise Site Collection features? Probably need to install SP2 on sql or give all service accounts write and read access to database.
Why did explorer view not work?
Add it to the trusted sites and it will work
How to disable mysite and mylinks Inside Shared services?
Open Central admin shared services click personalization service permissions. Uncheck create personal site and User personal feature
Configuring the new flag?
Change days: stsadm.exe -o setproperty -pn days-to-show-new-icon -pv 0 -url [Your Virtual Server's URL]
How do I hide the drop down for search scopes?
Select select.ms-sbscopes{display:none} on core.css - Also make it go to new site by changing scope name to Search Dropdown -update scopes in central admin -iisreset
Setting an Autonumber in sharepoint?
Use the id field.
How do you Audit Trail SharePoint?
You turn the option on and it creates logsHow to Hide the top Home tab? - http://social.technet.microsoft.com/forums/en-US/sharepointcustomization/thread/512f9004-0a13-48b6-b26e-d0366f4551c4
Edit Page is Greyed out, how do I change this?
If you go into Site Actions and Show Page Editing Toolbar there'll be a message on the toolbar if this page is locked for editing by a user. If thats the case you can select Page->Override Checkout.
How do you make the calandar webpart a daily view?SharePoint does not search bookmarks?

Tuesday, May 12, 2009

401.1 Error When Accessing SharePoint From Server

I ran into this issue several times in the past in setting up SharePoint environments (for both internal development use and customers) so I figured it was time to write a blog post about it. If you are running SharePoint Server 2007 or WSS 3.0 on Windows Server 2003 SP1 or later you will run into authentication issues if you are trying to access a SharePoint site using host headers from the server itself (i.e. host file has portal.mydomain.com pointed to 127.0.0.1). This issue manifests itself as the result of a loop back security check that Microsoft built in to Windows Server 2003 SP1 and later. The purpose of the loopback check is to eliminate denial of service attacks however it causes issues with access SharePoint sites locally from the server. In a typical production environment this is typically not a problem since you rarely access SharePoint sites (besides central admin) from a front end web server itself. However I do have physical and virtual development environments where all activities take place from the server, so this can cause some heartburn unless you have worked through the issue before. You can read the detailed KB article at http://support.microsoft.com/kb/926642 & http://support.microsoft.com/kb/896861. Here is a rundown of how to fix the problem. I typically disable the loopback check however this is not recommended for production server environments.

Method 1: Disable the authentication loopback check
Re-enable the behavior that exists in Windows Server 2003 by setting the DisableLoopbackCheck registry entry in the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa registry subkey to 1. To set the DisableLoopbackCheck registry entry to 1, follow these steps on the client computer:

1. Click Start, click Run, type regedit, and then click OK.
2. Locate and then click the following registry subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
3. Right-click Lsa, point to New, and then click DWORD Value.
4. Type DisableLoopbackCheck, and then press ENTER.
5. Right-click DisableLoopbackCheck, and then click Modify.
6. In the Value data box, type 1, and then click OK.
7. Exit Registry Editor.
8. Restart the computer.
Note You must restart the server for this change to take effect. By default, loopback check functionality is turned on in Windows Server 2003 SP1, and the DisableLoopbackCheck registry entry is set to 0 (zero). The security is reduced when you disable the authentication loopback check, and you open the Windows Server 2003 server for man-in-the-middle (MITM) attacks on NTLM.


Method 2: Create the Local Security Authority host names that can be referenced in an NTLM authentication request
To do this, follow these steps for all the nodes on the client computer:

1. Click Start, click Run, type regedit, and then click OK.
2. Locate and then click the following registry subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0
3. Right-click MSV1_0, point to New, and then click Multi-String Value.
4. In the Name column, type BackConnectionHostNames, and then press ENTER.
5. Right-click BackConnectionHostNames, and then click Modify.
6. In the Value data box, type the CNAME or the DNS alias, that is used for the local shares on the computer, and then click OK.

Note Type each host name on a separate line.

Note If the BackConnectionHostNames registry entry exists as a REG_DWORD type, you have to delete the BackConnectionHostNames registry entry.
7. Exit Registry Editor, and then restart the computer.