Wednesday, December 5, 2012

Back up customizations in SharePoint Server 2010


Customizations are of different kinds when it comes to SharePoint, below is small descriptions.

  • Customizations packaged as solutions (.wsp files). Solutions contain developed site elements, and are typically created by developers. Developed site elements include the following:
    • Web Parts
    • Workflows
    • Site and list definitions
    • Document converters
    • Event receivers
    • Timer jobs
    • Assemblies
  • Authored site elements, which are typically created by Web designers, are not explicitly compiled and reside in a content database. Authored site elements include the following:
    • Master pages
    • Cascading style sheets
    • Forms
    • Layout page

  • Changes to the Web.config file
  • Third-party solutions and their associated binary files and registry keys, such as IFilters
  • Changes to sites created by direct editing through the browser
  • Developed customizations that are not packaged as solutions
Each of these kinds of customizations requires a different type of backup.
In this article:
Ref: technet.microsoft.com

Tuesday, December 4, 2012

Stored Procedures in SQL Server.

A stored procedure is a group of Transact-SQL statements compiled into a single execution plan. SQL Stored procedures return data in four ways:
  • Output parameters, which can return either data (such as an integer or character value) or a cursor variable (cursors are result sets that can be retrieved one row at a time).
  • Return codes, which are always an integer value.
  • A result set for each SELECT statement contained in the stored procedure or any other stored procedures called by the stored procedure.
  • A global cursor that can be referenced outside the stored procedure
Why to use stored procedures in SQL server:
  • Execution plan retention and reuse
  • Query auto-parameterization
  • Encapsulation of business rules and policies
  • Application modularization
  • Sharing of application logic between applications
  • Access to database objects that is both secure and uniform
  • Consistent, safe data modification
  • Network bandwidth conservation
  • Support for automatic execution at system start-up
  • Enhanced hardware and software capabilities
  • Improved security
  • Reduced development cost and increased reliability
  • Centralized security, administration, and maintenance for common routines
How to create Stored Procedure in SQL:
1.   In Object Explorer, connect to an instance of SQL Server Database Engine and then expand that instance.
2.   Expand Databases, expand the database in which the stored procedure belongs, and then expand Programmability.
3.   Right-click Stored Procedures and then click New Stored Procedure.
4.   On the Query menu, click Specify Values for Template Parameters.
5.   In the Specify Values for Template Parameters dialog box, the Value column contains suggested values for the parameters. Accept the values or replace them with new values, and then click OK.
6.   In the query editor, replace the SELECT statement with the statements for your procedure.
7.   To test the syntax, on the Query menu, click Parse.
8.   To create the stored procedure, on the Query menu, click Execute.
9.   To save the script, on the File menu, click Save. Accept the file name or replace it with a new name, and then click Save.
Example:
CREATE PROCEDURE spVendorByState
          @VendorState
varchar(50)AS
BEGIN

          -- SET NOCOUNT ON added to prevent extra result sets from
          -- interfering with SELECT statements.
          SET NOCOUNT ON;

          -- Insert statements for procedure here
          SELECT VendorId,VendorFName,VendorLName,VendorCity,VendorState,VendorCountry,PostedDate,
          VendorDescription
          FROM Vendor Where VendorState = @VendorState ORDER BY PostedDate
There are some different concepts of stored procedures.
  • A stored procedure is one or more SQL statements that have been compiled and stored with database. A stored procedure can be started by application code on the client.
  • Stored procedure can improve database performance because the SQL statements in each procedure are only compiled and optimized the first time they are executed. In contrast SQL statements that are sent from a client to the server have to be compiled and optimized every time there are executed.
  • In addition to SELECT statement, a stored procedure can contain other SQL statements such as INSERT, UPDATE, and DELETE. It also contains control-of-flow language.
  • A trigger is a special type of procedure that executes when rows are inserted, updated or deleted from table.
  • A user defined function (UDF) is a special type of procedure that can return a value or a table. 

Monday, December 3, 2012

Plan for disaster recovery (SharePoint Server 2010)

Disaster recovery overview
For the purposes of this article, we define disaster recovery as the ability to recover from a situation in which a data center that hosts SharePoint Server becomes unavailable.
The disaster recovery strategy that you use for SharePoint Server must be coordinated with the disaster recovery strategy for the related infrastructure, including Active Directory domains, Exchange Server, and Microsoft SQL Server. Work with the administrators of the infrastructure that you rely on to design a coordinated disaster recovery strategy and plan.
The time and immediate effort to get another farm up and running in a different location is often referred to as a hot, warm, or cold standby. Our definitions for these terms are as follows:
Hot standby A second data center that can provide availability within seconds or minutes.
Warm standby A second data center that can provide availability within minutes or hours.
Cold standby A second data center that can provide availability within hours or days.
Disaster recovery can be one of the more expensive requirements for a system. The shorter the interval between failure and availability and the more systems you protect, the more complex and costly a disaster recovery solution is likely to be. When you invest in hot or warm standby data centers, costs include:
  • Additional hardware and software, which often increase the complexity of operations between software applications, such as custom scripts for failover and recovery.
  • Additional operational complexity.
