Tuesday, June 7, 2016



When you install the SharePoint BI stack, you need to create a PowerPivot Service application that will manage the PowerPivot workbooks via a very nice dashboard which unfortunately was empty in my Central Admin. no error, nothing in the ULS, just an empty page.
To fix that, I activated the PowerPivot Administration feature in Central Administration :
That it!!
Hope this help,
Oumaima Achkari

Thursday, June 2, 2016

Advantages and disadvantages of separate content database on site collection level

Advantages and disadvantages of separate content database on site collection level


what are the advantages of having a unique content database per sharepoint sites collection? How about disadvantages? How will it impact the server's performance?

This article will answer all these questions, here we go :)

Here are 3 reasons to separating site collection into different content databases:
  1. One or more of the site collections is close to 200GB and will grow to beyond that size. Separating it will make you life simpler for backups and restores and future upgrades to the next version of SharePoint.
    Also if you need to restore data from one site collection and it happens to be in its own content database you can restore it without affecting your other sites.
  2. To separate like content into their own content databases, ie keep MySite personal sites in a different content db from Team sites.
  3. To separate content for legal / business reasons. You probably do not want to have all the legal sites in the same db.

Disadvantages  - if you were going to put all your site collections into their own content database (30) and you then need to create a new site collection, and you want that in its own DB too, you would need to first take all the existing dbs offline (users can still access the the db read/write) and set the create new db on site collection count limit to one, before you create the new site collection. (I had publish a topic about this stuff :http://oumaimasharepoint.blogspot.com/2016/06/unique-content-database-per-sharepoint.html)

If you create a site collection using the GUI, you cannot select the Content Database that the site collection gets created in.
This is why you have to take them "offline". Offline doesn't mean they are not accessible, but there cannot be created any more site collections in this Content database.
Another way to do it without having to take offline all other content databases is by using PowerShell.
To create a site collection using PowerShell, you can use the "New-SPSite" Cmdlet.
To create a site collection using PowerShell in a specific Content Database, it would be something like this:
New-SPSite -Url Http://yoururl.com/sites/newsitecollection -OwnerAlias "domain\sitecollectionadmin" -ContentDatabase "Name of ContentDatabase" -Name "My New Site Collection" -Description "Optional description" -Language "1033 (for english, optional)"

Hope this help,

Unique Content Database per SharePoint Site Collection

Unique Content Database per SharePoint Site Collection

It’s a question that comes up in every deployment of SharePoint: Should I have many site collections or one site collection with many sub sites?  My definitive answer: “It depends”.  
This post isn’t to address that however.  Let’s assume you decided on many site collections.  Which will bring you to another question you’ll ask yourself.  Should I have one content database for all of the site collections, or one content database for each site collection?  My definitive answer: “It depends”.
This post isn’t to address that either.  Let’s assume that you decided on one content database per site collection.  Or, let’s assume that you are going to create a new site collection and you want it to have its own content database.  Now that, we are going to address.
So how to in SharePoint?  Well, it’s not exactly intuitive, but none-the-less we can do it.

In Central Administration, you need to examine the current Content Database situation for your application.  Browse to content databases at: Central Administration > Application Management > SharePoint Web Application Management
In our example, we only have one Content Database (WSS_Content_Clients) with 1 site collection in it.
First, let’s create a new content database.  So, click on ‘Add a content database’ and go through the steps.  I recommend naming the content database the name of the site collection.  In our example, I called it WSS_Content_NEWSITECOLLECTION.
Now if we look at our content databases for our web application, you’ll see that we have two.  And WSS_Content_NEWSITECOLLECTION has zero site collections in it.
So what will happen if we create a new site collection in this Web Application?  When creating a new site collection in Central Admin there isn’t a means to select which content database to use.  Or is there?… Umm hmm.
Edit WSS_Content_Clients database (the database you don’t want to have the new site collection), and set it’s status to ‘Offline’.  Don’t worry, the database isn’t offline in typical sense.  It just means that new site collections can’t be created in it.  (This is just a bad name all together, but oh well).
Now if we look at our content databases, we’ll see that only our WSS_Content_NEWSITECOLLECTION is available for new site collections.
You’re all set now.  Go and create yourself a new site collection, and it will automatically create itself in our new content database, WSS_Content_NEWSITECOLLECTION.  Afterwards, you can stop it by setting it to offline as well to prevent other site collections being created in it.
There are other ways to achieve what we just did, but this one works for me.  Old habits are hard to break I guess.
Now, the next question that you’ll most likely end up asking is: How on earth am I going to figure out which site collection goes with what content database from a management standpoint?  Naming conventions don’t carry us but so far do they?
No worries there either, head over to your list of site collections for you application at: 
Central Administration > Application Management > Site Collection List
Select the site collection, and it will tell you what Content Database it is using.

Optimising bulk inserts with Entity Framework 6

Optimising bulk inserts with Entity Framework 6 In Entity Framework 6+ the database context implements the  unit of work  pattern so th...