Showing posts with label SQL Server 2008. Show all posts
Showing posts with label SQL Server 2008. Show all posts

Wednesday 22 June 2011

SQL Name Pipes Error

Problem: When setting up a development machine, I install SQL before SharePoint.  When I try access SQL Server 2008 R2 using "SQL Server Management Sudio", I get the error "provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server".

Initial Hypothesis: Named pipes are not enabled by default since SQL Server 2000, need to enable Named Pipes usinng "SQL Server Configuration Manager".

Resolution:
All Programs >> Microsoft SQL Server 2008 R2 >> Configuration Tools >> SQL Server Configuration Manager >> Enable both “TCP/IP” and “Named Pipes”.


More Info:
http://blogs.msdn.com/b/sql_protocols/archive/2007/03/31/named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server.aspx

Wednesday 10 November 2010

Access SQL using a different domain account using SQL Windows authentication mode

Problem: Infrastructure has setup a new SQL Server 2008 R2 instance.  I can only remote desktop to the machine using the installation account.  AS SQL Server is setup to use Windows authentication I can't login using the local "Microsoft SQL Server Management Studio". 

Initial Hypothesis:  I can't connect remotely to the SQL instance, I can't login using remote desktop access with the appropriate account that has SQL access.  I need to remote desktop to the SQL Server using the remote access windows account i.e. demo\Installation and then runas the demo\sqladmin account to get access to the Management Studio.

Resolution: Run SQL Server Management Studio in the rights of the windows account that has SQL access.
Steps:
  • Remote desktop into the SQLServer using the windows account that has remote desktop access i.e. demo\Installation
  • Open you cmd prompt
  • Execute the cmd> C:\Users\Installation>runas /user:demo\sqlaccount "C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe"
  • Enter the SqlAccount password
  • Management Studio opens up using the demo\SQLAdmin account

Update 6 Dec 2010 - Alternatively, hold down the shift key and right click the SQL Server Management menu, you are given the "run as .." menu option.

Thursday 7 October 2010

SQL Server 2008 Service Pack 2 Released

Overview: Technet news flash email letter announced the release of SQL Server 2008 Service Pack 2 today.  I think it's been out a few days. 
http://go.microsoft.com/fwlink/?LinkId=196550
I have installed on my development machine - no issues.  If you are on Windows 2008 upgrade to SP2.  New installs should still use SQLServer 2008 R2 and ignore this Service Pack.

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

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 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.