Archive for June, 2012

Monitor High CPU with Extended Events in SQL Server 2012 June 28th, 2012

Vinod Kumar

Extended Events has always been fascinating for me to learn in the previous editions too. But the only drawback of not having an effective UI means that this was tough to configure and more so to use. With SQL Server 2012, this limitation goes out of the door and now we can use some basic UI to work with Extended Events.

In this post, let me take a simple tour of creating a simple Extended Event via SSMS and then we will add appropriate filters to the collection to collect a specific event of some specified value. This is no way exhaustive of what Extended Events can do but surely can be a great starter.

What is Extended Events?

As per BOL, “Extended Events has a highly scalable and highly configurable architecture that allows users to collect as much or as little information as is necessary to troubleshoot or identify a performance problem.” – Read completely on this topic over TechNet.

Step 1: Initializing a session

To get started, Open SQL Server 2012 Management Studio and get to the Management Node. Expand and click on the “Extended Events” node and right click at the Sessions Folder. Select “New Session”.


Step 2: Session Name to start

The next step is to give a “Session Name” in the Text Box. Enter a value of “High_CPU” for example. This screen has multiple other Checkbox which allows you to start this Extended Event session upon SQL Server Startup etc. For this blog, we will not select any of them. Feel free to use these advanced features once you got a hang of Extended Events with SQL Sever 2012.


Step 3: Add an Event and Filter Values

Once the above is complete, now select the “Events” tab from the left-hand side menu. This will bring you the Events Library to select. Remember we want to get the Queries based on some high CPU value.

Under the “Event Library” text box, apply the filter for ShowPlan. This will get you 3 records like below. Select the “query_post_execution_showplan”. This occurs after a SQL statement is executed. This event returns an XML representation of the actual query plan and we will use the CPU values from this event to get badly performing queries. Once you Select use the small “Right Arrow” to move the event to “Selected Events” section. The wizard will look like below.


Step 4: Configure details

Once you reached this step, Click on the “Configure” button on the top right corner. This brings the Event Configuration Options. Select the “Filter (Predicate)” Tab. Apply some filters. For the demo, I am adding two filters on cpu_time and database_name as below. These can be different for you.


Step 5: Configure Storage Options

Now the once the event and filter conditions are configured, we need to next configure where we be collecting these events. For this demonstration, we have used a “event_file” option and are writing to “c:\temp” folder with the options like below.


This is the final step and click “OK” button at the bottom. We are all set now.

Step 6: Start the session now

Right click on the “High_CPU” node and select start session.


Now the configuration is complete and we are all set to start collecting data. Play around with the various options, events and destinations to configure your own collection.


Step 7: Generate a High CPU query

For this blog I am querying a very large table and doing an aggregate to simulate some CPU cycles. Once this is done. Just "double click” the file “c:\temp\High_CPU_x_xxxxx.xel”.

This will Open up the SSMS and you will be able to view the file with some interesting data.


This shows you that I have had a Stored Procedure – “High_CPU1” that is causing some 3313000 ms of CPU time and this qualified for the event capture and hence was collected. You can also use Live trace if you from one of the options of right-click on the session. That will be functioning like a typical Profiler sorts with a filteration of event.

Clicking on the Query Plan also reveals the query that was used inside the Stored Procedure that caused this CPU spike.

There are nice ways to now group, filter etc on Extended Events. But I will write it for a future post.


Want to wrap up saying, with SQL Server 2012 Extended Events are way more powerful than the conventional way of collecting data via Profiler. We will get into some more options and advanced data collection in the future. Do feel free to pass me your comments (if any) for future posts too.

Continue reading...


Checklist on Time Management June 25th, 2012

Vinod Kumar

This is one of the most common topics that I have discussed over this blog. Yet I find it interesting in sharing more and more on the same subject. Feel free to use them in your life as these are surely time-tested methods and coming out of some experience. I am sure there will be moments of “Aaahhaaa” that might come and I would surely want to hear them. Drop us a note over the comments.

