Friday, November 1, 2013

Deleted stored procedure from MS SQL!

Do not panic, as there are 2 ways to retrieve your precious stored procedure:


1) Recover them from the dblog table

SELECT
[cp].[refcounts],
[cp].[usecounts],
[cp].[objtype],
[st].[dbid],
[st].[objectid],
[st].[text],
[qp].[query_plan]
FROM
sys.dm_exec_cached_plans cp
CROSS
APPLY sys.dm_exec_sql_text ( cp.plan_handle ) st
CROSS
APPLY sys.dm_exec_query_plan ( cp.plan_handle ) qp 
where [st].[text] like '%__AUDIT%'

Select Convert(varchar(Max),Substring([RowLog Contents 0]
,33
,LEN([RowLog Contents 0]))) as [Script]
from fn_dblog(NULL,NULL)
Where [Operation]='LOP_DELETE_ROWS' And [Context]='LCX_MARK_AS_GHOST'
And [AllocUnitName]='sys.sysobjvalues.clst'

2) Recover them from cached database plan

SELECT
[cp].[refcounts],
[cp].[usecounts],
[cp].[objtype],
[st].[dbid],
[st].[objectid],
[st].[text],
[qp].[query_plan]
FROM
sys.dm_exec_cached_plans cp
CROSS
APPLY sys.dm_exec_sql_text ( cp.plan_handle ) st
CROSS
APPLY sys.dm_exec_query_plan ( cp.plan_handle ) qp ;


Tuesday, June 18, 2013

Unofficial pulse app finally arrives on Windows Phone

After many sleepless nights, i've finally completed the app and got approved by Microsoft. It was a pain to be rejected twice, first due to my negligence (i forgot to assign the app icon), second time was due to copyright issues (i've used the windows logo in the icon).

But nonetheless, it's approved and finally live in the app store now. You can download it here



Several roadblocks hit me, due to some Windows Phone Toolkit updates, LongListSelector are now officially part of Phone.Controls, microsoft had finally made it part of the official controls.

I was using the old toolkit and had several problems in maintaining the memory foot print low. My device was a Lumia 620 and was capped with a 180mb memory limit. After days of OutOfMemory exceptions, i've customised HubTiles so much that it no longer look and behaves like the original. I had to reduce the number of controls within HubTiles, take out different animations such as flip and rotate.

I was able to support both wp7 and wp8, until the new control came out with so much feature that i didn't have to code manually is luring me to ditch wp7. And so i did, i decided to support wp8 only and have the new LayoutMode="Grid" and virtualizing capabilities built-in. Now the app is able to load hundreds of hubtiles in a panoraitem without any hiccups.

The old version can only load like 50 tiles at max, before crashing due to the memory pressure. I've incoporated a feedback channel within the app and hope that with user's feedback, i can improve the app further and let the Windows Phone community have what they deserve (A rich appstore)

Monday, May 20, 2013

My first windows phone 8 app - SG News Cloud services Part 2

I've managed to garner good feedbacks and input from many helpful people and i'm preparing for a version 2.1 release, i'm still tinkering with the nitty gritty, but you can have a preview over here

A lot of brain cracking went into making all these happen. My first challenge was to work with the XAML mark up.


  1. Somehow my sampledatamodel couldn't display everything during design-time, so i had to debug, tweak, debug, tweak over and over again. 
  2. Fonts installation was quirky as well, but luckily i've managed to get the custom fonts working by using Expression Blend. 
  3. But i've used a converter, but visual studio kept prompting an error: Invalid XAML, after lots of frustration, i found someone saying that it's due to the space that i've put in my project name. No big deal for now, since visual studio designer wasn't helping me much, luckily it works on the devices & emulators
Comment below if you would like to know more about my app

My first windows phone 8 app - SG News Cloud services Part 2

I've

Tuesday, May 14, 2013

Yahoo Weather on iOS is beautiful

So i decided to try and make 1 using HTML & JS, take a look here: http://murugaratham.appspot.com/

Not much time for details, but if you are interested in getting involved, do drop me a comment/mail.