Setting Up a Custom SQL2012 and Sharepoint 2010 BI machine

April 23, 2012

A few days ago I finally got my custom Sharepoint 2010 and SQL 2012 demo image ready. With only a few days to go till my PowerPivot and Power View presentation at SQL Saturday 138 in Sydney, this was very relieving!

There are a few changes to how you would do this compared to the SQL 2008 R2 setup. Hence I thought I would share my experiences as I went through some pains to get it all right. Note here I am setting up a single machine for demo/evaluation purposes only. So, I will not be following the general best practice recommendation of using separate service accounts and Application Pools.

My aim was also to build up a “lean” machine that has the minimal Sharepoint services required to run BI demos. Hence, the steps I follow are probably not what you would do for a production environment setup.

I also acknowledge that scripting a lot of this in PowerShell can save a lot of time. However, I believe you have to go through it at least once to understand the components and what to script in the first place J This is not a detailed step by step post for every item – links are provided at times. However for the BI specific configuration, especially what has changed, I’ve been quite specific.

Whats New in this setup?

Ok, the main differences in this install/setup compared to SQL 2008 R2 are:

  1. SSIS is now a true service with its own Catalog
  2. Data Quality Services (DQS) has been introduced
  3. Master Data Services (MDS) has been revamped a lot
  4. SSRS is now a proper Service Application in Sharepoint and hence its configuration is different. SSRS now also includes PowerView
  5. You will need 3 instances of SQL Analysis Services
    1. Multidimensional and Data Mining (i.e. what we have had since SQL 2005)
    2. Tabular
    3. PowerPivot Integrated
  6. There is now a PowerPivot configuration tool to assist with setting up the PowerPivot integration. This is greatly improved from the previous PowerPivot setup experience, where it was either all completely manual on an existing farm. The other option in SQL 2008 R2 was where you could use the PowerPivot for Sharepoint Setup option from the SQL installer on an unconfigured farm. This would configure the farm for you. This had a couple of drawbacks in my opinion:
    1. It would install an own named instance of the SQL Server called POWERPIVOT, containing the Sharepoint databases
    2. Unless you setup using PowerShell, you could not control the naming of the Service Application Databases, and those horrible GUIDs where always suffixed. Below is a reminder from my 2008 R2 VM. While we cant get rid of all of the GUIDs, we can for most. Again Powershell is the solution if you want complete control.

I have not yet configured MDS and DQS and I may blog this in another set of posts. From memory when I played with it in Denali RC0 DQS was fine but I had issues with MDS and its Silverlight 5 requirement, which was still beta.


  1. If you don’t have an internet connection from your VM, make sure you have downloaded the Sharepoint 2010 pre-requisites. A handy PowerShell script exists on TechNet to save you manually doing all this.
  2. Then you will also need the following

Installing SQL Server 2012

  1. Setup Windows Server 2008 R2 and add the Active Directory Domain Services role. This is important so we can use a proper domain account for services. Ive seen problems when using built in service accounts. It will suggest you add in the DNS Server role a well. I did so. In my virtual machine I setup 2 network adapters – one with a fixed IP on an internal virtual LAN Segment, the other bridged so it could access my host’s internet connection.
  2. Install a DEFAULT instance of SQL Server 2012. Things to note:
  • I used the domain Administrator account to run all services except for the Browser, Agent and Full Text Filter.
  • Remember to add the Administrator account as ad admin to the relevant services as you configure them in the install Wizard. You don’t want to be locked out later

These are the features I selected (pretty much all).. noting that when I configured the services, I picked SSAS Multidimensional.

  1. I then ran the Reporting Services Configuration tool to setup the Native SSRS instance.
  2. I wanted a Tabular version of SSAS, so I ran the installer again and chose to install a NAMED instance of SQL Server 2012, which called TABULAR. This time the only feature I selected was Analysis Services, but when asked to choose the mode I selected Tabular.

Installing Sharepoint

  1. This part is simple. I just ran the installer, went through the pre-requisites install and then installed Sharepoint. When the Sharepoint Installer asks you what type of install don’t choose Standalone. Use the Farm option. The standalone version will go ahead and install SQL express which is not what we want.

  2. Once Sharepoint is installed don’t run the Configuration Wizard
  3. Install SP1 (if you need to i.e. your install source didn’t have it built-in), and then the latest Cumulative Update

Base setup of up the Sharepoint Farm