Most of the time management tips are high level and these are my 25 step. This is 100% not exhaustive and there is a lot I can learn from you too, so feel free to drop the same.

Expanding the Checklist:

  1. Use the "80/20 Rule" – Work on the 20% of activities that produce the 80% of your results.
  2. Know the – Who, what, when, where, why, how? and find ways to team with someone to execute if needed.

    Nothing is a waste of time if you use the experience wisely – Rodin

  3. Have a small pad for tasks, notes and ideas that come to your mind. It can also be something you can use to guide your time during the day.
  4. Evaluate how you’re using your time from time-to-time. There is always cases where you might have missed the opportunity. Don’t hold on to it so tight that you miss the next opportunity that is in front of you.
  5. Avoid procrastinating and get into a “Do it now” mindset. Doing it is way better than trying to be perfectionist. Understand that perfection is a journey and not destination.
  6. If you know it is a routine, make time and make sure it gets done. This is particularly important for activities like exercise, walks, family time etc.
  7. Start your day early and start chipping your day with doing things small and predictable. It is not about moving a mountain that is in front of you, it is the million small rocks that needs to be moved one-after-another – as simple as it gets.

    What may be done at any time will be done at no time. – Scottish Proverb

  8. Create time for everything that requires the much needed time – family time, recreation time, sleep time, recreation time, relaxing time etc.
  9. During the day, know your productive hours and plan the most important work during this timeframe. This is to make appointments for yourself to get things done.
  10. Avoid and minimize the distractions from social network, emails, phone calls etc.
  11. Make a routine for your emails by – Delegate it, Delete it or Differ it.
  12. Manage administration activities that drain your time away and concentrate on your strengths in executing the same.
  13. Don’t try to multi-task and get time-sliced away in mind. Always have something different to fall back just from a change and get your energy levels high. Focus on one thing at a time and have a checklist that will prioritize what you are executing.

    Better three hours too soon, than one minute too late – William Shakespeare

  14. If you are serious about anything, then know what are the top 5 things you want to achieve out of the day, week and month. Look at your activities in hand and revisit the above list to see if you are on track.
  15. Set your goals in life reasonable and keep revisiting them from time to time – maybe once every 3 months to track the progress.
  16. Allocate time for administrative tasks like meetings and ask two question – Are you required for the same and secondly, is the time reasonable enough to finish the accomplished tasks.
  17. Know why you are going to do a task, this keeps the morale high and you will be surely motivated enough in doing the task.
  18. Know how long things actually take you versus how long you think they should take. This surely helps you to later go a judge for the future. Be realistic and be reasonable.

    It’s not enough to be busy, so are the ants. The question is, what are we busy about? – Henry David Thoreau

  19. Do the most important things first even if it might be the dirtiest thing to handle. I am a big fan of Covey rules :). Prioritize your tasks based on importance, not urgency.
  20. Say "No" skillfully to make time for priorities and to stay focused. Use your mind to answer and not your heart in answering with an affirmative “No”.
  21. Feel free to delegate tasks if you feel this needs to get executed by someone else.
  22. Keep your TODO list short, measurable, achievable and always in sight and chip your way forward.
  23. Map the work and breakdown on the things as you execute. If you can time-box them based on calendar slices, feel free to do it. Every task needs its time and give them the time.
  24. Don’t over-engineer on a 5 minute problem for more than half hour. Snap out and move on and return back to it later if you are in a brain-dead state.
  25. Don’t try to chew more than what you can eat. Set your internal limits of time, quality of work and the task list in hand.
  26. Bonus: Do any activity to the best capacity of your knowledge and never hesitate to stand up for the work you have done. If you personally feel it is not worth, don’t try to do a half baked job. Ask for time and do a better job that will be acceptable by you and hence by others too !!!

