Friday, November 2, 2012

Sharepoint 2010 SSRS Implementation


The procedure contains 8 parts:

1.      SQL2008 R2 SSRS for 2010 Add-in is already installed. (As a pre-requisite), if not , manually install the Add-in to the Application Server and manually activate the features. (Backup the web.config file for your Central Administration before installation).

2.      Install the Add-in to all the WEB FRONT ENDS. Manually deploy installation without activating the features.

3.      Join the Reporting Server to the SharePoint Farm and deploy the Add-in as explained on step2.

 

A.    SSRS Configuration {SQL Server}

B.     Web application {SharePoint}

C.     Site collection {SharePoint}

D.    SSRS integration {SharePoint}

E.     Content types {SharePoint}

 

A. SSRS Configuration {SQL Server}

  1. Log on to your SharePoint 2010 box.
  2. Fire up the SQL Server Reporting Services Configuration Manager.
  3. Connect to the Report Server instance. In my case this is the default SQL Server 2008 R2 instance (MSSQLSERVER)
  4. The first thing you will notice is the Report Server Status. Check the Report Server Mode. It should say Native (we start from native mode in this scenario).
  5. Click Database in the left pane. Click Change Database. Select create a new report server database.
    Enter the proper credentials.
  6. Enter a database name and select SharePoint Integrated mode.
  7. Enter the credentials and do not forget the <domain name>\<username> (.\<username> will do as well).
  8. Choose Report Manager URL in the left pane and click the apply button. This will configure the Report Manager virtual directory.
  9. Backup the encryption keys.

B. Web application {SharePoint}

  1. Open the SharePoint Central Administration website.
  2. Choose Application Management > Manage web applications.
  3. Click the New button in the ribbon. This will bring up the Create new web application popup.
  4. Keep the default values to keep things simple except for:
    1. Choose a name for the new IIS Website. I will choose SSRSDemo in this example.
    2. Choose a name for the application pool. I will again choose SSRSDemo.
    3. Make sure you connect to the right database instance. In my example I will connect to the named SQL Server 2008 Express Edition instance named SHAREPOINT.
    4. Choose a database name or keep the default value with the GUID suffix. I will call the database WSS_Content_SSRSDemo.
    5. Hold your horses before you hit the OK button when this information pops up:


5. Click Create Site Collection page to move on to C. Site collection {SharePoint}

 

