Showing posts with label SharePoint 2010. Show all posts
Showing posts with label SharePoint 2010. Show all posts

Friday 31 December 2010

Closing a popup dialog after running server side code

Problem: A base page allows a user to perform additional logic such as inserting a a new row into a list via the Dialog Framework.  The new row is a custom page that is shown thru the Dialog framework.  The custom page contains a web part that allows the user to fill in a form, perform custom logic and insert the record.  You now need the dialog page/popup to close automatically after the server side code is run.  The problem is you need to run the server side code before closing the window.

Initial Hypothesis:  I have been using jQuery with a hidden server control to set a value on the server side after my custom server side actions.  Then after the page reloads due to the postback, on the jQuery $document ready I check if the hidden value has been set and if it has I use the dialog framework to close the page.  A fair amount of work and round trips to solve my problem.

I saw a post on the msdn forums which is much simpler & better solution.  I implemented this and it is much easier and better than my hidden variable approach.

Resolution:
Place the code snippet in the server side code i.e. in the button click after you have performed your server side logic.

More Info:
http://social.technet.microsoft.com/Forums/en-US/sharepoint2010programming/thread/ba06d5e5-8c4c-4bca-95f8-65f40c1b11fa

Wednesday 29 December 2010

LINQ to SharePoint by Example

Problem: Simple examples to perform CRUD operations using LINQ to SharePoint. 
Resolution:
Read Operation/Select (Get a single row) & Update Operation/Update (Update a row), this code uses the default context constructor to retrieve the customer, you can use less code to achieve the same result.
Create Operation/Insert (Add a new row to a list)
Delete a customer list item.

Tuesday 14 September 2010

Recomended SP2010 Books

Professional SharePoint 2010 Administration - Todd Klindt, Shane Young, Steve Caravajal.  Wrox.   Good admin book, and useful for architecture.  Has a lot of best practice points and clearly explains core concepts such as service applications in SP2010 & claims based authentication.

Microsoft SharePoint 2010: Building solutions for Sharepoint 2010 - Sahil Malik.  APRESS.  Good all round book - especially useful for getting .net developers into SharePoint.   There are better reference developer books but it clearly works through major areas that SharePoint developer should know.

Wednesday 25 August 2010

Creating SharePoint Lists declaratively using Visual Studio 2010

Problem: Create a custom list to hold configuration values in a list.
Resolution Overview: Using VS 2010 create a feature that deploys the new list with content.
1.> Create Site Columns/fields;
2.> Create the Content Type using the Site Columns;
3.> Create the List Definition from the Content Type; and
4.> Add items to the list instance elements.xml.

Resolution Steps:

1.> Create Site Columns by adding a new "Empty Element" item in VS.
Declaratively add the site column to the elements.xml file;
Ensure your element file has been added to a feature for deployment;
Deploy the feature and ensure the Site Column has been add using the UI "Site Setting" > "Site Columns";

2.> Create the Content Type using the Site Columns
Using VS 2010 create a new Content Type;
Add caption
Using the existing Site Column create the Content Type declaratively;
Check the Content Type is create after you have deployed; 

3.> Create the List Definition from the Content Type

Follow the wizard and select the newly created Content Type "Configuration";
Check the List definition has created the elements.xml and schema.xml files;

Edit the Schema.xml File to Show the new columns defined int he content type (otherwise you will only see the "Title" column);

4.> Add items to the list instance elements.xml

Ensure the List is created



Tip: The fields/site columns & FieldRefs used in the elements files can be added thru the VS2010 tools.  VS2010 > View > Toolbar
Tip: Updated 18 Oct 2010 - CKSDev has the functionality to import Site Columns, this is useful in that you may of created the SiteColumns via the UI on a prototype site and you can not easily get the xml to create the site columns/fields declaritively.  http://blog.mastykarz.nl/cksdev-support-importing-site-columns/

Monday 16 August 2010