Reference: technet.microsoft.com

Friday, November 30, 2012

Query SharePoint List to get all document versions information: SharePoint 2007

Two days back I have posted an article on SharePoint Storage Problems, which can give you a fair idea of what things to look at when you plan or your SharePoint site has eaten space more than expected.
While looking at the same problem, we already know that SharePoint document versions can be the one of the element of sudden spike in SharePoint Storage but how we could determine how many versions are there on the SharePoint collection and what size they are off?
As you all know SQL is the ocean for the SharePoint Information storage, so SQL can provide us the relevant information about this. I wrote a SQL query to get the information on the versioning of all the document in the particular site.
Select a.version, a.timecreated, a.size, b.dirname,b.leafname, b.listid
from dbo.DocVersions a, alldocs b  where a.siteid=b.siteid
and b.dirname = 'sites/AMAR' and a.size 'greator than and equal to' (<>);0 and b.listid is not null
order by a.size
In the above query, columns refer to:
Versions: refer to number of versions of documents in a list
Timecreated: time when the document was created
Size: is the size of the versions (in KB)
Dirname: site name (e.g. sites/amar)
List id: ID of the list in the SharePoint Site.
Hope this piece of information does help you. If you have any questions and concerns do let me know.

Wednesday, November 21, 2012

Recover / Retrieve The Farm passphrase in Sharepoint 2010

Today one of my Clients wanted to add a server to the farm and had forgot the Farm passphrase . it had been a day and he was not able to find the right one . He had not documented the same .

We tried researching on how to retrieve the Passphrase however were not able to find the right Solution . May be its possible to pull from the sql server after running some Query however was not able to find one

I Came to know that there is no way to lookup the Passphrase in the Database and the only way is to reset the Passphrase and without a valid database or SQL connection this is not possible .

The Best way i could find is to Reset the passphrase using the Powershell commands .

Start =>  All Programs => Microsoft SharePoint 2010 Products => SharePoint 2010 Management Shell right click the link and run as administrator.

At the PowerShell prompt input

$passphrase = ConvertTo-SecureString -asPlainText –Force

You will be asked to input a new passphrase in plain text.

Set-SPPassPhrase -PassPhrase $passphrase –Confirm

After inputting the command above you will be asked to reenter the new passphrase
Enter Y = Yes N = No to complete the change.

Once it is done run the Wizard. and you will be able to add the server to the farm with the new passphrase .

It may Happen that you may get some error related to Sql . At this point of time as you have lost the connectivity with Sql

Check for all the permissions of the account you are logged in with on the sql . At times still it would not connect . then the only thing is disconnect the server from the farm and reconnect it

Note : If you know how or if you have any Idea of retrieving the Passphrase Please share .

Wednesday, November 7, 2012

Latest software updates for Sharepoint 2010

For the latest public updates, see the Update center for Office, Office servers, and related products.

October 2012 CU

October Cumulative Update for SharePoint 2010 is a Post-SP1 hotfix. That means that you should ensure that SP1 is installed before the October CU.

The KB articles for October CU can be found at the following locations (they should be available in a couple of days):
  • KB 2687566 - SharePoint Foundation 2010
  • KB 2687564 - SharePoint Server 2010
  • KB 2687565 - SharePoint Server 2010 with Project Server
    As you see there is a separate Full Server Package for SharePoint Server 2010 with Project Server which simplifies patching of this common installation.
The Full Server Packages for October 2012 CU are available through the following links:
http://blogs.technet.com/b/stefan_gossner/archive/2012/11/15/october-2012-cu-for-sharepoint-2010-has-been-released.aspx

 August 2012 Update

SharePoint Foundation 2010                                      SharePoint Server 2010
   •KB 2687355                                                                   • KB 2687353

June 2012 Update

SharePoint Foundation 2010                                     SharePoint Server 2010
• KB 2598373                                                                    • KB 2598354

April 2012 Update

SharePoint Foundation 2010                                    SharePoint Server 2010
• KB 2598321                                                                    • KB 2598151

February 2012 Update

SharePoint Foundation 2010                                   SharePoint Server 2010
• KB 2597132                                                                   •KB 2597150

December 2011 Update

SharePoint Foundation 2010                                  SharePoint Server 2010
• KB 2597058                                                                   • KB 2597014

