Showing posts with label Prashant Bansal. Show all posts
Showing posts with label Prashant Bansal. Show all posts

Wednesday, November 2, 2016

Executing Direct SQL Queries on SharePoint Content Databases: Is it a good idea???

This article is based on the findings and lessons learnt during one of my recent assignments which included the development of an Analysis Tool which can gather all Vitals out of a SharePoint Farm which can be further leveraged to take decisions during the migration at some later stage.

While deciding the direct execution of SQL Queries on SharePoint Databases, you should consider the following questions and plan accordingly-

What could be the possible repercussions if we execute direct SQL queries on Content Database?

  • Reading from the SharePoint databases programmatically, or manually, can cause unexpected locking within Microsoft SQL Server which can adversely affect performance.
  • Any read operations against the SharePoint databases that originate from queries, scripts, .dll files (and so on) that are not provided by the Microsoft SharePoint Development Team or by Microsoft SharePoint Support will be considered unsupported if they are identified as a barrier to the resolution of a Microsoft support engagement.
  • If unsupported read operations are identified as a barrier to the resolution of support engagement, the database will be considered to be in an unsupported state.
  • To return the database to a supported state, all unsupported read activities must stop.

What are unsupported operations on SharePoint Content Databases?

It is clearly unsupported to update, delete, or insert records. The risks are surely far more obvious. Also be aware that any database changes would definitely break the supportability as stated by Microsoft. Examples of such database changes include, but are not limited to the following:

  • Adding database triggers
  • Adding new indexes or changing existing indexes within tables
  • Adding, changing, or deleting any primary or foreign key relationships
  • Changing or deleting existing stored procedures
  • Calling existing stored procedures directly, except as described in the SharePoint Protocols documentation
  • Adding new stored procedures
  • Adding, changing, or deleting any data in any table of any of the databases for the products
  • Adding, changing, or deleting any columns in any table of any of the databases for the products
  • Making any modification to the database schema
  • Adding tables to any of the databases for the products
  • Changing the database collation
  • Running DBCC_CHECKDB WITH REPAIR_ALLOW_DATA_LOSS (However, running DBCC_CHECKDB WITH REPAIR_FAST and REPAIR_REBUILD is supported, as these commands only update the indexes of the associated database.)
  • Enabling SQL Server change data capture (CDC)
  • Enabling SQL Server transactional replication
  • Enabling SQL Server merge replication

What are supported operations on SharePoint Databases?

  • Operations that are initiated from the SharePoint administrative user interface
  • SharePoint specific tools and utilities that are provided directly by Microsoft (for example, Ststadm.exe)
  • Changes that are made programmatically through the SharePoint Object Model and that are in compliance with the SharePoint SDK documentation

What happen if unsupported data modification is discovered?

If an unsupported database modification is discovered during a support call, the customer must perform one of the following procedures at a minimum:

  • Perform a database restoration from the last known good backup that did not include the database modifications
  • Roll back all the database modifications

What if previous version of the database that does not include the unsupported modifications is unavailable or if the customer cannot roll back the database modifications?

  • The customer must recover the data manually.
  • The database must be restored to an unmodified state before Microsoft SharePoint Support can provide any data migration assistance.
  • If it is determined that a database change is necessary, a support case should be opened to determine whether a product defect exists and should be addressed.

What can be done if still the content database needs to be queried directly for some reason?

Never run the direct SQL queries on Content Database in Production Environment

Take Following steps:

  • Restore the Database backup from Production to Development Environment
  • Take Database Offline
  • Run SQL Queries with [NOLOCK] option

Before running the above steps make sure the database is not in intermediate stage [nothing is checked out] else can get different document count then actual.

Key Takeaways: Based on the facts exposed by Microsoft Documentation on Direct Query Execution on Content Databases the key takeaways are:

  • This is completely unsupported by the EULA you agreed to when you installed SharePoint.
  • Your queries are not guaranteed to work after applying any patches or service packs to SharePoint since Microsoft could change the database schema anytime.
  • Directly querying the database can place extra load on a server and hence performance issues.
  • Direct SELECT statements against the database take shared read locks at the default transaction level so your custom queries might cause deadlocks and hence stability issues.
  • Your custom queries might lead to incorrect data being retrieved.