C. Site collection {SharePoint}

  1. Enter a title for the site collection. SSRSDemo for example.
  2. Choose a template. I will choose Business Intelligence Center because I want to store my SSRS reports in a BI related environment.
  3. Enter a username for Primary Collection Administrator. Make sure you enter the full domain name. e.g.: <domain name>\<username> (.\username won't work here).

D. SSRS integration {SharePoint}

 

  1. Go to the SharePoint Central Administration website > General Application Settings > Reporting Services > Reporting Services Integration.
  2. Enter the Report Server Web Service URL which you can find the SQL Server Reporting Services Configuration Manager.
  3. Choose the Authentication Mode. Windows Authentication. Entering.\<username> will do.  ( we used TRUSTED ACCOUNT)
  4. Go to the SharePoint Central Administration website > General Application Settings > Reporting Services > Add a Report Server to the Integration.
  5. The server name should already be provided and enter the name of the SQL Server instance which hosts the report server database.
  6. Enter the credentials.

 

E. Upload a report {SharePoint}

  1. Open your new top level web site we created in C. Site collection {SharePoint}
  2. In case you forgot the URL of the web site, go to SharePoint Central Administration > Web Application and look for the URL.
  3. Go to All site Content > Documents.
  4. In the ribbon, go to Library Tools > Library.
  5. Click Library Settings.
  6. Click Advanced Settings.
  7. In Content Types, check Yes for Allow Management of content types and click OK.
  8. In the columns section, click Add from existing site columns.
  9. In the Select site columns from drop-down box, select Report Server Content Types.
  10. Select all available site content types and click the Add button followed by OK.
  11. Go back to All site content > Documents.
  12. Click the Add Document link.
  13. Enter a title for the report.

There is also the option to create a report yourself if you don't have the reports from the sample reports. It only takes a few seconds to create a report using the Report Builder (see screenshot below).
 
 


Click the report you have uploaded to view the result.

 

Report Builder program will download automatically if not installed and it will integrate with the browser and SharePoint.

Fie Storage Solutions for SharePoint 2010


Remote Blob Storage (RBS) allows you to work with large files in SharePoint by placing them on an external source of storage, completely transparent to the end-user. For example, you can configure a RBS to store all files greater than 100mb on an external drive or a network share folder.  In this way the method that currently is used in the portal for uploading “example: drivers, etc.” remains the same, no other user intervention required.

To setup the remote blob storage for SharePoint, requires a SQL Administrator. Since the heart of the implementation and configuration must happen on SQL. Very few configuration steps are taken in SharePoint CA, beside the usual file limitation settings and file types.

What are the drawbacks of Remote BLOB Storage?

·         One of the major side effects of RBS is that you cannot use database mirroring when RBS is enabled. Clustering and log shipping are still supported, but if we currently use or plan to use mirroring then RBS is probably not an approach to consider.

·         We should be aware that individual RBS providers may or may not support native SQL backups. Fortunately, SharePoint backups, however, will include any files stored in BLOB storage regardless of whether the RBS provider supports native SQL backups.

·         We should also be very wary of the fact that data is being stored in a location outside of the database and any implications that may have for security and reliability.

·         Another issue we may encounter is that BLOB retrieval performance may be negatively impacted if you move the BLOB store to a slower hard drive. This can also be true if the BLOB store is hosted on a networked location where bandwidth is limited or latency is an issue. On the other hand, BLOB retrieval performance may improve if the hard drive you place it on is faster than the SQL drive. The recommended solution for our environment is to have the location be on the same WFE server in the “data drive” so that it gets backup and replicated automatically.

·         It is also worth noting that RBS is enabled at the content database level, not the site collection level. This means that if you have multiple site collections in a content database, enabling RBS on that content database enables RBS on all of those site collections. If this is not the desired behavior, then we may need to move site collections to other content databases.

·         Finally, Microsoft has stated that it is not guaranteeing that RBS will seamlessly migrate to the next version of SharePoint.  You can always "undo" RBS and pull everything back into the database.

·         Remote BLOB storage will not get around the 2 gigabyte limit for files in SharePoint.

What are the benefits of Remote BLOB Storage?

·         Database size is reduced. Having a smaller database can be extremely beneficial if you are running out of disk space on your SQL server and don't have the ability to add additional disks.

·         Prolongs use of SQL Express. If you are using SQL Express in your SharePoint environment but you are bumping up against the 4 gigabyte database size limit (10 gigabytes in R2) associated with the free edition of SQL Server, then you can use RBS to offload data from the database. Since the data is not in directly in the database it does not count against the size quota.

·         Cheaper file storage. Database hard drives tend to be fast and expensive, so archiving a large number of files that are rarely accessed on those disks is not always the best use of fiscal resources. In as much as RBS allows you to move BLOB storage to fast hard drives and see a performance benefit, you can also move them to slower, cheaper hard drives for a budgetary boost when performance is not as much of a concern.

·         Database backup time reduced.  As database size increases, so does the time to back up the database. If you have a specific maintenance window in which the backup has to occur, the database can grow so large that it becomes difficult or impossible to complete in that time frame.  By offloading the BLOB store, the database size is reduced and the database backup time can be reduced as well. You will still need to make a backup of the BLOB store, but that can be done using a separate parallel process.

·         Large BLOB performance benefits. Streaming data from a file stream can outperform streaming data directly from a database.  However, setting up SQL server for use of a remote file stream is an expensive process.  For small files (less than 60KB), it may not be beneficial to bother with a file stream at all. For larger files it can be very beneficial. Fortunately, RBS allows you to configure certain file size thresholds to store smaller files directly in the database and larger files using RBS, so they reside in a location where performance is optimal.

Network Share File Location.

File can be stored on a network share location. A network UNC path can be used to access these files. The folder permission for this location would have rights for the appropriate Users to download the file. However, the SharePoint upload function is nonexistent; the user would have to manually store the file into the network share location.

A custom SharePoint List can be utilized to add “Title and Descriptions” of the files plus a hyperlink to download. However, this is totally outside the scope of SharePoint and does not benefit from a SharePoint backup, nor SharePoint Alerts or any other modifications that could happen in the network Share folder. The network Share folder location would have to remain with the same UNC path name and must be added to an alternative backup solution in the environment.

Sharepoint 2010 Claim Based Authentication with SQL Server as Provider

How to setup the Claim based Authentication with SQL Server as Provider. This is very straight forward. Below are high level tasks we need to do.

1) Setup you AspnetRoleMemberShip Provider