This is where things get interesting. We are going to use the new PowerPivot Configuration tool to do this for us. The beauty of it is it will setup a bare minimum Sharepoint farm. Nice and lean, so it will run quicker which is important for demos. I find the Microsoft supplied VMs HUGE (75Gb) and slow. Check here for my guide on how to convert one from Hyper-V to VMWare.

  1. Start the PowerPivot Configuration Tool from the SQL Server 2012 Program Group

  2. Pick the first option as shown – there will be no choice on an unconfigured farm anyway

  3. The tool will perform some checks and then present you with a list of tasks. Fill in the first screen with settings to match your setup, then click Validate. You’ll see this:

    At this point you could press Run and have it perform all those activities. However, whats great about this setup compared to the SQL 2008 R2 is that we can actually customise some of Service Application and associated database names to remove the dreaded GUIDs that get appended to them. You can also control some of the IIS setting such as Web Application name and App Pool. These are the tasks I suggest click on to customise:

  • Create PowerPivot Service Application
  • Create Default Web Application
  • Deploy Web Application
  • Create Site Collection
  • Create Unattended Account for DataRefresh
  1. When you’ve finished customising you’ll notice it informs you where you’ve made changes to the tasks. You can click the Script tab to view the PowerShell commands that will be executed. This is great to learn from and also to save away for a future scripted setup. I can see this being useful to tweak for a proper production setup. Beware: you need to select the topmost task to get the whole script showing up. This means if you are looking to find the PowerShell commands for just a select task/task group, you can click the appropriate section.

  2. Click Validate, and if successful, click Run. This will take a bit of time… If all goes well you will see this:

    And you can verify in IIS that the sites were setup:

  3. Navigate to our new SharePoint site. I usually at this point remember to turn off Internet Explorer Enhanced Security, and I add the Sharepoint Site to the trusted sites. Makes things easier!
  4. So now our site should work and if you browse to it you should see the vanilla Sharepoint page configured with a PowerPivot Gallery. I wont include a screenshot. There are two more components left to configure for a basic BI setup. SSRS/Power View and then PeformancePoint.

Enabling SharePoint Enterprise Features and Services

Before we try to setup these other BI services it’s a good idea to turn on the Enterprise features for the Site Collection and Site.

  1. In SharePoint go to Site Settings:

  1. Then manage the Site Collection Features:

Make sure the following are activated (Many will already be active, but ive stated all for completeness):

  • PerformancePont Services Site Collection Features
  • Power View Integration Feature
  • PowerPivot Feature Integration for Site Collections
  • SharePoint Server Enterprise Site Collection features
  1. Next we have to set enable some features at the Site level. So go back to Site Settings as in Step 1 above. This time select Manage Site Features:

    Make sure the following are active:

  • PerformancePont Services Site Features
  • SharePoint Server Enterprise Site features
  • SharePoint Server Publishing

Note we don’t turn on the Report Server File Sync because that is only required for SSRS 2008 R2 to synch back to the SSRS catalogue. In SQL 2012 SSRS is now a proper Sharepoint Service Application – something that was done to address performance problems in Sharepoint integrated mode.

Configuring SSRS Integration and Power View

This part tripped me up the first time. I thought I had everything working but SSRS and reports simply wouldn’t work! After some research, trial and error I understood all the components and config required to get it to work. The main problem is that with the steps we’ve taken so far, the SSRS Service itself (new in SQL 2012) and its proxy are not actually setup in Sharepoint yet.

A couple of quick PowerShell commands I found on the MSDN SSRS Integration Configuration Guide helped here, in the section entitled “Install and Start the Reporting Services SharePoint Service”. The note there explains why we don’t have SSRS services configured – we installed SQL first so there was no farm for it to configure SSRS on.

  1. Run the Sharepoint PowerShell as an admin:

  1. Run some PowerShell commands to install the service installed, add the proxy and then start the service:
    1. Install-SPRSService
    2. Install-SPRSServiceProxy 
    3. get-spserviceinstance -all |where {$_.TypeName -like "SQL Server Reporting*"} | Start-SPServiceInstance 
  2. Next we can create a SSRS Service Application from Central Admin

    Heres where we select the one we want:

    The settings ive used are highlighted (first page):

    Then scrolling down:

    This should get you to the Success screen shown below – Click the highlighted link.

    This will take us to the page below where the SSRS service account is given access the SQL Agent. Note the credentials below are sent to the SQL server.. so using the “sa” account will work here too. Note that you can create subscription and alerts if the SQL Agent service is not running – so turn it on if you want to demo this feature.

  3. How to test this? Make sure you have Silverlight installed and then upload a PowerPivot workbook into the PowerPivot Gallery. The Gallery has a link automatically if Silverlight isnt present. You will see a new “Create a PowerPivot Report” option in the gallery:

Clicking that will open up the Power View designer:

Configuring PerformancePoint Services

This part is much easier!

  1. Verify the PerformancePoint Service is running. In Central Admin you need to go to “Manage Services on Server” (shown below) , and once in there just Start the PerformancePoint Service if it isn’t running.

  2. Next we need to add the PerformancePoint Service Application. So in Central Admin once again we go to the Manage Service Applications page as we did with the SSRS service.

  1. Configure the service similar to how we did SSRS, shown below:

and continuing:

If all goes well you should see this:

  1. Next we need to configure the Unattended Service Account – its not absolutely necessary but a good idea to get done now. It all depends on how you plan to access your data sources – Unattended gives you the highest level of caching in PPS and the data source. So go back Manage Service Applications in Central Admin, and click on the newly provisioned service:

Once there, you need to change the app settings:

  1. We only need to set the account, the other settings on the page can be left at their defaults

Client Tools

Since we haven’t used the Business Intelligence Centre site template there will be no shortcut button to get to Dashboard designer. This can be reached via the following URL, which you can add to the site menu, a page or even customise via Sharepoint Designer:

http://<siteURL >/_layouts/ppswebparts/designerredirect.aspx

Just a few things left now to make this complete. You will need to install:

  1. Excel 2010
    1. PowerPivot 2012 RTM
    2. Data Mining Addins
  2. Visio 2010
  3. PowerPoint 2010 (to show export capability from Power View)
  4. You need to install the Desktop Experience feature on the server in order for the Publish to Sharepoint feature of Excel 2010 to work. If you don’t, you wont be able to browse the Sharepoint site from Excel at all.

Converting the Microsoft Integrated SQL 2012 Demo from Hyper-V to VMWare Workstation

April 14, 2012

Today I decided to get to a long overdue task – looking at Microsoft latest all up BI demo VM containing SharePoint 2010 and SQL 2012 RC0 which includes Power View. Now we know SQL 2012 went GA last week, but this demo was released a couple of months ago so has RC0 which was close to the RTM version anyway. On you will find the download, its called “New SQL Server 2012-RC0 fully integrated Demo”.

Before you download from there beware that the download is split into many rar files and if you prefer a single download I suggest you go here instead. Be warned, the file is about 28.4Gb, so you will need a stable internet connection and are advised to use software that can resume downloads just in case the connection breaks. This will extract to about 65Gb, so have enough disk space on hand. You will need even more to get to the final result we are looking for.

Now, one problem you may face is that the demo is a Hyper-V image, which means unless you have a Windows Server 2008 environment available, you cant run it. I use VMWare Workstation for all my VM work for the demos and presentations I do. So I needed a way to convert this. Warning: converting it will cause Windows and Office on the image to be non-activated. I used my own TechNet keys to re-activate after conversion.

There are many resources online telling you how to perform the conversion. However I found I had to hunt around and collate information from a few sources to get it right. There are also a few traps that are not so fun. So, my aim was to save others trouble and have it all in one place. Warning: Back up your extracted VM first before following any steps below!

There are 2 ways I found to convert the image over to VMWare, kindly blogged by Jim Holmes (Twitter: @aJimHolmes)

  1. Create a Windows Virtual PC and then convert using VMWare VCenter Converter
  2. Convert the .vhd disk to a VMware compatible .vmdk and then create a native VMWare image attaching that disk instead

Option 2 needs the Professional version of WinImage, so I opted to go with Option 1 instead, which I admit is longer, but a good learning experience and will save you having to buy WinImage or similar. If anyone knows of a free tool to do this a comment would be great!

Step 1 – Try to create a Virtual PC

So, following option 1, I tried to create the VPC using the downloaded VHD but I got an error.

Some research led me to discover that this is because the VHD is too big – the limit for Virtual PC appears to be 127Gb, but the disk size in the demo is 250Gb. I found this out by simply mounting in in Windows 7 use the Disk Management are of the Computer Management console