by Prashant Bansal via Everyone's Blog Posts - SharePoint Community

Friday, September 16, 2016

SharePoint 2013: How to Configure Data Connection with SQL Server using Excel PowerPivot Plugin

As promised in my previous article on SharePoint 2013 : How to enable PowerPivot Excel Plugin for Excel 2013 I am here with a new article that shows a demonstration on leveraging Excel PowerPivot Plugin in order to prepare the reports consuming data from SQL Server.

  • Launch Excel 2013
  • Select Blank Workbook

1

  • Select POWERPIVOT Tab
  • Select Manage

2

  • Click on “Get External Data” Dropdown Ribbon Button

3

There we can see all the Data Sources that can be used to connect with

  • Select “From Database” to setup a connection with SQL Server

4

  • Select SQL Server Instance Name

Wait for further processing

5

  • Select the Database Name

6

  • Test the connection
  • If the connection Succeed, Click Next

7

In the next Step you can choose either of the two options

  • Select Tables or View from the Look List
  • Write down your own Query to execute directly and fetch the result set in the form of table

Though as a part of good practice it would always be a good idea to proceed with option 1 as we are going to do it here after

  • Select Option 1 as shown below:

8

  • Select the required Tables from the Look up Window to participate in the read operation
  • Then Click Finish

9

  • If all goes fine we can see the Success Screen
  • Click Close Button

10

 

And we can get the selected Tables exported to the Excel, presenting data to be consumed as needed then after.

11

  • Now Choose “PivotTable” from “PivotTable” Dropdown Ribbon Menu

12

Provide the Data Range to be consumed by Pivot Table

13

And sure enough you will see the Pivot Table with Fields available for the selection

We can include different Operations as needed afterwards

14

For instance we can provide Data Slicers to the Users to allow them getting filtered Views of the data as needed

  • In order to Add Slicer, click on Analyze Tab
  • Then Click Insert Slicer

15

  • Choose a relevant Filter Parameter or Slicer based on which you like to allow Users to Filter the data.

Here we are choosing “StateProvinceName” as Slicer

16

  • Go to Slicer Settings to provide an appropriate name to the Slicer
  • Right Click on Slicer
  • Select Slicer Settings from the Context Menu

17

  • Specify the Caption for the Slicer

18

  • Once this is all done we would be having a fully functional PowerPivot Report to be published for the Users
  • Go To File Menu
  • Select Save As
  • Click on Browse Button

19

  • Specify the Url of Document Library where you want to Publish this file

20

  • Browse the Document Library
  • Specify the Name of the File to be Published

And Save it

21

  • Browse the Document Library from the Browser and see if the file is published properly

22

  • Click on the Report and let it run in Browser

And sure enough we will see the List of Cities with a “State Province Name” Filter (Slicer) in action.

23

This is no code implementation of quite an effective Reporting Solution backed up by rich PowerPivot Functionality.

Hope you find it helpful.


by Prashant Bansal via Everyone's Blog Posts - SharePoint Community

Tuesday, September 13, 2016

SharePoint 2013 : How to enable PowerPivot Excel Plugin for Excel 2013

While working with SharePoint 2013 BI Stuff you must have come across an essential component called “PowerPivot Reports”.

On the same lines it is worth to know about an Excel Plugin called “PowerPivot Excel Plugin” that further complements the designing of PowerPivot Style Reports using diversified range of Data Sources.

In this article we will see how can we enable “PowerPivot Excel Plugin” for Excel 2013 and in subsequent articles we will also see how to leverage this Plugin while designing reports based on different data sources like SSAS Cube, SQL Server and so on.

  • Launch Excel 2013
  • Select Blank Workbook

1

  • Select Options

2

  • Select Add-Ins
  • Select COM Add-Ins
  • Click in on the Go… Button to look up all the available plugins

3

  •  Out of the available plugins look for “Microsoft Office PowerPivot for Excel 2013” and Select it
  • Click OK

4 Once we have done with all the steps above, we can see a new Tab added to the Excel Client by the name “POWERPIVOT” 5 When you click on this Tab, you can see extended Functions offered by this Plugin. 6 We will revisit this Plugin again in one of my upcoming articles and see it in action. Hope you find it helpful.


by Prashant Bansal via Everyone's Blog Posts - SharePoint Community