Using PowerShell to retrieve SharePoint site column guids

Problem: I am creating a Content Type that uses 1 of the built in site columns (field column), I need the guid of a OOTB site column.  I am looking to use the OOTB "Append-Only Comments" site column.
Resolution: Open PowerShell and execute the cmd:
$web = Get-SPweb http://demo1
write-host $web.Fields["Append-Only Comments"].Id

Tip: Don't add xml comments into declaritive content type creation, it stops the activation without any warning. 

Friday 13 August 2010

SharePoint 2010 Software Licencing

Rough idea of pricing excluding VAT.  This is not from Microsoft and pricing is not fixed as I have laid it out in this post.  Saying that, please consult a licencing expert most resellers such as HP have licencing experts to help you, this is merely a guide to help you get started.  Without further procrastination ...
Windows 2008 & SharePoint is priced on a per server basis.  SQL is charged at a per processor licence.  Software assurance is about and additional 28-30/year.
  • Windows 2008 R2 standard x64 - £2,5k
  • SharePoint Std Internet - 5,5K ?
  • SharePoint Ent Internet - 20K ?
  • SharePoint Std Internal - 3K ?
  • SharePoint Ent Internal - ?
  • SharePoint Std CAL £45/cal
  • SharePoint Ent CAL £80/cal
  • SQL 2008 R2 Std/proc £3,5k
  • SQL 2008 R2 Ent/Proc £14k
Software Assurance: MS sell software assurance, this entitles you to upgrade over the period of the SA agreement charged at about 30% per year. If the new version of the product is due for release and you will move to the new version in the next year or 2, Software assurance may be a good option. However as SP2010 has just been re4lease and SharePoint 15 is due some time in 2014, the cost of SA for that period would be more than buying the SP15 software (assuming prices stay the same). It is a per circumstances decision but I would opt to buy the SP2010 without SA, in 2014 buy new licences and the cost will most likely be lower for the upgrade and it will allow for a in-place upgrade (I.e. SP2010 and SP2014 would run next to each other until everything is upgraded). I would personally prefer to do the upgrade as it will keep the systems cleaner, have better performance and allow for a safer upgrade. Also not you can use Enterprise agreements and stop paying SA but the key if to look at minimising the cost of SharePoint licences over a 5 or 6 year period.

Tip: Licencing prices change depending on factors such as volume discounts, types of licences, software assurance, are you a charity, are you buying or renting licences.  This post takes a simplistic view of SharePoint licencing and is not Microsoft's policy but merely to help mine the licencing minefield that faces most big software projects.  Please consult a licencing expert, it will save you time and money.
Tip: Windows External Connector licences for Windows 2008 (Needed for SharePoint 2010 Internet licences if the external users will use any file or print functionality provided by Windows)
More Info:
Microsoft's SharePoint Licencing
Development Platform Stack (SharePoint versions for developers)
Update: 15 Nov 2010 - Microsoft SharePoint 2010 for Internet explained A good document explaining mix of Internet and Intranet usage
SharePoint 2010 version comparisons
 Licencing explained -
Ari's blog - licencing
http://stovereffect.com/2010/07/03/sharepoint-2010-licensing-part-v-sharepoint-2010-licensing-costs/
Lync licencing - Office Communicator 2007 R2 upgrade
Developer & UAT licences would be covered by MSDN/technet subscriptions.  Technet does not include Visual Studio 2010.

VS2010 & TFS licencing

   ========