2) Create Claims Based Web Application.

3) Create Site Collection.

4) Configure Web.Config of below Sites

a) Central Administration’s Web.Config

b) Security Token Service’s Web.Config

c) Claim Based Application’s web.Config

Provide Access to User from User Policy in Central Administration.

Details steps are given Below

Setup the AspnetRoleMemberShip Provider database

  • Go to the SQL Server database server
  • On the database server, open Windows Explorer.
  • Navigate to the path %System Drive%\Windows\Microsoft.NET\Framework\v2.0.50727.
  • To start the ASP.NET SQL Server Setup Wizard, double-click aspnet_regsql.exe.
  • Complete the wizard
  • Make sure the Application Pool accounts of the web application(s) and the Central Administration web site have access to the database

Create a new web application with Claim Based Authentication

  • Sign in to Central Administration
  • Select Application Management from Left Menu
  • Click on Manage Web Applications
  • Click New Web Application
  • Select Claims Based Authentication
  • Identity Providers
    • Check the Enable Windows Authentication box
    • Check the Enable ASP.NET Membership and Role Provider checkbox
    • In the Membership provider name edit box, type MySqlMember
    • In the Role provider name edit box, type MySqlRole

 Create a new site collection

  • Again Select Application Management
  • Click Create site collections
  • Select the newly created web application
  • Fill in a name and select a template

Modify web.config of the Central Administration site

  • Open the Central Administration site's web.config file
  • Find the </configSections> entry
  • Paste the following XML directly below it.

Note: This is connection String of your SQL Server’s Aspnetdb


<connectionStrings>

<clear />

<add name="AspNetDb" connectionString="data source=PRAWAL01;Integrated Security=SSPI;

Initial Catalog=aspnetdb" providerName="System.Data.SqlClient" />

</connectionStrings>

 
Note: Replace {your database Server Name} with Database Name

 ·  Find the <system.web> entry

·  Paste the following XML directly below it



<roleManager enabled="true"

   cacheRolesInCookie="false"

   cookieName=".ASPXROLES"

   cookieTimeout="30"

   cookiePath="/"

   cookieRequireSSL="false"

   cookieSlidingExpiration="true"

   cookieProtection="All"

   defaultProvider="AspNetWindowsTokenRoleProvider"

   createPersistentCookie="false"

   maxCachedResults="25">

                     <providers>

                           <clear />

                           <add connectionStringName="AspNetDb"

applicationName="/" name="MySqlRole"

type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0,

Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

     <add applicationName="/"

      name="AspNetWindowsTokenRoleProvider"

 type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0.0,

Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

                     </providers>

              </roleManager>

              <membership defaultProvider="MySqlMember"

                 userIsOnlineTimeWindow="15" hashAlgorithmType="">

                     <providers>

                           <clear />

                           <add connectionStringName="AspNetDb"

enablePasswordRetrieval="false"

                 enablePasswordReset="true"

                 requiresQuestionAndAnswer="true"

                 passwordAttemptWindow="10"

                 applicationName="/"

                 requiresUniqueEmail="false"

                 passwordFormat="Hashed"

                 name="MySqlMember"

type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0,

Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

                     </providers>

              </membership>

 

Modify the web.config of the Security Token Service (STS) virtual directory

 ·  Open the Security Token Service (STS) virtual directory's web.config file location of this file is

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\WebServices\SecurityToken

 ·  Find the </system.net> entry

·  Paste the following XML directly below it



       <connectionStrings>

              <clear />

              <add name="AspNetDB" connectionString="data source=PRAWAL01;