SharePoint 2013 : How to enable PowerPivot Excel Plugin for Excel 2013

While working with SharePoint 2013 BI Stuff you must have come across an essential component called “PowerPivot Reports”.

On the same lines it is worth to know about an Excel Plugin called “PowerPivot Excel Plugin” that further complements the designing of PowerPivot Style Reports using diversified range of Data Sources.

In this article we will see how can we enable “PowerPivot Excel Plugin” for Excel 2013 and in subsequent articles we will also see how to leverage this Plugin while designing reports based on different data sources like SSAS Cube, SQL Server and so on.

  • Launch Excel 2013
  • Select Blank Workbook

1

  • Select Options

2

  • Select Add-Ins
  • Select COM Add-Ins
  • Click in on the Go… Button to look up all the available plugins

3

  •  Out of the available plugins look for “Microsoft Office PowerPivot for Excel 2013” and Select it
  • Click OK

4

Once we have done with all the steps above, we can see a new Tab added to the Excel Client by the name “POWERPIVOT”

5

When you click on this Tab, you can see extended Functions offered by this Plugin.

6

We will revisit this Plugin again in one of my upcoming articles and see it in action.

Hope you find it helpful.


by Prashant Bansal via Everyone's Blog Posts - SharePoint Community

Tuesday, August 30, 2016

SharePoint 2013 References

SharePoint 2013 Installation

  1. SharePoint 2013 Developer’s Installation Guide – LinkTech
  2. SharePoint 2013 Deployment Guide

SharePoint 2013 Architecture & Governance

  1. Microsoft SharePoint 2013: Designing and Architecting Solutions
  2. Microsoft SharePoint 2013: Planning for Adoption and Governance

SharePoint 2013 Development

  1. Beginning SharePoint 2013 Development
  2. Professional SharePoint 2013 Development
  3. SharePoint 2013 For Dummies
  4. Exploring Microsoft SharePoint 2013
  5. Microsoft SharePoint 2013 Developer Reference
  6. Microsoft SharePoint 2013 Inside Out
  7. Inside Microsoft SharePoint 2013
  8. Exam Ref 70-332: Advanced Solutions of Microsoft SharePoint Server 2013
  9. Exam Ref 70-331: Core Solutions of Microsoft SharePoint Server 2013
  10. QuickBooks 2013: The Missing Manual
  11. Custom SharePoint Solutions with HTML and JavaScript
  12. Microsoft SQL Server 2014 Business Intelligence Development
  13. Professional Visual Studio 2013
  14. QuickBooks 2013: The Missing Manual

SharePoint 2013 App Development

  1. Pro SharePoint 2013 App Development
  2. Microsoft SharePoint 2013 App Development

SharePoint 2013 PowerShell

  1. Beginning PowerShell for SharePoint 2013

SharePoint 2013 Business Intelligence

  1. Business Intelligence in Microsoft SharePoint 2013
  2. Pro SharePoint 2013 Business Intelligence Solutions

SharePoint 2013 Branding

  1. Pro SharePoint 2013 Branding and Responsive Web Development
  2. SharePoint 2013 Branding and User Interface Design

SharePoint 2013 Administration

  1. Professional SharePoint 2013 Administration
  2. Pro SharePoint 2013 Administration, 2nd Edition
  3. Microsoft SharePoint 2013 Disaster Recovery Guide
  4. Microsoft SharePoint 2013 Administration Inside Out

SharePoint 2013 Enterprise Content Management

  1. SharePoint 2013 WCM Advanced Cookbook
  2. Practical SharePoint 2013 Enterprise Content Management

SharePoint 2013 User Guides

  1. SharePoint 2013 User’s Guide, 4th Edition

by Prashant Bansal via Everyone's Blog Posts - SharePoint Community

Friday, August 19, 2016

SharePoint Developer Tools – Get Your Gears

There are quite a number of Must to Have developer tools that every SharePoint Developer must have in its arsenal in order to boost its own Productivity while developing solutions on SharePoint Platform.

Few of the tools which are my personal favorites also are listed below:

CAML Designer 2013

CAML Designer can generate the CAML Query Stubs based on the inputs provided by the developer and can quickly give a handle on even complex query formations.