Example to explain licencing
Scenario:
We have 700 internal users with AD accounts.  We have 15 external suppliers with a total of 2000 users that access our SP2010 system.  We have a dedicated physical SQL Server 2008 R2 std edition and 2 SharePoint NLB Windows 2008R2 std edition web servers.  What licences do we need? 
Assumptions:
Prices are my estimated guess.
Software assurance (SA) is not selected, simply multiply by 1.6 for a rough figure.
Resolution:
3 Windows 2008 R2 licences for the SQL box and 2 web servers.  +-£7K
SQL Server licences charged at per CPU.  4CPUs for +-£14K
SP2010 Std edition licences for the 700 internal users at £3K/server for 2 servers +- £6K
SP2010 Std edition licences for the external/Internet licence users at £5,5K/server for 2 servers +- £11K
700 Std user SP2010 cal's @£45/user  +- £31,5K
Total Software estimate:  £69.5K
Note: As you can see you have to pay for 4 server licences on 2 servers.  Those astute people out there may realise that you could add 2 more SP 2010 servers to your farm without paying for and more SP licences.  Only think is you need to then only allow internal access on the Internal servers and Internet access to the external SP server.

Development Licences
Technet covers all development licences you will need with the exception of Visual Studio.  MSDN licencing includes Visual Studio 2010.  Visual Studio Ultimate, & Professinal can be purchase individually or through MSDN.
TFS 2010 (Team Foundation Server) has 3 ways to get licences:
  • MSDN - individual all versions get 1 instance licence & 1 Cal with a MSDN subscription.
  • Volume licencing – each person accessing TFS server needs a Cal.
  • Retails – Organisation gets 1 instance of TFS & 5 Cal’s. Approx £500.
Any TFS instance needs SQL 2008 standard edition, this is included in the TFS licence.  Can't use this free version of SQL Server for anything else.

Update 8 Mar 2011: Ari Bakker Post of Web Parts by SP licence Type
Update 10 Nov 2011: Technet

More Info:
http://stovereffect.com/2010/07/01/sharepoint-2010-licensing-part-iii-search-office-web-applications-and-project-server/
http://www.directionsonmicrosoft.com/microsoft-licensing/30-licensing/1458-sharepoint-server-2010-licensing.html

SharePoint 2010 console application System.IO.FileNotFound error