October 2011 Update

SharePoint Foundation 2010                                 SharePoint Server 2010
• KB 2596508                                                                  • KB 2596505

August 2011 Update

SharePoint Foundation 2010                                 SharePoint Server 2010
• KB 2553050                                                                 •  KB 2553048

June 2011 Update

Important

• If you installed a version of the June 2011 cumulative update that you downloaded prior to June 30, 2011, you need to download and install the update refresh from the download center.

• After you install the June 2011 cumulative update refresh, you must run the SharePoint Products and Technologies Configuration Wizard (PSConfigUI.exe) to run upgrade which will update the farm to the latest version. This step is required in order to have full SharePoint functionality. If you do not run PSConfigUI.exe, the farm will run, but with reduced capacity. For example, for SharePoint Foundation 2010 the search service will not start and as a result, the VSS Writer fails if you initiate a farm backup. For SharePoint Server 2010, search queries will work but indexing will not.

• For SharePoint Server 2010, you must restart the User Profile Synchronization service after installing the June 2011 cumulative update refresh. For more information see the Start the User Profile Synchronization service section in the Configure profile synchronization article in the library.

SharePoint Foundation 2010                                                    SharePoint Server 2010
KB 2536601                                                                                     KB 2536599


Service Pack 1 (SP1)

Service Pack 1 for SharePoint 2010 products includes stability, performance, and security enhancements that are a direct result of customer feedback and are designed to extend the value customers experience with SharePoint 2010.

Important

• After you install Service Pack 1, you need to install the June 2011 cumulative update refresh.

SharePoint Foundation 2010                                         SharePoint Server 2010
        KB 2460058                                                                   KB 2460045

      White paper: Service Pack 1 for SharePoint Foundation 2010

                                               White paper: Service Pack 1 for SharePoint Server 2010

April 2011 Update

SharePoint Foundation 2010                                        SharePoint Server 2010
• KB 2512804                                                                      KB 2512800

February 2011 Update

SharePoint Foundation 2010                                      SharePoint Server 2010
• KB 2475880                                                                    • KB 2475878

December 2010 Update

SharePoint Foundation 2010                                      SharePoint Server 2010
• KB 2459125                                                                     •KB 2459257

Note: You must restart the User Profile Synchronization service after installing this cumulative update.

October 2010 Update

SharePoint Foundation 2010                                       SharePoint Server 2010
• KB 2394323                                                                     KB 2394320


August 2010 Update

SharePoint Foundation 2010                                             - KB 2352346
SharePoint Server 2010                                                    - KB 2352342
SharePoint Server 2010 and Project Server 2010              - KB 2352345

The Office 2010 Cumulative Update for August 2010 ( KB 2396341) contains additional hotfixes that apply to Project Server 2010 and FAST Search Server 2010 for SharePoint.

June 2010 Update

SharePoint Foundation 2010                                            SharePoint Server 2010
• KB 2028568                                                                                 KB 983497
                                                                                                        KB 2124512
                                                                                                        KB 2182938
                                                                                                        KB 2204024
                                                                                                        KB 2281364

The Office 2010 Cumulative Update for June 2010 ( KB 2259686) contains additional hotfixes that apply to Project Server 2010 and Search Server 2010.

For more information, see http://blogs.technet.com/b/stefan_gossner/archive/2010/07/22/the-first-cumulative-update-for-sharepoint-2010-family-has-been-released.aspx.

Understanding SCOM ? System Center Operations Manager

System Center Operations Manager offers end to end service availability and performance monitoring for your datacenter applications and infrastructure allowing you to deliver reliable SLAs to your business.

You need a monitoring solution that enables you to reliably monitor your applications and infrastructure in a “single pane of glass” while working well with other components of your systems management tools. Ideally, you want this solution to work across your on-premises datacenter resources as well as off-premises (or public cloud based) resources

Operations Manager provides deep visibility into the health, performance and availability of your datacenter environments – across applications, operating systems, hypervisors and even hardware – through a single, familiar and easy to use interface. Operations Manager offers best of breed monitoring for Windows based environments while providing first class support for heterogeneous environments (e.g. various distributions of Linux/Unix and Sun Solaris).

Key Benefits

• Exceptional application performance and availability for Microsoft environments
• Provides end-to-end service management for your datacenter services
• Helps increase the efficiency and control of your datacenter environments
• Unified monitoring across your private and public cloud services



Reference : http://www.microsoft.com/en-in/server-cloud/system-center/operations-manager.aspx

Users cannot see the checked out files in the folder/ library

I Came across a Issue today wherein the user opened a ticket for the below issue Issue : Users cannot see the checked out files in the fo...