It is not just about the Formation of Queries but also offers code Transition from actual CAML Query to

  • Corresponding Server Side Object Model Code
  • Corresponding Managed Client Side Object Model Code
  • Corresponding JSOM & REST API Calls
  • Corresponding PowerShell Code

1

Download Path: http://ift.tt/2b2dQ3c

SharePoint Manager 2013

SharePoint Manager has got quite a simple and intuitive interface which allows you to quickly and easily navigate down the farm and investigate settings, properties, schema XML and so on. Most of the things in your SharePoint environment can be investigated from this tool.

This tool allows you to quickly navigate the Site Hierarchy and objects, and you can also get a quick handle on Schema of List, Fields and on object properties like Object GUIDs, Object Titles and so on.

2

Download Path: http://spm.codeplex.com

ULS Viewer

ULS Viewer allows you to look into the SharePoint ULS Logs in real time by parsing the Logs. The information (Correlation ID, Date Time Stamp, Event Source Process and so on )exposed by this tool is really useful for productive debugging capabilities.

3

With the evolution of SharePoint 2013 Developer Dashboard also includes these capabilities of reading & parsing ULS logs. Developer Dashboard contains a separate tab by the name “ULS” where we can see the ULS log entries.

4

Download Path: http://ift.tt/1csnjx8

CKS Dev

CSK Dev is a Visual Studio extension which adds a bunch of new Project items for SharePoint Projects that are really helpful in increasing productivity of a developer.

Extension Project Items included

  • WCF Service SPI template
  • Contextual Web Part SPI template
  • Branding SPI Template
  • ASHX SPI template
  • Upgrade Solution Step
  • Restart IIS Step
  • Copy To SharePoint Root Step

And many more…

5

6

Download Path: http://ift.tt/1p8ikWX

Color Palette Tool for Branding

Color Palette allows you create a composed looks for SharePoint 2013.

7

Download Path: http://ift.tt/1m36p4A

SharePoint 2013 Search Tool

SharePoint Search Tool allows to you create and test SharePoint Search Keyword Query backed up by SharePoint REST API paradigm. It also allows you to analyze the Query Stats and adjust them as per the required output.

8

Download Path: http://ift.tt/IE9A7g

Fiddler

Fiddler is a Web Proxy that allows to Debug Web Traffic, do Performance Testing, HTTP/HTTPs Traffic Recording, Security Testing and so on.

The use of Fiddler becomes utmost necessary now with the evolution of SharePoint 2013 which is more focused on Development Strategies based on Client Side Scripting Technologies.

9

Download Path: http://ift.tt/16qm5xz

SPCAF – SharePoint Code Analysis Framework

SharePoint Code Analysis Framework helps to validate your custom SharePoint Solutions and Apps against Best Coding Practices prescribed the industry drawn by various industry standards.

This framework can be really helpful to let you verify if your custom solutions are Stable, Complying with Company Policies, Following Coding Best Practices, Well Designed and Maintainable and much more.

10

Download Path: http://www.spcaf.com

.NET Reflector from Red Gate

.Net Reflector is one of the best tools I have ever used for understanding code of Third Party DLLs for which I even did not had the Source Code.

Reflector allows you to look into the DLLs to see the code encapsulating inside it to understand its functioning.

11

Download Path: http://ift.tt/12wxubW

PowerShell Tools for Visual Studio

This is an excellent Visual Studio Extensions for PowerShell which enables code intellisence for PowerShell Scripts within Visual Studio Editor.

12

Download Path: http://ift.tt/NHBz81

SPFastDeploy

This tool is specially designed to enhance the productivity while working with SharePoint App.

This tool is best suited for pushing the code changes quickly to SharePoint Apps without re-deploying the Apps. This could save a significant amount of time during App Development.

13

Download Path: http://ift.tt/1m36lSG

Advanced REST Client plugin for Google Chrome

This is a Chrome Plugin that allows you configure and investigate REST Queries by configuring and executing REST API Call through the tool UI. It also allows us to look for the Stats of the REST Queries in execution.

14

Download Path: http://ift.tt/1bOPm60

Postman – REST Client plugin for Google Chrome

This is again a Chrome Plugin that allows you deal with REST Calls same as “Advanced REST Client plugin for Google Chrome”.

It is just a matter of choice which one you prefer to work with.