The key is in not spending time, but in investing it. – Stephen R. Covey

These are some items that come on top of my mind. Feel free to give me your feedbacks. Thanks again for reading this far :).

Continue reading...


Windows PowerShell Links to Bookmark June 24th, 2012

Vinod Kumar


After writing a bunch of links and resources on Sharepoint, thought it will be great to drop a line around all the links and resources on PowerShell. Hope the administrators who want to work with PowerShell will find these links useful and will use this page as a bookmark for reference. This is just my way to share all the bookmarks from my IE page :). Your feedbacks and comments are most welcome as you browse through this mega-list.

The list below is provided for those who wish to become familiar with Microsoft PowerShell 2.0. Top Level Site for PowerShell:

Windows PowerShell Training

Windows PowerShell Getting Started Guide

  • Scripting with Windows PowerShell

PowerShell Essentials for the Busy Admin (5 part video series)

  • Why You Should Learn PowerShell
  • How to Compound Windows PowerShell Commands for Fun and Profit
  • A Look at Windows PowerShell Providers
  • Windows PowerShell Does Event Logs
  • Using Windows PowerShell to Manage the Remote Desktop

Windows PowerShell – Learn it Now Before It’s an Emergency (5 part video series)

  1. Part 1
  2. Part 2
  3. Part 3
  4. Part 4
  5. Part 5

Windows PowerShell Owner’s Manual

  • Getting Started with Windows PowerShell
  • Customizing the Windows PowerShell Console
  • Windows PowerShell Shortcut Keys
  • Piping and the Pipeline
  • Running Windows PowerShell Scripts
  • The Windows PowerShell Profile
  • Windows PowerShell Aliases

Windows PowerShell User’s Guide

  • Windows PowerShell Basics
  • Object Pipeline
  • Windows PowerShell Navigation
  • Working with Objects
  • Using Windows PowerShell for Administration
  • Introducing the Windows PowerShell ISE
  • Appendix 1 – Compatibility Aliases
  • Appendix 2 – Creating a Custom Windows PowerShell Shortcut

Windows PowerShell Webcasts/Podcasts (a list of 76 different PowerShell presentations in multiple formats – to see the entire list select “MORE” on right-hand side opposite the heading that reads “IT Professionals (76)”)

  • Introduction to Windows PowerShell
  • Using Windows PowerShell 2.0
  • Windows PowerShell Basics for IT Professionals (2-part series)
  • TechEd 2011 Birds-of-a-Feather (Sessions 04): PowerShell: Best Practices From The Field
  • Managing Web Infrastructure Systems with Windows PowerShell 2.0
  • How Do I:
  • PowerShell – The Basics
  • PowerShell Variables
  • PowerShell Scripts and the Command Line
  • PowerShell and WMI
  • Creating Output with PowerShell
  • PowerShell – Object Manipulation
  • Pipelining

The VBScript-to-Windows PowerShell Conversion Guide

PowerShell Podcasts

These audios offer Windows PowerShell tips, news and interviews that you can listen to at your convenience.

Windows PowerShell Podcasts

TechNet Radio

Useful PowerShell Blogs

This is a sampling of some of the blogs that are being written on the subject of Windows PowerShell.  Some of these are independent blogs and not from Microsoft.

Hey, Scripting Guy! Blog

Windows PowerShell Team Blog


Keith Hill’s Blog

Richard Siddaway’s Blog

PowerShell Scripts

This section represents links to actual PowerShell scripts that have been developed for review and reuse.  These scripts are intended to keep administrators from having to “start from scratch” when developing scripts.  While they will almost certainly require some modification, the intent is to give admins a starting point to learn how to do various tasks related to PowerShell in their own environments.

Windows PowerShell Script Repository

Microsoft Script Center

PowerShell Forum

This forum is a place where administrators can ask question, read discussions among technical professionals, and engage with the online PowerShell community.

Windows PowerShell Forum

