A blog for Microsoft Technologeis, Articles, Reviews,Best Practices, Upcoming Microsoft Technologies particulary related to Windows Server System and Azure and related Discussions. The purpose of this blog is to provide a resource to the quick information that Application Developers,Designer and Architects need on Microsoft's Technologies for developing and integrating these technologies. "T H E K N O W L E D G E W H I C H I S C O N C E A L E A D I S L O S T"
Tuesday, September 25, 2012
September 2012 Perth SharePoint User Group - Apps for SharePoint 2013
September 2012 Perth SharePoint User Group Meeting - Apps for SharePoint 2013
Perth SharePoint User Group
Tuesday, September 25, 2012 from 12:15 PM to 1:15 PM (WST)
Perth, Australia
For the September 2012 Perth SharePoint User Group meeting, Khalil Khan, Perth based SharePoint Server MVP and SharePoint Architect at Velrada will be presenting on the new App Model for SharePoint 2013.
SharePoint 2013 has introduced exciting new features for both the developers and business users alike. This session will focus on this new App Model and how to make best use of it for building effective SharePoint solutions.
The presentation will cover:
A brief overview of App Model for SharePoint 2013;
Comparison of app models with SharePoint Solutions;
Design Considerations and Development Tools; and
Building/Deploying Apps for SharePoint 2013.
Velrada is proud to sponsor the event, with a pizza lunch provided.
http://september2012perthsharepointusergroup.eventbrite.com/?ref=esfbenivte001
Tuesday, September 11, 2012
Authentication Model in SharePoint 2013
New Authentication Model in SharePoint 2013
SP 2013 preview is available now for few weeks and I am sure many of you have tried SharePoint 2013 by installing it on your standalone box/VM or by getting an account on SharePoint Online, When you log into SharePoint for the first time it looks like that nothing has really changed in terms of authentication but when you dig down Microsoft has made changes to authentication model of SharePoint 2013.
In SharePoint 2010 Claims based authentication was the default authentication mode for SharePoint 2013 web apps and now SharePoint can leverage OAuth and Server to Server (S2S Authentication)
Background of Authentication in SharePoint from 2007 to 2013
MOSS 2007 was base d on capabilities of IIS to provide authentication what we call Classic Authentication Mode, Classic Auth support Basic and Forms Auth , NTML or Kerberos modes but at one time single authentication mechanism was supported on a MOSS web application.
SharePoint 2010 introduced a new authentication mode what we call Claims based authentication, Claims supports FBA and Basic but still Classic was default auth mode for SP 2010 apps.
Claims based auth uses “tokens” that identify the user and specific, customizable attributes about the user (username, email, full name, etc.). Each attribute is known as a claim.
In Preview SharePoint 2013 doesn’t support Classic Auth from UI but you can still do that using power shell .
Server to Server (S2S) Authentication and OAuth for SP 2013 Apps
Server to Server Authentication is another change in auth area in Sharepoint 2013, New server products including SharePoint 2013, Exchange and Lync 2013 are using S2S . This is similar to OAuth for Applications but is for an entire server and is actually delegating the user’s identity to the remote server.
S2S relies on claims behind the scenes to delegate the user’s identity. Where it differs from straight claims is that the delegation is automatic and doesn’t have to be initiated by the user.
OAuth is some thing which is there for a while now and the current version of OAuth is I believe OAuth 2, it is used widely on web these days specially on social networking Apps including open social etc.
In SharePoint 2013, OAuth provides authorization for apps to access specific user resources without the user needing to provide credentials to the app. The idea is to establish a trust ….. Regardless of where the app is actually hosted (on-premise or in the cloud), between the app server and SharePoint allowing the app access to the resources it’s requested.
In the case of an on-premise app, everything is negotiated between the server and SharePoint and an implicit trust exists. This comes from the app being hosted on SharePoint. For the case of cloud-based apps, SharePoint trusts the Azure Access Control Service (ACS).
Saturday, September 08, 2012
Apps in SharePoint 2013 Online Event
Khalil ur Rehman, SharePoint Server MCTS / MVP will be presenting on the new App Model for SharePoint 2013.
SharePoint 2013 has introduced exciting new features for both the developers and business users alike. This session will focus on this new App Model and how to make best use of it for building effective SharePoint solutions.
The presentation will cover:
A brief overview of App Model for SharePoint 2013;
Comparison of app models with SharePoint Solutions;
Design Considerations and Development Tools; and
Building/Deploying Apps for SharePoint 2013.
This is an online event , If you want to join the event send an email to khalil.urrehman@gmail.com to get a meeting invite to join the session....
Date: 6th Oct, 2012
Time: 9 am to 10 am (Pakistan Standard Time)
https://www.eventbrite.com/event/4042069940?utm_source=eb_email&utm_medium=email&utm_campaign=new_attendee&utm_term=event_name
Wednesday, August 29, 2012
SharePoint Content Database in Suspect Mode
If you are getting this error message while accessing SharePoint
"Cannot connect to the configuration database"
There can be several reasons for this and some of them are described here with possible solutions
http://support.microsoft.com/kb/823287
but another reason is that when your database goes to suspect mode you will get the same error.
What Does Suspect Mode Means?
There are different reasons for database to go in suspect mode like error in its physical files e.g:- log file.
It is difficult to make database online when made as suspect database. There are several ways we can identify that a database is in suspect mode.
I used the following commands to bring my database online
exec sp_resetstatus DBNAME
ALTER DATABASE DBNAME SET EMERGENCY
GO
ALTER DATABASE DBNAME SET SINGLE_USER
GO
DBCC CheckDB (DBNAME , REPAIR_ALLOW_DATA_LOSS)
GO
ALTER DAtabase DBNAME SET MULTI_USER
GO
examples of these command with DBNAme is
exec sp_resetstatus 'SharePoint_Config_703e926e-d84f-4ab1-941e-308e85137400'
ALTER DATABASE [SharePoint_Config_703e926e-d84f-4ab1-941e-308e85137400] SET EMERGENCY
GO
ALTER DATABASE [SharePoint_Config_703e926e-d84f-4ab1-941e-308e85137400] SET SINGLE_USER
GO
DBCC CheckDB ([SharePoint_Config_703e926e-d84f-4ab1-941e-308e85137400] , REPAIR_ALLOW_DATA_LOSS)
GO
ALTER DAtabase [SharePoint_Config_703e926e-d84f-4ab1-941e-308e85137400] SET MULTI_USER
GO
"Cannot connect to the configuration database"
There can be several reasons for this and some of them are described here with possible solutions
http://support.microsoft.com/kb/823287
but another reason is that when your database goes to suspect mode you will get the same error.
What Does Suspect Mode Means?
There are different reasons for database to go in suspect mode like error in its physical files e.g:- log file.
It is difficult to make database online when made as suspect database. There are several ways we can identify that a database is in suspect mode.
I used the following commands to bring my database online
exec sp_resetstatus DBNAME
ALTER DATABASE DBNAME SET EMERGENCY
GO
ALTER DATABASE DBNAME SET SINGLE_USER
GO
DBCC CheckDB (DBNAME , REPAIR_ALLOW_DATA_LOSS)
GO
ALTER DAtabase DBNAME SET MULTI_USER
GO
examples of these command with DBNAme is
exec sp_resetstatus 'SharePoint_Config_703e926e-d84f-4ab1-941e-308e85137400'
ALTER DATABASE [SharePoint_Config_703e926e-d84f-4ab1-941e-308e85137400] SET EMERGENCY
GO
ALTER DATABASE [SharePoint_Config_703e926e-d84f-4ab1-941e-308e85137400] SET SINGLE_USER
GO
DBCC CheckDB ([SharePoint_Config_703e926e-d84f-4ab1-941e-308e85137400] , REPAIR_ALLOW_DATA_LOSS)
GO
ALTER DAtabase [SharePoint_Config_703e926e-d84f-4ab1-941e-308e85137400] SET MULTI_USER
GO
Wednesday, August 22, 2012
Error on Webpart Page
I have seen many information workers and sharepoint developers struggling with this basic issue in which they created a custom webpart/or used an OOB webpart.... added it to a webpart page....if there are some errors/issues in webpart .....NOW when they open the page they can't see the contents of that page , neither they can edit the page from ribbon because they are getting an error message on page due to error in webpart.....
a very simple solution to this problem is to add a query string parameter
?contents=1 at the end of page ......this will open the page in a mode where you will be able to remove items from your page
so lets say URL of your webpart page was
http://servername/pages/abc.aspx
you should type
http://servername/pages/abc.aspx?contents=1
a very simple solution to this problem is to add a query string parameter
?contents=1 at the end of page ......this will open the page in a mode where you will be able to remove items from your page
so lets say URL of your webpart page was
http://servername/pages/abc.aspx
you should type
http://servername/pages/abc.aspx?contents=1
Monday, August 13, 2012
Virtual Event - Office 15/SP 2013 Installation and Preview
In SharePoint world, everybody is talking about SP 2013 and Office 15 products these days, Microsoft has made it easy for users to experience the product features by first time providing
SharePoint Online and On campus installation option together but many of users, especially who are relatively new to SharePoint are not familiar with Online option, some are facing issues in installation of version on local VMs.
Let’s look at these options and issues together in a live session and Fix them
• SP 2013 online V/S Offline
• Set up your account for installation on Office 365/SharePoint Online and Product Preview
• Software Requirement of Standalone Installation
• Hardware Requirements of Standalone Installation
• Installation issues of SP 2013 standalone
• How to fix the installation issues
Join me on Live Meeting for a session on Installation and Configuration of SharePoint 2013 CP , Office 15 CP Products and High level preview.
Venue: Live Meeting (Send me an email at khalil.urrehman@gmail.com ) to book a slot [Limited to 15 users, first come first serve]
Date & Time: Saturday, 19th August, 2012 2 PM Pakistan Standard Time (GMT+5)
SharePoint Online and On campus installation option together but many of users, especially who are relatively new to SharePoint are not familiar with Online option, some are facing issues in installation of version on local VMs.
Let’s look at these options and issues together in a live session and Fix them
• SP 2013 online V/S Offline
• Set up your account for installation on Office 365/SharePoint Online and Product Preview
• Software Requirement of Standalone Installation
• Hardware Requirements of Standalone Installation
• Installation issues of SP 2013 standalone
• How to fix the installation issues
Join me on Live Meeting for a session on Installation and Configuration of SharePoint 2013 CP , Office 15 CP Products and High level preview.
Venue: Live Meeting (Send me an email at khalil.urrehman@gmail.com ) to book a slot [Limited to 15 users, first come first serve]
Date & Time: Saturday, 19th August, 2012 2 PM Pakistan Standard Time (GMT+5)
Monday, July 23, 2012
SharePoint 2013 training for IT pro
IT Professional training for SharePoint 2013 how to training and walkthrough videos about Office 2013 and SharePoint 2013 including changes and new features for search, social, ECM, WCM, and REST are now available on technet.
http://technet.microsoft.com/en-us/sharepoint/fp123606.aspx
http://technet.microsoft.com/en-us/sharepoint/fp123606.aspx
SharePoint 2013 Installation
I am getting many emails from my old colleagues friends about SP 2013 and the issues which they were facing in installation of SP2013, Given below are the steps shared by a fellow Colleague David Piscopo
I thought that its worth sharing on my blow
Installation Steps SharePoint 2013
Steps
1. Install Windows Server 2008 R2
2. Install Service Pack 1 for Windows Server R2 (the pre-requisite checker does not fulfil this and it has to be installed separately). This can take up to an hour to install)
3. Run the default.hta from the install media
4. Select ‘Install software Prerequisites’ and let it do its thing. This may take a while and there may be several reboots
5. Run ‘Install SharePoint Foundation’ when the pre-requisites are done
6. At the end of the install you will be asked to install the ‘Configuration Wizard’. DO NOT DO THIS as your install will fail.
7. Open the local services and locate the ‘AppFabricCachingService’ service. Change the logon identity of this service so that it is using a local admin account rather than the Network Service
8. Start the AppFabricCachingService service if not already started.
9. Start a command prompt as Administrator and change directory to ‘C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\BIN’ (or add the path to your environment – recommended)
10. Execute PSCONFIG to create the config database
PSCONFIG.EXE -cmd Configdb create SkipRegisterAsDistributedCacheHost
This will take a while to complete
SharePoint Products Configuration Wizard version 15.0.4128.1014. Copyright (C) Microsoft Corporation 2010. All rights reserved.
Performing configuration task 1 of 3
Initializing SharePoint Products configuration...
Successfully initialized the SharePoint Products configuration.
Performing configuration task 2 of 3
Creating the configuration database...
Successfully created the configuration database.
Performing configuration task 3 of 3
Finalizing the SharePoint Products configuration...
Successfully completed the SharePoint Products configuration.
Total number of configuration settings run: 3
Total number of successful configuration settings: 3
Total number of unsuccessful configuration settings: 0
Successfully stopped the configuration of SharePoint Products.
Configuration of the SharePoint Products has succeeded.
11. Re-run the ‘SharePoint 2013 Products Configuration Wizard’. You may get an error at the end of process regarding Sample Data. Disregard this
You should now be good to go.
I thought that its worth sharing on my blow
Installation Steps SharePoint 2013
Steps
1. Install Windows Server 2008 R2
2. Install Service Pack 1 for Windows Server R2 (the pre-requisite checker does not fulfil this and it has to be installed separately). This can take up to an hour to install)
3. Run the default.hta from the install media
4. Select ‘Install software Prerequisites’ and let it do its thing. This may take a while and there may be several reboots
5. Run ‘Install SharePoint Foundation’ when the pre-requisites are done
6. At the end of the install you will be asked to install the ‘Configuration Wizard’. DO NOT DO THIS as your install will fail.
7. Open the local services and locate the ‘AppFabricCachingService’ service. Change the logon identity of this service so that it is using a local admin account rather than the Network Service
8. Start the AppFabricCachingService service if not already started.
9. Start a command prompt as Administrator and change directory to ‘C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\BIN’ (or add the path to your environment – recommended)
10. Execute PSCONFIG to create the config database
PSCONFIG.EXE -cmd Configdb create SkipRegisterAsDistributedCacheHost
This will take a while to complete
SharePoint Products Configuration Wizard version 15.0.4128.1014. Copyright (C) Microsoft Corporation 2010. All rights reserved.
Performing configuration task 1 of 3
Initializing SharePoint Products configuration...
Successfully initialized the SharePoint Products configuration.
Performing configuration task 2 of 3
Creating the configuration database...
Successfully created the configuration database.
Performing configuration task 3 of 3
Finalizing the SharePoint Products configuration...
Successfully completed the SharePoint Products configuration.
Total number of configuration settings run: 3
Total number of successful configuration settings: 3
Total number of unsuccessful configuration settings: 0
Successfully stopped the configuration of SharePoint Products.
Configuration of the SharePoint Products has succeeded.
11. Re-run the ‘SharePoint 2013 Products Configuration Wizard’. You may get an error at the end of process regarding Sample Data. Disregard this
You should now be good to go.
Sunday, July 22, 2012
What's New in SharePoint 2013 Preview - Part 1
What's New in SharePoint 2013 Preview - Part 1
Given Below is a summary from my notes----A Ten Thousand Feet view of SP 2013 Preview...
Whats new in SharePoint 2013
Supported Browsers
IE 8
IE 9
Mozilla, Chrome and Safari supported with limitations
New Things in SharePoint 15
WebApps is nolonger a Service application
WebAnalystis in no longer a service app , its merged into Search
WCM
Support the tools and workflows designers use
Variations & Content Translation
Search Engine Optimization
Cross Site Publishing
Video & Embedding
Image renditions
Clean Urls
Metadata navigation
Social
Huge Investments by Microsoft in Social Area
MicroBlogging
Acvity Feeds
Communities
Search
Unified Search NOW
Pesonalized Search Results
Stay social with the people who are important to yu
Improved Connections B/w People and Conversatioins in Context
Social Data ---on Hand HELDS
Yammer Integration.....NOT IN THIS RELEASE ....will be available in release
Look and Feel
New Global Navigation Bar with
NewsFeed
SkyDrive
Sites
Open Document/Video/Office in Same view ....in your feed
you can follow a tag...so when any body will make a post you will get notified.....
Different Views of News Feed
Following
EveryOne
Mentions
Create New Tag
Sites which you are following will appear in prview
Lync Hover Card which shows your Lync card information
Given Below is a summary from my notes----A Ten Thousand Feet view of SP 2013 Preview...
Whats new in SharePoint 2013
Supported Browsers
IE 8
IE 9
Mozilla, Chrome and Safari supported with limitations
New Things in SharePoint 15
WebApps is nolonger a Service application
WebAnalystis in no longer a service app , its merged into Search
WCM
Support the tools and workflows designers use
Variations & Content Translation
Search Engine Optimization
Cross Site Publishing
Video & Embedding
Image renditions
Clean Urls
Metadata navigation
Social
Huge Investments by Microsoft in Social Area
MicroBlogging
Acvity Feeds
Communities
Search
Unified Search NOW
Pesonalized Search Results
Stay social with the people who are important to yu
Improved Connections B/w People and Conversatioins in Context
Social Data ---on Hand HELDS
Yammer Integration.....NOT IN THIS RELEASE ....will be available in release
Look and Feel
New Global Navigation Bar with
NewsFeed
SkyDrive
Sites
Open Document/Video/Office in Same view ....in your feed
you can follow a tag...so when any body will make a post you will get notified.....
Different Views of News Feed
Following
EveryOne
Mentions
Create New Tag
Sites which you are following will appear in prview
Lync Hover Card which shows your Lync card information
SharePoint 2013 Hardware/Software Requirements
These are the minimum hardware and software requirements for SharePoint 2013 as per available preview.
Minimum Hardware Requirements
Processor: 64-bit, 4 cores
RAM:
8 GB for production use
4 GB for developer or evaluation use
Hard disk:
80 GB free for system drive
Maintain 2x free space as available RAM
Software REquirements
64-bit edition of Microsoft SQL Server 2008 R2 Service Pack 1
64-bit edition of Windows Server 2008 R2 Service Pack 1 (SP1) Standard, Enterprise, Data Center, or Web Server
Minimum Hardware Requirements
Processor: 64-bit, 4 cores
RAM:
8 GB for production use
4 GB for developer or evaluation use
Hard disk:
80 GB free for system drive
Maintain 2x free space as available RAM
Software REquirements
64-bit edition of Microsoft SQL Server 2008 R2 Service Pack 1
64-bit edition of Windows Server 2008 R2 Service Pack 1 (SP1) Standard, Enterprise, Data Center, or Web Server
Friday, July 20, 2012
Fab 40 Update - SharePoint 2010 Templates
Updated version of SharePoint 2010 Fab 40 templates are available at
www.techsolutions.net/SharePointSolutions.aspx
www.techsolutions.net/SharePointSolutions.aspx
Sunday, July 15, 2012
Free Microsoft SharePoint 2010 and SharePoint Online templates for government
To provide better access to SharePoint community working on Government Projects, Microsoft has provided a link for GOVERNMENT Templates created by me on website.
You can access it here
http://www.microsoft.com/government/en-us/campaigns/Pages/SharePoint-Templates.aspx
These templates are available for SharePoint 2010 and SharePoint Online.
If you find any issue in installations of these templates feel free to write me at
khalil.urrehman@gmail.com
You can access it here
http://www.microsoft.com/government/en-us/campaigns/Pages/SharePoint-Templates.aspx
These templates are available for SharePoint 2010 and SharePoint Online.
If you find any issue in installations of these templates feel free to write me at
khalil.urrehman@gmail.com
Thursday, July 12, 2012
Web Analytics with Title
Alot of people are on different forums have put up a requirement to get Titles displayed in Webanalytics instead of URLs, i don't know why webanalytics doesn't allow this in first place :)
But any way, i have a code snippet from Farhan Faiz on subject but have noticed that it has some limitations....
I have tried to get another version of WebAnalytics which which is working for me in sites/sub sites
Try and share your feedback....
Steps to Setup this in your DEV environment
1) Create an empty project in VS 2010
2) Add a new WebPart
3) Build and Deploy this blank webpart
4) Add it to your sharepoint site
5) Add Reference to
C:\Windows\assembly\GAC_MSIL\Microsoft.Office.Server.WebAnalytics.UI\14.0.0.0__71e9bce111e9429c\Microsoft.Office.Server.WebAnalytics.UI.dll
in your project
6) Rename Webpart class to TitleAnalystics and Replace code in webpart.cs file with the one listed below
7) Build and Deploy this updated Webpart
using System;
using System.ComponentModel;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using System.Text.RegularExpressions;
namespace TitleAnalystics.TitleAnalystics
{
[ToolboxItemAttribute(false)]
public class TitleAnalystics : Microsoft.Office.Server.WebAnalytics.Reporting.WhatsPopularWebPart, ICallbackEventHandler
{
// Make sure that double quotes and single quotes are copied correctly, when you copy html and past it to Visual Studio sometimes it changes the character.
private const string ItemRegEx = @"(?[^<]*) ";
private static string ReplaceUrlsWithTitles(string html)
{
if (Regex.IsMatch(html, ItemRegEx))
{
html = Regex.Replace(html, ItemRegEx, delegate(Match match)
{
var url = match.Groups["url"].Value;
string title = url;
using (SPSite spSite = new SPSite(SPContext.Current.Site.Url))
{
using (SPWeb spWeb = spSite.OpenWeb(title))
{
try
{
var item = spWeb.GetListItem(title);
if (item != null)
{
title = item.DisplayName;
}
else
{
//var item2 = SPContext.Current.Site.RootWeb.GetListFromUrl(url);
var item2 = spWeb.GetListFromUrl(url);
title = item2.Title;
}
}
catch (Exception e) { }
}
}
return "" + title + "";
}, RegexOptions.IgnoreCase);
}
return html;
}
string ICallbackEventHandler.GetCallbackResult()
{
return ReplaceUrlsWithTitles(base.GetCallbackResult());
}
void ICallbackEventHandler.RaiseCallbackEvent(string eventArgument)
{
base.RaiseCallbackEvent(eventArgument);
}
}
}
But any way, i have a code snippet from Farhan Faiz on subject but have noticed that it has some limitations....
I have tried to get another version of WebAnalytics which which is working for me in sites/sub sites
Try and share your feedback....
Steps to Setup this in your DEV environment
1) Create an empty project in VS 2010
2) Add a new WebPart
3) Build and Deploy this blank webpart
4) Add it to your sharepoint site
5) Add Reference to
C:\Windows\assembly\GAC_MSIL\Microsoft.Office.Server.WebAnalytics.UI\14.0.0.0__71e9bce111e9429c\Microsoft.Office.Server.WebAnalytics.UI.dll
in your project
6) Rename Webpart class to TitleAnalystics and Replace code in webpart.cs file with the one listed below
7) Build and Deploy this updated Webpart
using System;
using System.ComponentModel;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using System.Text.RegularExpressions;
namespace TitleAnalystics.TitleAnalystics
{
[ToolboxItemAttribute(false)]
public class TitleAnalystics : Microsoft.Office.Server.WebAnalytics.Reporting.WhatsPopularWebPart, ICallbackEventHandler
{
// Make sure that double quotes and single quotes are copied correctly, when you copy html and past it to Visual Studio sometimes it changes the character.
private const string ItemRegEx = @"(?
private static string ReplaceUrlsWithTitles(string html)
{
if (Regex.IsMatch(html, ItemRegEx))
{
html = Regex.Replace(html, ItemRegEx, delegate(Match match)
{
var url = match.Groups["url"].Value;
string title = url;
using (SPSite spSite = new SPSite(SPContext.Current.Site.Url))
{
using (SPWeb spWeb = spSite.OpenWeb(title))
{
try
{
var item = spWeb.GetListItem(title);
if (item != null)
{
title = item.DisplayName;
}
else
{
//var item2 = SPContext.Current.Site.RootWeb.GetListFromUrl(url);
var item2 = spWeb.GetListFromUrl(url);
title = item2.Title;
}
}
catch (Exception e) { }
}
}
return "" + title + "";
}, RegexOptions.IgnoreCase);
}
return html;
}
string ICallbackEventHandler.GetCallbackResult()
{
return ReplaceUrlsWithTitles(base.GetCallbackResult());
}
void ICallbackEventHandler.RaiseCallbackEvent(string eventArgument)
{
base.RaiseCallbackEvent(eventArgument);
}
}
}
Announcements with Image - SharePoint 2010
Given below are the steps to configure Announcement web part with image
Steps to Display Image in an Announcements List.
• Create an Announcement List
o Create->List->Announcements
o Name the List
• Go to List Settings and check if you have Page Image Column available in list settings
• If you can't find a Page Image Column, click Add existing Site Column
• Select Page Image Column from the List.
• Select the option of , Add this column to your default view
• Now come your home page(Page where you want to add announcement web part with image)
• Add a content Query web part and go to settings of CQWP.
• in Query Section select your previously created announcement list as source. (show items from this list type)
• Scroll down to Fields to Display section under Presentation in settings of CQWP
• In Title Add the name of Column (list column) in this format List Column [Group of List Column] e.g: Title[Custom Columns]
• In Image section add name of image column in this format List Column [Group of List Column] e.g:- Page Image[Page Layout Image]
• you can apply different styles available in Styles column by making combination of Group Style and Item Style: e.g: Group Style Default and Item Style Fixed Image Size
• click apply and ok and you will start seeing the data in your CQWP
Customizing column width/image size etc
Open the site in SharePoint Designer
Open All Files->Style Library->ItemStyle.xsl
This xsl has styles which are applied on CQWP, so you may want to override some of them to make any changes.
Friday, June 08, 2012
Windows Azure Lunch event (complete cloud environment)
After successfully lunch SQL Azure services now Microsoft launch Windows Azure. A complete and comprehensive platform for developing and deploying applications. It is now integrated for Windows, Mac, Linux OS developers as well. Supporting more then one Db like SQL SERVER, MySQL, Mongo DB etc.
For detail look at the Scott Guthrie (CVP Windows Azure, Application plateform) presentation at Microsoft platform.
Windows Azure provides a Microsoft Windows Server-based computing environment for applications and persistent storage for both structured and unstructured data, as well as asynchronous messaging. Windows Azure also provides a range of services that helps you connect users and on-premises applications to cloud-hosted applications, manage authentication, use inter-service messaging, and implement data management and related features such as caching.
SQL Azure is essentially SQL Server provided as a service in the cloud.
Major features are:
Compute Environment
- Windows Azure Compute (Web and Worker Roles).
- Virtual Machine (VM role).
Data Management
- Windows Azure Storage.
- SQL Azure Database.
- Data Synchronization.
- Caching.
Networking Services
- Content Delivery Network (CDN).
- Virtual Network Connect.
- Virtual Network Traffic Manager.
- Access Control (ACS).
- Service Bus.
Other Services
- Business Intelligence Reporting.
- Marketplace.
Tuesday, May 29, 2012
Hash functions to improve string comparison and DB desgin
Scenario
I have gone through some difficult experience to compare strings much time during database design and Querying and think about we need to get some different solution to perform same operation. Many times there are requirements to create Varchar field as Primary column like Account Number in Chart of Account table in Accounts software or Comments column in any table with varchar(max) or (100) etc.
When we try to join string based column or use in our where clause even to find a single record with like or equals clause it increase our query cost. I came across same scenario in recent time to compare a string based column to just check whether it equals to parameter string value or not and it took 76% of total query cost. SQL SERVER Optimizer hints to create a cover index using Primary Key plus this column which improve query performance by at least 50% but at the same time I came across Hash Key function that satisfied my needs, storage and optimization. So I am going to discuss what is Hash key and how can we implement it using SQL SERVER 2008 and above.I have gathered information from many sources and msdn is one of them.
Hash is the value (int or varbinary) result of an algorithm (known as a hash function) applied to a given string. You just need to provide your string as input and you will get a unique hash value as an output. If we provide a complete page string to this function and then change just a character to pass value to it. It will return different values. There is small possibility to repeat same value and this will known as hash collision.
· Security implementation as encryption of string data.
· Reduce network traffic for cross DB queries because of small size required to compare instead of string values.
· Less space requires to store and campare values because it returns int and binary values instead of string characters.
· Performance increase due to small db types and indexes uses if we implement index on it.
· Avoid whole string comparisons and requires comparing just int values as checksum.
· If we create hash column in our DB design along with string columns then it is easy for us to implement joins on these column that will act like string joins as these are hash values of string values.
· Hash collision may return more than your expected result set by returning same hash value. For this reason, CheckSum might return more values then you expected but if you want to use this column to identify your column changes then consider HashBytes. When an MD5 hash algorithm is specified, the probability of HashBytes returning the same result for two different inputs is much lower than that of CHECKSUM.
·
Types of Hash function- Hash Keys in Database Design
- CheckSum()
- HashBytes
For detail about these functions please go to
Monday, May 28, 2012
SQL SERVER Express advance features (supported and Unsupported Features)
We don't need to install complete SQL SERVER Engine to build reports SSRS tool, Management tools and other advance features as we do in previous versions.
More detail can be viewed from this link
http://shamas-saeed.blogspot.com/2012/05/sql-server-2008-express-with-advance.html
I got this detail from different sources of msdn linked below.You can download it from this link
http://www.microsoft.com/en-us/download/details.aspx?id=1842
features supported and unsupported by SSRS 2008 Express with Advance Edition is
SQL Server Express provides the following Reporting Services functionality:
· On-demand report processing for each user who views a report. When a user opens a report, the report is initialized, the query is processed, data is merged into the report layout, and the report is rendered into a presentation format.
· Rendering formats are available for HTML, Acrobat, and Excel.
· Report data sources must be SQL Server relational databases that run locally in SQL Server Express.
· Report server management and report viewing are supported through Report Manager.
· Configuration is supported through the Reporting Services Configuration tool.
· Rs.exe, rsconfig.exe, and rskeymgmt.exe command line utilities are available in SQL Server Express.
· Windows Authentication and predefined roles are used to map existing group and user accounts to a named collection of operations.
Other editions of SQL Server include a larger set of Reporting Services features. The following list describes the features that are documented in SQL Server Books Online, but cannot be used in this edition:
· Scheduled report processing, caching, snapshots, subscriptions, and delivery are not supported.
· Analysis Services, Oracle, XML, SAP, SQL Server Integration Services (SSIS), OLE DB, and ODBC data sources are not supported.
· Remote data sources are not supported. Reports that are hosted in a SQL Server Express report server must retrieve SQL Server relational data from a local SQL Server Express Database Engine instance.
· Ad hoc reporting through semantic models and Report Builder is not supported.
· TIFF (Image), XML, and CSV rendering extensions are not supported.
· The Reporting Services API extensible platform for delivery, data processing, rendering, and security is not supported.
· Custom authentication extensions and custom role assignments are not supported. You must map existing Windows domain user and group accounts to predefined role definitions.
· Custom report items are not supported.
· Managing a long-running report process is not supported. Specifically, you cannot use the Manage Jobs feature in Report Manager to stop report processing.
· Scale-out deployment is not supported.
· SharePoint integrated mode is not supported.
· Report Builder 2.0 is not supported. Report Builder 2.0 can connect to a SQL Server Express database on the local computer or on a remote report server.
list of Supported features and not Supported features in SQL SERVER Express 2008
http://msdn.microsoft.com/en-us/library/ms365248(v=sql.100).aspx
SQL Server Express supports most of the features and functionality of SQL Server 2008. This includes the following:
Stored procedures
|
SQL Server Configuration Manager
|
Views
|
Replication (as a subscriber only)
|
Triggers
|
Advanced Query Optimizer
|
Cursors
|
SMO/RMO
|
sqlcmd and osql utilities
|
Integration with Visual Studio
|
Snapshot isolation Levels
|
Service Broker (as a client only)¹
|
Native XML support. This includes XQuery and XML schemas
|
SQL CLR
|
Transact-SQL language support
|
Multiple Active Result Sets (MARS)
|
Dedicated Administrator Connection²
|
Full text search
|
Subset of Reporting Services features³
|
Import/Export Wizard
|
The following table lists the additional SQL Server 2008 database features that are not supported in this version of SQL Server Express. It also lists database features from earlier versions of SQL Server that are not supported.
|
SQL Server features
not supported in SQL Server Express
|
SQL Server
features from earlier versions not supported in SQL Server Express
|
|
Database mirroring
|
SQL Mail
|
|
Online restore
|
Failover clustering
|
|
Database snapshot
|
Distributed partitioned views
|
|
Parallel index operations
|
VIA protocol support
|
|
Mirrored media sets
|
Log shipping
|
|
Partitioning
|
Parallel DBCC
|
|
Address Windowing Extensions (AWE)
|
Parallel Create Index
|
|
Hot-add memory
|
Enhanced Read Ahead and Scan
|
|
Native HTTP SOAP access
|
Indexed views (materialized views)
|
|
SQL Mail and Database Mail
|
Partitioned views
|
|
Online Index Operations
|
-
|
|
SQL Server Agent and SQL Server Agent Service
|
-
|
Friday, May 18, 2012
Except and Intersect in SQL SERVER
Except and Intersect can be used to returns distinct values by comparing the results of two queries.
The basic rules for combining the result sets of two queries that use EXCEPT or INTERSECT are the following:
- The number and the order of the columns must be the same in all queries.
- The data types must be compatible.
- Expressions in parentheses
- The INTERSECT operand
- EXCEPT and UNION evaluated from left to right based on their position in the expression
------------------------------ Code Sample -----------------------------------------
Declare @tbl Table(InstructorID int,CompanyID int,btactive bit,bitprimary bit)
Insert into @tbl values (1,1,1,0),(2,1,1,1),(3,1,1,0),(4,2,1,0),(2,2,1,1),(1,3,1,0)
select * from @tbl
------------------------------ Code Sample -----------------------------------------
Declare @tbl Table(InstructorID int,CompanyID int,btactive bit,bitprimary bit)
Insert into @tbl values (1,1,1,0),(2,1,1,1),(3,1,1,0),(4,2,1,0),(2,2,1,1),(1,3,1,0)
select * from @tbl
I have created a declare table @tbl with four columns and insert some values in it. Now i want to return all those compayIds that are active with bitPrimary = 0 but the result set must not include those companyIds which have bitPrimay= 1 value as well.
If i use simple query to return bitprimary = 0 I got following result
If we look at the results CompanyID 1 and 2 have data against bitPrimary = 0. So according to my requirement i need only to get 3 companyID in my result set. Now look at the use of EXCEPT operator.
EXCEPT:
EXCEPT returns any distinct values from the left query that are not also found on the right query. When an EXCEPT operation is displayed by using the Graphical Showplan feature in SQL Server Management Studio, the operation appears as a left anti semi join.
------------------------------ Code Sample -----------------------------------------
select CompanyID
from @tbl
where btactive = 1 and bitprimary = 0
EXCEPT
select CompanyID
from @tbl
where btactive = 1 and bitprimary = 1
------------------------------ Code Sample -----------------------------------------
look at the pic above. I have attached result set on top right corner which shows CompanyID 3 and this is what exactly I need to get.
We can also get similar results by using EXCEPT -- NOT EXISTS -- NOT IN. But as per many MVPs EXCEPT is best as performance then others.
Now what if i need to get all those compayIds that are active with bitPrimary = 0 but the result set must include those companyIds which have bitPrimay= 1 as well. Now i use INTERSECT
INTERSECT:
INTERSECT returns any distinct values that are returned by both the query on the left and right sides of the INTERSECT operand. When an INTERSECT operation is displayed by using the Graphical Showplan feature in SQL Server Management Studio, the operation appears as a left semi join.
------------------------------ Code Sample -----------------------------------------
select CompanyID
from @tbl
where btactive = 1 and bitprimary = 0
INTERSECT
select CompanyID
from @tbl
where btactive = 1 and bitprimary = 1
------------------------------ Code Sample -----------------------------------------
look at the pic above. Result set shows CompanyID 1 and 2 because both have btPrimary = 0 and 1 but CompanyID 3 does not have btPrimary = 1 so that ommits.
We can also get similar results by using INTERSECT -- LEFT OUTER JOIN -- FULL OUTER JOIN.
Subscribe to:
Posts (Atom)