15

Download Path: http://ift.tt/11U4mfq

SharePoint 2013 Client Browser

This is the similar tool as SharePoint Manager with the only difference that it allows us to connect to SharePoint Sites Remotely using Client APIs. So now no more need to login to SharePoint Server to browser SharePoint Site Objects using this tool.

16

Download Path: http://ift.tt/1koyOqp

smtp4dev

This is an awesome tool for testing SharePoint Send Mail Functionalities no matter if it is Custom or OOB functionality that we are testing.

It is used to verify if the SharePoint is sending mails to the recipients properly. This tool intercepts the mails that were sending to the recipients by SharePoint and allows you to view them in its own UI.

17

Download Path: http://ift.tt/karzbi

PowerGUI

PowerGUI is one of the best tools available for PowerShell Programming. It provides intellisence support for writing PowerShell Scripts at the same time provides lot of useful windows for Debugging purposes.

18

Download Path: http://ift.tt/1g8jo5H

SharePoint Software Factory

The SharePoint Software Factory is a Visual Studio Extension helping SharePoint Beginners, as well as experienced developers to create, manage and deploy SharePoint solutions without having to know schema internals of the SharePoint Artifacts.

19

Following is the list of few of the features offered by this extension-

20

And many more…

For a detailed list of available features you can visit : http://ift.tt/2bkUioT

Download Path: http://ift.tt/2b2dnhK

SharePoint Solution Deployer

SharePoint Solution Deployer helps you to deploy SharePoint solution packages (.wsp) to multiple SharePoint environments. It deploys, retracts and upgrades one or more WSPs and can be extended to perform additional custom tasks in PowerShell before or afterwards.

It provides a simple XML configuration file which allows you to define the deployment environment by using variables i.e. to perform different actions on different URLs depending to which farm you are currently deploying.

21

Download Path: http://ift.tt/2bkTP6a

SharePoint Diagnostic Studio 2010

Microsoft SharePoint Diagnostic Studio 2010 (SPDiag version 3.0) was created to simplify and standardize troubleshooting of Microsoft SharePoint 2010 Products, and to provide a unified view of collected data.

This tool can be used for-

  • Gathering relevant information from a farm
  • Displaying the results in a meaningful way
  • Identifying performance issues
  • Sharing or exporting the collected data
  • Providing reports for analysis

And much more…

22

Download Path: http://ift.tt/2b2eMEP

SPServices

SPServices is a jQuery library which abstracts SharePoint’s Web Services and makes them easier to use. It also includes functions which use the various Web Service operations to provide more useful (and cool) capabilities. It works entirely client side and requires no server install.

23

Download Path: http://ift.tt/xMStCG

SharePoint LogViewer

SharePoint Log Viewer is a Windows application for reading and filtering Microsoft SharePoint ULS Logs.

It offers the following key features-

  • View multiple SharePoint log files at once
  • Search by any field
  • Filter the log by any field
  • File drag & drop support
  • Live monitoring for entire farm
  • Export filtered log entries
  • Bookmark log entries
  • Get popup notification of SharePoint log events from system tray
  • Receive email notifications on errors
  • Redirect log entries to event log
  • Supports SharePoint 2007, 2010 and 2013

24

Download Path: http://ift.tt/zWNEdr

FxCop

FxCop is an application that analyzes managed code assemblies (code that targets the .NET Framework common language runtime) and reports information about the assemblies, such as possible design, localization, performance, and security improvements. Many of the issues concern violations of the programming and design rules set forth in the Design Guidelines, which are the Microsoft guidelines for writing robust and easily maintainable code by using the .NET Framework.

25

Download Path: http://ift.tt/1KMcfnU

JavaScript Beautifier

This online tool is used to beautify, unpack or De-obfuscate JavaScript and HTML, make JSON/JSONP readable, etc.

26

Download Path: http://ift.tt/elBwK2

JSON Formatter & Validator

This is an online tool to that can be used to validate the JSON Packets

27

28

Download Path: http://ift.tt/1Ji3WCB

Being a SharePoint Developer I can say using these tools should be the second habit for SharePoint Developers to enhance their development capabilities which results in quick delivery turn around.

Hope you all find it helpful.


by Prashant Bansal via Everyone's Blog Posts - SharePoint Community