And here it is:

I’d like to clear up potential confusion here – the “SQL2012-RC0-ImageX.vhd” file is 75Gb, but it’s a Dynamic Disk so this represents its physical size whereas the 250Gb is its logical size. Dynamic Disks are useful as they don’t pre-allocate space beforehand. On the other hand performance is affected a little.

So I needed a way to shrink this disk.


Step 2 – Shrink the VHD so that it is not too big for Windows Virtual PC

This can be done easily using VHD Resizer. However the problem is you cant shrink this disk because the partitions within it are occupying the whole disk. So first we need to shrink the partition represented by drive letter J in the above diagram. Any partition management tool will do the job, but you are need to defragment it first so you can get to the smallest possible size. This is because you cant make partition smaller than the furthest bit of data stored on it. I used O&O Defrag to do both at once, and chose to shrink the partition to 90Gb to leave some free space (15Gb). Heres the result:


Once this was done I was able to use VHD Resizer to shrink the disk. I detached it form the Computer Management console first. Note in the image below I picked a separate drive as the destination copy on purpose. This will be significantly faster than creating the new vhd on the same physical drive on your PC. On my system I achieved about 90Mb/s which still meant waiting 15 minutes.


Step 3 – Create VPC, then convert to a VMWare workstation image

Now that the vhd is resized we can create the Virtual PC and it wont give us the error we got in Step 1. Windows virtual PC will create 2 files for the new VM. Firstly, a .vmcx file which sits by default in C:\Users\<your_windows_user_name>\Virtual Machines. However, when you specify the location of the VM during creation it actually also creates a .vmc file in that location and this is the file that we will work with.

We are going to use VMWare Vcenter Converter. Once installed follow this post to convert the Virtual PC image to a VMWare image. There is one problem though, you will get this error:


The comment at the end of the blog post guided me as to what was wrong, and it took me a while to find that post in the first place. There are a lot of irrelevant links on the Web for that Vcenter Converter error that can lead you on a wild goose chase. The fix for this is to open the .vmc file in a text editor (I use NotePad++) and change the <relative> node details to be a full physical path to the vhd.




Now VCenter converter will have no problems reading the file and will happily convert to your chosen VMWare format, including converting the disk to a .vmdk.

I converted it to a VMWare workstation 7 image and it worked fine! That’s it!

WMWare workstation – copying, snapshots, cloning

February 4, 2011

A lot of people these days use Virtual Machines for testing and development due to their flexibility and versatility.

I make heavy use of them to host demos and also to have an instance of various environments at hand. For example, i have a the following VMs:

  • Windows XP
  • Windows Server 2003/SQL 2005/Sharepoint 2007/PPS07
  • Windows Server 2003 R2/SQL 2008
  • Windows Server 2008 R2/SQL 2008R2/Sharepoint 2010
  • Windows Server 2008R2/Denali

Sometime when building an image i like to keep a complete “snapshot” backed up at various points so i can revert to it if need be. I also want to use the “snapshot” as a base for future work. For example, once i have Windows server 2008 R2 installed i could store that away so that next time i have this ready to go to build a different VM.

I say “snapshot” in quotes here because i did not use the Snapshot feauture of VMware workstation. This lets you keep a single physical copy of a VM with snapshots stored as part of the whole VM defnition. Note many native VMware snapshots on a VM can degrade performance over time due to the differential nature of the storage after snapshotting. Anyway, I specifically want a separate image that i can pick up and at any time and work with independently.

So, in order to satisfy my requirement i would simply copy my VM folder to a backup location after each signficiant point of development. All good? Not really! One day i had some corruption in a VM and needed to revert to a previous copy. I booted it up only to find it was behaving strangely and wasnt the copy i expected it to be. I thought somehow it had gotten corrupt/confused as well.

After a few days i looked at the VM settings and figured it out. When you copy a VM it still points to the virtual hard disk at the original locations! So my pristine backup was botting off the corrupted virtual disk! There are two ways out of this.

  1. Reconfigure the backup VM to point to the virtual hard drive in its own folder
  2. The preferred method – to avoid this situation in the first place – dont simply copy the VM to back it up. Use the Clone option in Workstation and it will make a proper independent copy. You can also use this to rename a Virtual Machine safely.

This may seem like a trivial and newbie mistake – it probably is. But hey, if it took me years to run into this situation perhaps this info will hep someone else!