Monthly Archives: December 2009

I would love to announce that I’ll be speaking at SharePoint Saturday EMEA on January 23rd, 2010. I’ll be co-presenting “Implementing Multi-Lingual Solutions on SharePoint 2010” with my colleague, friend and mentor Marwan Tarek. I’m really happy and proud to have my name along with those highly visible names in the SharePoint community.

I’m a real fan of SharePoint 2010 composites, so since the beta version came out, I have been playing a lot with most of the features of BCS, SharePoint Designer 2010 Reusable workflows, Access Services and others.

While I was preparing a demo about BCS and External Lists for Egypt SharePoint User group, I noticed that you cannot associate workflows to SharePoint external lists. I double checked that with some Microsoft guys and I reached to a conclusion that SharePoint 2010 External lists doesn’t support the automatic triggering of Workflows however using custom actions ( which could by easily created now using SharePoint Designer 2010) can do the trick, in other words, clicking a button on the ribbon on an external list and triggering a workflow could be a workaround.

What if you in a real need to automatically trigger workflows for external data ? you can create a SharePoint list with external data columns and treat your list as any native SharePoint list. However, be informed that External data is a little bit different from external lists in the way it’s only copy of the external data but you can always refresh it manually.

I would also like to highlight another feature, you can now author SharePoint workflows that access external data through external lists or external data columns. Brilliant!

Remember my post “Five reasons not to directly query SharePoint databases” ? I have cautioned you more than once throughout it NOT to directly query SharePoint databases and I have mentioned its disadvantages and problems. If you haven’t read this post, I would encourage you to do that before carrying on.

I’m not contradicting myself! The first post was all about SharePoint 2007 but now I’m talking about the new and the amazing 2010 version of SharePoint.

So you might be asking “What the hell is SharePoint Logging Database?” Good question!

To answer you, please fire up the SQL Management Studio, and expand your databases. You’ll notice a new one named WSS_Logging.

SharePoint 2010 keeps tracks of everything it does by logging into the WSS_Logging Database. It aggregates all of the raw logging data accumulated in the text files under the 14 hive and imports it into this wonderful logging database. This is the ONLY database in SharePoint that Microsoft will be happy to let the developers directly read, query and build reports against it. There is a bunch of useful views at your disposal, the one that I will show you now is the “RequestUsage” View.

Every time a user visit generates a page request, a record is inserted into one of the partitioned tables in this database and the “RequestUsage” view is kind enough to union all the data in the partitioned tables and presents it to you to consume in your custom solutions (Web Parts, Reports, Application Pages,…). An example is shown below :

Let’s dive a little bit deeper to see what happens behind the scenes and where this data come from.

3) Did you notice the “Log Collection Schedule” section ? This implies that there is a timer job that collects the log files located under the 14 hive and copies the events you specify into your logging database which can be employed later for reporting purposes. You can even schedule this timer job based on the load patterns of your server as you will see in the next step.

4) I have opened up my favorite troubleshooting tool ( SharePoint Manager) 2010) to track this job. As you can see in the figure below, I have configured the “Microsoft SharePoint Foundation Usage Data Import” job from the central administration to run every minute.

5) Out of curiosity, I have decided to use .NET Reflector to check out how this timer job works, I have noticed two things.

The first one is that the Job lock type specified in the constructor is SPJobLockType.None which instructs the Timer Service to run this job on all the Web Front Ends in the farm, this makes sense!

The difference between the Job and the None LockTypes is that the Job LockType ensures that the timer job only runs on one server but the None ensures that the job runs on every server.

“You will probably need to execute your timer jobs outside of their scheduled times when you are developing, troubleshooting, or testing your custom timer jobs. Unhappily, this is not possible from Central Administration, but you can work around that using the SharePoint object model”

Of course this was all about SharePoint 2007 but NOW in SharePoint 2010, Microsoft has made it easier for us, you can directly force the execution of any timer job by just pressing a button! Awesome!

“People who suffered from this limitation in SharePoint 2007 will really appreciate this…

Last Saturday, I was happy to deliver another SharePoint 2010 talk for Egypt SharePoint User Group members. My session, titled “Data-Centric Composites (Mashups) in SharePoint 2010), focused on the following topics:

Egypt SharePoint User Group is glad to invite you to its December 2009 Gathering which will be held on Saturday, Dec 19th at Microsoft Egypt – Smart Village. This time, we have a valuable speaker that you shouldn’t miss, Mohamed Mosaad(SharePoint PFE, MEA). This is a great opportunity to benefit from his expertise in MOSS 2007 installations and implementations.

Mohamed Yehia has been diligently working in the development of enterprise solutions using Microsoft SharePoint technologies including SharePoint Portal 2003, MOSS 2007 and currently 2010. Mohamed is a Technical Architect and is Microsoft Certified Professional since 2001, MCSD, MCAD and MCTS Charter Member in SharePoint technologies. He participated in a lot of Events for CuttingEdge Club and Egypt SharePoint User Group. Twitter : @mohdyehia

Ayman El-Hattab: is a SharePoint Developer, Speaker and author. He is a Microsoft Certified Solution Developer as well as a Microsoft Certified Technology Specialist in SharePoint configuration and development. Ayman writes articles about topics in relation to SharePoint and related technologies for online magazines, publicly speaks for numerous user groups and offline communities, organizes events and conferences for EGYSUG, founder of SharePoint4Arabs.com and you will always find him active at MSDN forums and on Twitter @aymanelhattab