Problem: Built a local console app to access a SharePoint site, add System.Web & Microsoft.SharePoint references to the console project.  Run the code and get a System.IO.FileNotFound error.
Code SPSite site = new SPSite(http://demo1);
Hypothesis: Check url is correct (it was).  VS2010 console apps are set to be x86 by default.  SharEPoint only works on x64 so Microsoft.SharePoint is x64. 
Resolution:  Open VS2010, right click the console project.  "Properties" > "Build" tab, set "Platform target to "x64".
Tip: Uses the .NET 3.5 for console applications.
More info:  Top 2 search on Google yielded the solution.  Console FileNotFound error. and 2nd solution System.IO.FileNotFound Error

Tuesday 10 August 2010

Reusable content in SP2010 issue

Problem:
1.> Reusable content is added to an html field control as shown below

2.> Under the "Reusable Content" inserted into the page inside the same field contrl, add any OOTB web part.
3.> When you save or publish the page, the html gets mixed around and displays incorectly.

Hypothesis: I have to think this is a bug as each item can be added individually.
Possible Resolution:
  • Use different page layouts with more field controls or
  • programatically retrieve the reusable content and display it or
  • Use a dataview WP with custom xslt to display the reusable content.
Tip: Reusable content is not available inside web parts. So like in MOSS, you cannot insert reusable content inside the OOTB content editor web part. Reusable content is only available in field controls.
Tip: Reusable content is similar to what it was in MOSS, it is available if the SharePoint Server Publishing feature is activated in both the "Site Collection Features" & "Manage Site Features".

Additional infoSerge Luca confirmed this issue.

Tuesday 20 July 2010

SharePoint 2010 membership provider/Claims based authentication

What is Claims based authentication?
Allows SharePoint to communicate with external membership providers over open communication standards to authenticate a user. The membership provide determines if the user is valid. A token either saying the user is valid or invalid is returned. More info
Authorisation is handled by SharePoint or the logic can be applied by external membership providers.
Forms Based Authentication (FBA) works with your membership provider to give users access off a provide such as LDAP providers like Active Directory (AD).
You can also setup Windows Authentication in the "Identity Provider" where you use either NTLM or Kerbros as well as other ASP.NET providers.
The SecurityTokenService (STS) Application ensures claims tokens are being passed correctly between the provider and SharePoint (Our SPSite). STS allows for multiple providers plugged in our site. STS is setup in the web.config. More info.
Tip: Sign in Url - when setting up FBA, you can use a custom page to add business logic, for instance I assign rights/permissions when a user comes from a trusted 3rd party. More info.
Tip: FBA doesn't have to use claims based authentication as in MOSS. If you have AD but need to provide Internet access then Claims based adds no value. More info.
NTLM vs Kerbros: NTLM stands for NT Lan Manager. Microsoft's challenge response authentication protocol. Kerbros is an open standard authentication protocol, it is more secure in that it is encrypted and token are used to validate parties in the communication process. Kerbros requires ADFS.  Kerbros is therefore more secure however you do need to have a network that supports Kerbrose for it to work. Kerbros is more chatty and introduces more points of failure. NTML is more efficient. Depending on usage such as Internet it will determine the protocol.  I tend to lean towards Kerbros in larger SharePoint implementations if the network supports.  Internet scenarios don't expose ADFS to the Internet so Kerbros is not an option.

More Info:
Setting up SQL claims based FBA

Updated: 2014-02-27
Setting up ADFS2.0
Configure an Authentication Provider for a Web App to use ADFS

http://www.sharepointpals.com/post/Creating-an-ADFS20-TrustedIdentityTokenIssuer-using-PowerShell-in-SharePoint-2013
http://www.sharepointpals.com/post/How-to-Add-more-than-One-SharePoint-2013-WebApplication-to-a-SPTrustedIdentityTokenIssuer-on-ADFS-using-PowerShell

Wednesday 14 July 2010

SP2010 CQWP customisation

Overview: Content Query Web Part (CQWP) in SP2010 is similar to in MOSS. This post walks thru using the CQWP to display a custom list and custom columns while outputting custom html via a custom xslt.
CQWP (need the publishing feature enabled, this creates the styles library and add the CQWP) by default uses the xslt /Style Library/XSL Style Sheets/ItemStyle.xsl.

Steps:
  1. Don't write over ItemStyle.xsl as this si supplied by SP2010 OOTB. Rather create a new xslt and put it into the styles library. Build up the xslt, I based my file on the itemstyle.xsl file, see rules for getting the output you are looking for using How to: Customize XSL for the Content By Query Web Part
  2. Custom xslt formatting, I always add the following code in case I want to see what the available fields are:
  3. Deploy the custom style sheet via a feature.
  4. Create a new Custom list called "Pets" and add columns for Title, Age & Status (choice):
  5. Edit your custom xslt to display for "Pets" as shown below:
  6. Add a new CQWP to your page. Configure it to display items from your new list (Pets).
  7. Change the "Presentation" section, "Item Style" to Show "Pets". Apply the Changes:
  8. CQWP displays as:
  9. Edit the CQWP "Age" property to "Age"
  10. Edit the CQWP "Age" property to "Status"

    Tuesday 13 July 2010

    Audience Targeting in SP2010

    Overview from MS
    Technet User Profile Service Overview
    Audience targeting needs compilation so not useful when adding users on 1st login however, menu items can be targeted using SharePoint security groups.
    Audience targeting is part of SharePoint Standard edition.  SharePoint 2010 editions comparison.
    Update 5 Dec 2010 - The "Publishing feature" needs to be enabled on the site collection and site.  User Profile Service needs to be running.

    Setup Audience targeting on Global menu's.

    Overview: To use audience targeting you need to have at least SharePoint Server standard edition as you need the "Site Collection Publishing Feature" enabled. 

    In this walk thru I am adding a user to a SharePoint Group and allowing the group to see a menu option.  Also ensure audience targeting is enabled.
    Add the user to the Share Point group in my case I added the user "ReadOnlyUser" to SharePoint Security group "Extend Visitors".
    Edit the menu option to be only visible to the SharePoint group "Extend Visitors".
    Menu of normal user without the extra menu option.
    User that can see additional menu options

    Monday 12 July 2010

    SharePoint 2010 UI/browser help urls

    Site settings url: http://...../_layouts/settings.aspx
    Determine CAML to create site columns  http://url/_vti_bin/owssvr.dll?Cmd=ExportList&List=listguid
    Remove web parts from a page http://url/_layouts/spcontnt.aspx?&url=page/_layouts/spcontnt.aspx?&url=page

    VS2010 deployment error Site Url property missing

    Overview: Each new developer on a project grabs the solutions/project files from TFS or VSS as in my case. When they try deploy the solution, they receive an error "Error occurred in the deployment step 'Recycle IIS Application pool': Cannot connect to the SharePoint Site: http://... Make sure that this is a valid URL and the SharePoint site is running on the local computer, ... Update the Site URL property on the project."
    Resolution: As the error suggest go to the project being deployed and ensure that you local development url is entered in the "Site URL" property. Obviously this setting should not be stored in source control as it will often differ per environment/developer.
    Visual Studio 2010 Project properties

    Thursday 1 July 2010

    Installing Sharepoint 2010 options & Basic SP2010 manual installation tips

    You have 4 options for installing SharePoint farms:
    1. Manually sun the setup and follow the installation wizard (this is discussed below);
    2. Deploy SharePoint 2010 via a slipstream install, this was my prefered method for MOSS.  I ran the install from a batch file that got it's configuration from an xml file;
    3. PSConfig installation (sic); or
    4. Use PowerShell to Install SharePoint. and technet scripted deployment
     Summary: For environments such as live the PowerShell/Slipstreamed options are best as they allow for recreation and input is always identical.  Manual install is fine for development servers however their is no advantage except for a lower learning curve for the IT admin.
    Post below is a Manual Installation:
    SP2010 install video
    Install the pre-requisites
    • Prerequisits will install roles and software you need internet access on the server to fetch the prerequisits software (this can be put on the server to stop the machine going to the Internet).
    • Preferably have seperate instance of SQL 2008 R2 but for dev/demo machines. If 1 machine rather setup SQL devleoper or a instance (I dislike using SQL express).
    Setup / SP 2010 install tips
    • Install "Server farm" option not standalone
    • "Complete" installs all component prefered option
    • Connect to a new farm
    • Database server name us name rather than IP (incase it changes)
    • DB account (must already exist in AD)
    • Passphrase used to connect new servers to this server farm (remeber/keep it)
    • Kerbros - if your network supports it but use NTLM if you aren't sure.
    • Wizard - follow screens, services can be heavy so add them when you need them, however for demo I select all services and create a new site collection - a good options is to use the Team Site Template.
    • Need 3 accounts for min Best practices: 1) Managed Service account (domain user account) that SQL Server runs in, 2) Managed Service Account (domain user account) all services will be installed on this account (MS suggests using a seperate managed account for each service) on small farm s/dev I use 1 account,  and 3) Farm install account (domain account) this needs to be a local admin on each SP2010 server and have creator & dbsecurity accouts on SQL.
    • 5 Accounts is a better option excluding the SQL services account namely:
    1. SP-Install - domain account with admin local rights on each WFE also need SQL dbcreator and securityadmin roles (used to login and install binaries, use this account for add new servers to the farm),
    2. SP-Farm - domain account no permissions, will be the account to run timer job and other key roles,
    3. SP-Web-App-Pool - Content Web app account - Domain account only,
    4. SP-Services - Install all services to use the same domain account, this can be seperate for each services but for easy of setup and mainentance use 1 account.  Exception is the User Profiles service, setup seperately using Spence Harbors post as the user domain account needs unique security, and
    5. SP-Crawl - Used to crawl SP content.
    Additional Info on accounts:
    1. SQL Server needs to run as a windows service, you need an account, I would use a managed account in AD with no permissions called SP2010-SQLService.
    2. Farm Installation account, you need to create a domain user account in AD, give the account local admin access to each SP2010 machine.  Call it SP2010-Admin.
    3. SP2010 Service account/s, you need to create a managed service account with zero permissions in AD.  You can use 1 account or create a seperate account for each service (MS Best Practice).  I call my 1 account SP2010-Services. 
    Use slipstreaming for SharePoint it's faster and consistant.
    Use:
    1. Windows 2008 R2 x64
    2. SQL 2008 x64
    3. On HyperV/VMWare except the db which should be a seperate physical machine/SAN
    Update 08 November 2010:  Notes on deploying a 3 server farm consisting of 2 WFE's that are NLB using Windows NLB.  Installation done using AutoSPInstaller. 
    Installation Notes for a 3 server NLB SharePoint 2010 farm

    Update 10 November 2010: SharePoint install account - Todd Klindt.
    Update 11 May 2011: SharePoint 2010 database management article

    Tuesday 29 June 2010

    SharePoint 2010 using VS 2010 and Visual Source Safe 2005

    Overview: Client is implementing SP 2010, they don't have TFS and the source control is Visual Source Safe (VSS) 2005.
    Steps to integrate VS2010 into VSS 2005:
    • Install the VSS client on your development server/environment;
    • Open the VSS explorer and add the project (Subsequent developers need to locate the file and download a copy) and set the working directory if pulling the project;

    • Open VS2010, select Tools > Options > Source Control > Plug-in Selection > Change the source control to "Microsoft Visual SourceSafe";


    • I prefer to hold my solution file locally and pull my projects however a lot of architects prefer to keep the solution in Source Control. Open the solution in VS2010 and you should be ready to run.
    • Tip: If you projects won't deploy click on the project and look at the "Site Url", this gets cleared down. Enter you local development server url i.e. http://demo1.app.dev/

    Tuesday 15 June 2010

    SQL Server for SharePoint 2010 notes

    • SharePoint Server 2010 needs 64-bit SQL Server 2008 SP 1 CU2 (Cumulative Update) or 64-bit SQL Server 2005 SP3 CU3.
    • Determine you storage requirements
    • SQL is I/O intensive, to improve this get fast disks and use multiple disks & disk controllers.
    • Use a SAN if possible, the physical hardware with multiple disks that are RAID 10 (Stripped & mirrored) preferable with C:\ drive for programs, d:\ for data and e:\ for logs.
    • Don't virtualise SQL Server unless you are a virtualisation expert and can get extremely high IOPS.
    • Search db's can also be broken into their own drive/disks.
    • Build the database with hardware redundancy (NIC, controllers, RAID).
    • Use SQL Server 2008 R2 Enterprise edition if possible.
    • Index's will be about 25% of the size of your database storage.
    • 8 GB is the minimum amount of RAM for a DB in production, 16 GB is more comfortable and for large farms or big site collections 64GB is a good guideline. SQL Enterprise Edition (EE) can support up to 2 Terabytes of RAM.
    • Don't install any other software on the database as you want maximum I/Oa nd the DB server/s should be locked down.
    • SQL guideline is 4 SP2010 server for each SQL machine.
    • Use multiple Data files for Content databases (Distribute data across disks, faster backup and restore). Try keep data files roughly similar in size & usage.
    • Large files can be store in Remote Blob storage (RBS), saves db and can be cheaper on disk space. Cheaper storage can be used to hold large blob data such as cloud storage. Blobs can be stored locally using the files stream using all versions of SQL, for remote storage EE is needed (Not sure what this means).
    • Pre-grow data & log files, faster than doing it on the fly when the system is over utilised.
    • Try keep 25% of db space free for growth in peak times.
    • Monitor SQL Servers including hardware counters.
    • SQL Database Mirroring is greatly improved.
    • Use backup compression on SQL 2008 (2005 not supported) is backup size is an issue. I/O is improved for the backup process.
    • SQL 2008 offers improved clustering.
    • Mirroring or Clustering is a good resilience option.  Review for HA.
    • Use Windows authentication not mixed mode authentication.
    • Use throttling if SQL is under load.
    • Transparent Data Encryption is supported in SQL 2008 EE & SP2010, there are costs but security is much better.
    • Failover clustering is still available is you use Standard or EE of SQL 2008.
    • Clustering and mirroring are good options for High Availability (HA) select appropriately for your network and knowledge.
    • Install SQL Server using a domain account.  The windows service account needs no permissions but is needed for advance SQL features as opposed to using built in accounts or local accounts.
    • I tend to use IP adrs for point to SQL Server, the netbios name also works and can be easier in the event of a SQL Server disaster.  For really good availability use a SQL Alias, it takes more setup time but if you loose your SQL box you will be glad you did it as you can switch over to another SQL box quickly.
    • Mirroring is a good option for HA.  Backups can be performed in various ways ensure you select the appropriate backup strategy. 
    • Max Degree of Parallelism (MAXDOP) should be set to 1. This can be found on the SQL Server instance properties > Advanced > Parallelism > Max Degree of Parallelism. Or run the T-SQL SELECT value FROM sys.configurations WHERE name = 'max degree of parallelism' SP2013 tries to reset MAXDOP during installation. 
    • AUTO_UPDATE_STATISTICS & AUTO_CREATE_STATISTICS should be disabled in SP2010.  More Info.
    • Use the default SQL Collation (Latin1_General_CI_AS_KS_WS), a good reason why SharePoint farms should have their own SQL Server instance.
    • Full backups should clear down the transaction log, if the transaction log is not cleaned up, perform it manually after you have checked the SQL backup of the db is valid.
    • Incremental backups are cumulative i.e. they go back to the last Fullback up not the last incremental backup.
    • Don't let transaction logs grow continuously, perform full backups periodically followed by taking a transaction log backup that truncates the log to remove/zero unused transactions.
    • SQL 2008 Developer Edition is the equivalent of SQL 2008 Enterprise Edition.
    • SQL Server 2008 R2 is the best option if you can choose.
    • To determine SQL edition in SQL Management Studio run
    SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')
    • SQL Server 2008 = 10.0.1600.22 needs cumulative update 2 for SP1. Update - 12/10/2010 or SP2
    • SQL Server 2008 SP1  = 10.0.2531.0 needs cumulative update 2 for SP1.
    • SQL Server 2008 SP1 + CU2 = 10.0.2714.0
    • SQL Server 2008 + SP2 = 10.0.4000.0 Update - 12/10/2010
    • SQL Server 2008 R2  =  10.50.1600.1 Update - 12/10/2010
    • SQL Server 2008 R2 SP1 = 10.50.2500.0 Updated - 26/07/2011
    I also telnet from each of my SharePoint servers to SLQ Server before I install to ensure networking is working and that SQL Server is available.

    SharePoint DB's create:
    SPF2010: 1) Configuration database (DB), 2) CA, Content DB's (multiple for site collections, 3) 1 content db stores 1 or more site collections data, Best Practice is to limit content db's to 200GB), 4) Usage and Health Data Collection database (farm health & usage info), 5) Business Data Connectivity database, Application Registry database(BDC in MOSS used for historic reason) & 6) Subscription Settings database.
    SPS2010 Std Ed: 1) Secure Store database (stores & masps credentials), 2) State database (State info used by forms server, info path & visio services), 3) Web Analytics Staging database, 4) Web Analytics Reporting database, 5) Search service application Administration database, 6) Search service application Crawl database, 7) Search service application Property database, 8) User Profile service application Profile database, 9) User Profile service application Synchronization database, 10) User Profile service application Social Tagging database, 11) Managed Metadata database, 12) Word Automation Services database
    SPS2010 Ent Ed: 1) PerformancePoint service application database, 2) Project Server 2010 databases, 3) Published database, 4) Archive database, 5) Reporting database, 6) ...
    More info:
    http://technet.microsoft.com/en-us/library/cc990273.aspx
    Determine the SQL Server version installed
    SQL Version no's
    SQL DB info for SP 2010 - db's created
    Updated 15 Dec 2010 - Database Maintenance for SharePoint 2010 by Matt Ranlett, Brendon Schwartz
    Updated 11 May 2011 - Nice simple article on the SP2010 database's by Bert Jan van der Steeg
    Updated 24 May 2011 - SQL Server mirror is either Synconous (hot standby for HA) or Asynconous (for DR).  Mirroring requires Enterprise edition and standard edition support is limited.  Clustering is normally done in the same server room whereas Mirroring is done on a remote site, the distance is dictated by the speed of the connection.
    Update 11 Aug 2011 - Set the appropriate recovery model for your SP2010 databases.
    Updated 28 May 2012 - SQL Best Practices for SharePoint 2010
    Update 13 August 2013 - Best Practices for SQL Server in a SharePoint 2013 Farm - In SP2013 still ensure MAXDOP is set to 1.  Note:  During the SPInstall SQL will make this change if it has permissions to do this.

    Wednesday 9 June 2010

    SPMetal not generating correctly on lists with only a Title column

    Problem: I have 7 custom lists in my SharePoint 2010 site. I run SPMetal against these lists and only 5 lists as available in LINQ.

    Initial Hypothesis: SPMetal is broken followed by alot of frustration which eventually I worked out that a custom list must have additional columns to Show up in SPMetal.

    Resolution: Create an optional column if you only have the "Title" column in a list that you wish to use Linq to SharePoint on.

    Tuesday 8 June 2010

    Moving content between environments

    There are some good options for moving content and sites in SharePoint. I have seen to many people write custom migration tools and I strongly urge you to look at Chris O'Brien's Content Deployment Wizard and Metalogix's products before writing a custom tool.

    Chris O'Brien has updated his Content Deployment Wizard for SP 2010 - for those of you that don't know the tool from MOSS it's a pretty useful tool for moving content between your SharePoint sites. Take alook at it on CodePlex.
    http://spdeploymentwizard.codeplex.com/

    Metalogix offer some really good tools around migrating content. The licencing can work out rather expensive for simple jobs but still far cheaper than writing complex code migration. It is very flexible and on the 2 MOSS projects I used it on I would highly recommend their products.
    Metalogix have a wide range of tools for moving data to and from SharePoint including from other CMS & html websites.
    http://www.metalogix.net/
    You can migrate web sites, MCMS 2002, MOSS, file shares, exchange public folders, google apps, to SharePoint or SharePoint online.  I believe Metalogix works for BPOS via web services and for SP365 will use restful web services (.Svc) via the 3 client object models.

    More (MSDN) information on SharePoint Migration using the SharePoint API
    http://msdn.microsoft.com/en-us/library/bb249963.aspx
    I'm sure there are other good/bad products out there so if you have used any pls add your comments.

    Friday 4 June 2010

    BDC is replaced by BCS in SP2010

    • Business Connectivity Services (BCS) is the replacement for Business Data Catalog (BDC) (MOSS 2007). Brings external data into sharePoint. External data source can be SQL, or Web Services, so it is pretty easy to have CRUD Access to databases, ERP or third parties.
    • BCS has read and write support.
    • Both SPD (SharePoint Designer) & VS 2010 have tooling support for entity modeling to connect your line of business application (LOB).