PowerShell Tools

Windows PowerShell (download)

The Windows PowerShell Toolbox

PowerShell Books

The following is a partial list of books that have proven useful as PowerShell resources, both to the new admin and the experienced developer. This is not intended as a complete list of PowerShell books, but is intended only as a sample for the admin looking to start building their library

Windows PowerShell 2.0 Best Practices

Microsoft Windows PowerShell 3.0 Step by Step

Windows PowerShell Scripting Guide

Windows PowerShell 2.0 Administrator’s Pocket Consultant

Additional PowerShell Resources

A variety of external resources offered to the PowerShell community in the form of blogs, sample scripts, wikis, forums, etc.

Windows PowerShell Wiki


Precision Computing

Under the Stairs

PowerShell v3 (beta)

These resources are specifically designed to help prepare for the newest version of PowerShell to be released in the near future.

PowerShell v3 Guide (TechNet)

  1. Introduction
  2. Getting PowerShell v3
  3. Installing PowerShell v3
  4. PowerShell v3 FAQ
  5. Featured Articles
  6. New Features
  7. Tips and Tricks

What’s New in PowerShell v3

PowerShell v3 Sneak Peek (Microsoft TechDays video)

Phew, that is a lot of links and resources you have in your hand to digest. So feel free to pass this page on your Social sites if you find it useful. Do drop a line if you would like to see for other technologies too.

Continue reading...


SharePoint 2010 Resources to Bookmark June 19th, 2012

Vinod Kumar

sharepointI know this is not the usual post of my techie but I thought this is worth a post based on some of the bookmarks available with me already. Can become an interesting and handy reference for sure for folks out there.

I just mentioned over my twitter (@vinodk_sql) about this awesome resource to start: SharePoint 2010 Resources for IT Professionals. This is like the root that I want to mention first and then take you through some of the detailed content that is available from there that you can use.

Beginning with SharePoint

Getting Started with SharePoint 2010 for IT Pros (Webcast Series)

  1. Part 1 – What Can SharePoint Server 2010 Do for Me?
  2. Part 2 – How SharePoint Server 2010 Works
  3. Part 3 – Simple Install for Testing in SharePoint Server 2010
  4. Part 4 – Search in SharePoint Server 2010
  5. Part 5 – Backups in SharePoint Server 2010
  6. Part 6 – Creating Your First Web Application, Site Collection and Web in SharePoint Server 2010
  7. Part 7 – Getting Started with Security in SharePoint Server 2010
  8. Part 8 – Windows PowerShell for SharePoint Server 2010 Administrators
  9. Part 9 – Tools to Optimize the Performance of SharePoint Server 2010
  10. Part 10 – Introduction to Upgrade in SharePoint Server 2010
  11. Part 11 – Service Applications and Topologies in SharePoint Server 2010
SharePoint 2010 Advanced IT Professional Training (Webcast Series)

Core Architecture of SharePoint 2010

  • Lesson 1: Understanding SharePoint 2010 Topology
  • Lesson 2: Planning and Leveraging SharePoint 2010 Service Applications
  • Lesson 3: Business Continuity Management Features in SharePoint 2010

Security in SharePoint 2010

  • Lesson 1: Using the New SharePoint 2010 Security Model – Part 1
  • Lesson 2: Using the New SharePoint 2010 Security Model – Part 2

IT Pro Management in SharePoint 2010

  • Lesson 1: Managing SharePoint 2010 Customizations for the IT Pro
  • Lesson 2: IT Pro Tools for Customizing SharePoint 2010

Upgrading to SharePoint 2010

  • Lesson 1: SharePoint 2010 Upgrade Overview
  • Lesson 2: Preparing to Upgrade to SharePoint 2010
  • Lesson 3: Testing Upgraded SharePoint 2010 Solutions
  • Lesson 4: Implementing and Validating Upgrade Plans for SharePoint 2010