Integrated Security=SSPI;Initial Catalog=aspnetdb" providerName="System.Data.SqlClient" />

       </connectionStrings>

 

·  Paste the following XML directly just above the entry </configuration>



<system.web>

              <membership>

                     <providers>

                           <add connectionStringName="AspNetDB" enablePasswordRetrieval="false" enablePasswordReset="true"

                           requiresQuestionAndAnswer="true" passwordAttemptWindow="10" applicationName="/" requiresUniqueEmail="false"  passwordFormat="Hashed" name="MySqlMember" 

                           type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0,Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

                     </providers>

              </membership>

              <roleManager enabled="true">

                     <providers>

                           <add connectionStringName="AspNetDB"

                           applicationName="/" name="MySqlRole" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

                     </providers>

              </roleManager>

       </system.web>

 

Modify web.config of the claims based web application

 ·  Connection string – Find the </configSections> entry

·  Paste the following XML directly below it



<connectionStrings>

              <clear />

   <add name="AspNetDB" connectionString="data source=PRAWAL01;

   Integrated Security=SSPI;Initial Catalog=aspnetdb"

   providerName="System.Data.SqlClient" />

</connectionStrings>

 

We need to Add Provider to <MemberShip> and <RoleManager>, So the best way is Replace <membership and <roleManager with below XML  (This is addition to Default which will be available, if you have more provider already configured, Just add more Provider).


  <membership defaultProvider="i" userIsOnlineTimeWindow="15" hashAlgorithmType="">

 <providers>

 <clear />

 <add connectionStringName="AspNetDB"

enablePasswordRetrieval="false"

enablePasswordReset="true"

requiresQuestionAndAnswer="true"

passwordAttemptWindow="10"

applicationName="/"

requiresUniqueEmail="false"

passwordFormat="Hashed"

name="MySqlMember"

type="System.Web.Security.SqlMembershipProvider,

System.Web, Version=2.0.0.0,

&#xD;&#xA;Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

                 <add name="i"

type="Microsoft.SharePoint.Administration.Claims.SPClaimsAuthMembershipProvider,

\&#xD;&#xA;Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral,

PublicKeyToken=71e9bce111e9429c" />

                </providers>

         </membership>

         <roleManager enabled="true"

cacheRolesInCookie="false"

cookieName=".ASPXROLES"

cookieTimeout="30"

cookiePath="/"

cookieRequireSSL="false"

cookieSlidingExpiration="true"

cookieProtection="All"

defaultProvider="c"

createPersistentCookie="false"

maxCachedResults="25">

                <providers>

                       <clear />

                       <add connectionStringName="AspNetDB"

applicationName="/"

name="AspNetSqlRoleProvider"

type="System.Web.Security.SqlRoleProvider,

System.Web, Version=2.0.0.0,Culture=neutral,

PublicKeyToken=b03f5f7f11d50a3a" />

                       <add applicationName="/"

name="MySqlRole"

type="System.Web.Security.WindowsTokenRoleProvider,

System.Web, Version=2.0.0.0,Culture=neutral,

PublicKeyToken=b03f5f7f11d50a3a" />

                       <add name="c"

type="Microsoft.SharePoint.Administration.Claims.SPClaimsAuthRoleProvider,

Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral,

PublicKeyToken=71e9bce111e9429c" />

                </providers>

         </roleManager>


That’s all to be done for Configuration. Next step is to provide access to users from SQL Server.

Adding User Policy via Central Administration

  • Open Central Administration
  • Navigate to Manage Application
  • Select the Claim Based Application from the List
  • Select User Policy from Top Ribbon.
  • Select Telephone Book ‘icon’
  • Select ‘All Zone’ and Click Next
  • Enter the Name is FIND text box
  • Hit Enter key
  • Select user from List and Provide Access Permission.

Now Open a new Browser window and Type http://<<url>> of your site collection of Claim based Web Application.
  • Select “forms Authentication”
  • Enter user name and password
So as per permission given “Full Control” (as Site Owner) in this case, site will allow user in.

 
Further to this, being a site admin you can add other users from SQL Database to this site’s Member, Owner, Viewer groups.