Enterprise Search in SharePoint 2010

  • Lesson 1: Search Capabilities and Features in SharePoint 2010

Content Management in SharePoint 2010

  • Lesson 1: Document Management Capabilities and Features in SharePoint 2010
  • Lesson 2: Records Management in SharePoint 2010
  • Lesson 3: Governing Content Types, Policies, and Taxonomy Services in SharePoint 2010

Composite Solutions in SharePoint 2010

  • Lesson 1: Business Connectivity Services in SharePoint 2010 and Office 2010

Communities in SharePoint 2010

  • Lesson 1: Using Social Capabilities in SharePoint 2010

Business Intelligence in SharePoint 2010

  • Lesson 1: Business Intelligence Features in SharePoint 2010

SharePoint Online Overview

  • Lesson 1: SharePoint Online Overview

SharePoint Documentation

When I meet customers I get a lot of queries regarding some of the implementations and nuances. Trust me almost 80-90% of the time it is the official documentation site that gives me the answer and not the internal distribution lists. The following top-level link is for the SharePoint Tech Center on TechNet:

Microsoft SharePoint Server 2010

SharePoint Online Forums

Microsoft maintains an active community of SharePoint professionals who regularly post questions, answers, tips, and general information related to SharePoint. This is also an place where most of the best MVP’s and the support engineers hang around to help customers, partners and enthusiasts who work on SharePoint. This is an excellent way to become familiar with the professionals in the SharePoint community around the world, ask your own questions, and learn more about SharePoint:

SharePoint 2010 Forums

Microsoft SharePoint Certification

Microsoft offers several certification tests related to SharePoint 2010.  These tests contribute to the certifications listed under the “Credit Toward Certification” section listed for each test below:

Exam 70-667: TS: Microsoft SharePoint 2010, Configuring

The minimally qualified candidate typically:

  1. Is an IT administrator who implements and maintains SharePoint Online or an on-premise deployment of SharePoint 2010 Service Pack 1.
  2. Is proficient with IIS 7.0, DNS, Active Directory Domain Services, and Microsoft SQL Server 2008 as these technologies relate to SharePoint.
  3. Is proficient with the infrastructure and security of Windows Server 2008 or later.
  4. Has experience with business operations for IT, including data backup, restoration, and high availability.
  5. Has experience with Windows PowerShell 2.0 and command-line administration.
  6. Has a basic understanding of single sign-on and Active Directory Federation Services 2.0.

Exam 70-668: PRO: Microsoft SharePoint 2010, Administrator

Candidates typically plan, design, and maintain:

  1. Physical topologies and services architecture
  2. Disaster recovery (backup and restore) and availability
  3. Infrastructure capacity (users, licenses, and topology)
  4. Farm performance and availability
  5. Migration, coexistence, and upgrade  
  6. Security and compliance requirements
  7. Information architecture (interprets taxonomy)
  8. Information search strategy integration with other data sources (LOB, third-party products)
  9. Client application services deployment

Exam 77-866: SharePoint 2010

Candidates for this exam are users who provide structure for information, extend out-of-the-box site features, solve business problems through composite applications, and facilitate collaboration with other site users. Users perform all site user tasks. They optimize Web Part pages for team use by adding and configuring Web Parts from the Web Part gallery. They customize dashboards to target the information presented. Users focus on adapting SharePoint sites to their teams’ needs and improving productivity.

Exam 70-573: TS: Microsoft SharePoint 2010, Application Development

A Microsoft Certified Technology Specialist (MCTS) in Microsoft SharePoint 2010, Application Development should be able to perform the following tasks:

  1. Write code that extends SharePoint 2010
  2. Add and support code to an existing project
  3. Write code for and test custom features in a SharePoint solution such as a Visual Web Part or Event Receiver
  4. Implement a solution designed by lead SharePoint Developer

Exam 70-576: PRO: Designing and Developing Microsoft SharePoint 2010 Applications

The candidate is responsible for designing custom code for projects that are deployed to SharePoint servers. This includes technology selection across the many ways to build code in SharePoint, ensuring the team development environment is configured, creating a strategy for code deployment, versioning, configuration, or structure. The candidate also leads a team of SharePoint developers, has at least two years of SharePoint development experience, has at least three years of ASP.NET development experience

More Training Locations to Bookmark

These are few more locations that are worth to book are:

Introductory Developer Training for SharePoint 2010

SharePoint 2010 Developer Training Course

Developer Overview: video that shows some of the great new features for building custom applications and components in SharePoint 2010.

If you are Upgrading from SharePoint 2007:SharePoint 2010 Upgrade Resource Center.

To setup the environment on your machines: setting up the development environment for SharePoint 2010.

SharePoint 2010 101 Code Samples – Great download to learn the tricks

SharePoint 2010 Advanced Developer Training – Another set of videos to look for.

Finally, the Microsoft Certified Master certification also will be available for SharePoint Server 2010. For this certification, you must attend the training program and complete three weekly exams and a qualifying lab exam.

Hope you will find these set of links and resources useful and will bookmark for future reference. Please drop a line if you would like to see more of such consolidated lists of links from my useful links sections :).

Continue reading...


Characteristics of good leader June 15th, 2012

Vinod Kumar

When I wrote the post around – “I am not a Manager, I am a Leader” I got some great inputs from my friends and there were more questions. These were around what defines a successful leader and what are the qualities on a good leader. In this blog post, let me take a different set of list that defines qualities of a good leader. I know the performance review cycles are over for many companies and hence this list will be interesting share :).

Leadership is the art of getting someone else to do something you want done because he wants to do it – Dwight Eisenhower

Words that define Leadership

These are not exhaustive list got from encyclopedia but are some words that typically get defined in my opinion (in no particular order) –

  • passion
  • humility
  • courage
  • discipline
  • risk-taking
  • vision
  • commitment
  • compassion
  • big dreams
  • faith-filled
  • tenacity
  • authenticity
  • faith
  • grace
  • perseverance
  • sacrifice
  • clarity of purpose
  • empowerment
  • forward thinking
  • humor
  • followers
  • service
  • patience
  • understanding team’s strengths
  • partnership
  • dedication
  • wisdom
  • strategic thinking
  • ability to forgive
  • ability to grow

Go as far as you can see; when you get there, you’ll be able to see farther – J. P. Morgan

Though my other post talks at length what I look specifically as differences with manager. Here are some more dope what I felt are critical for any leader.

  1. Sharing with the organization – One of the critical trait I feel is the ability to share with the masses and not leave things to speculation. There needs to be clarity of purpose delivered with clarity of thoughts via effective communication.
  2. People come first – every leader knows that the fundamental building block of any organization is their people. Recognizing people and developing the next level of leaders within by sharing is an important trait of a great leader.
  3. Create positive impact on people – Being able to influence and motivate others in making a difference in their lives is one is critical. The key to successful leadership today is influence, not authority.
  4. Know their limitations – a good leader knows their limitation and gets the right people on the job to get things done. Recognizing their limitation and finding someone is their strength.
  5. Value others Success – a hallmark of a great leader is to make people around them successful and in-return become successful in their pursuit to reach their vision / dreams.
  6. Student at heart and always helping – This is one quality I look out for in any leader. Good leaders have a heart of service, not necessarily for personal gains.
  7. Visionary – A good leader has an appetite for the question – “What’s Next”. They have a vision and a roadmap to reach there too. They are not day dreamers, but are real visionaries in their dreams to get there.

As we look ahead into the next century, leaders will be those who empower others – Bill Gates

I know the list of words are not complete. So please make sure to add your list of words that you feel are best suited for a successful leadership skill. It is one of the best ways we can learn from each other.

Continue reading...