Dec 6, 2011

Best Practice for deleting large records from a table

Request Timed out for Large Table records delaetion.
Even sometime it sayes Transaction Logs Full, or sometime Memory Issues...
So here i get the Best Practice for deleting large records from a table...

WHILE (SELECT COUNT(*) FROM <table name> WHERE [Filter Condition] > 0
BEGIN
DELETE TOP 10 FROM <table name> WHERE [Filter Condition]
END


Oct 11, 2011

Debug (F5) Global.asax.cs Application_Start() Method

Many Times we need to debug the Application_Start on server where we can not debug with Visual Studio IDE, instead we use CLR Debugger. So debugging on Global.asax.cs is deifficult as you need to attach the W3WP process, but it starts only when your application get a first hit, and so Application_Start code already executed. So how we can debug ??

So I was reading few discussion over mail thread when I came across this wonderful ideas.

(Hey Guys accept my thanks and from others as well [who read this ] for your good debugging tricks.)

 
So here we goes -
  1. Put delay in Application_Start Methods first Line as approx. you need to attach the debugger.
  2. #if DEBUG

                       if(ApplicationSetting("DebugStartup"))

               System.Diagnostics.Debugger.Break();

           

Aug 18, 2011

Info about Lokpal

As Received!

See how Lokpal Bill can curb the politicians, Circulate it to create awareness

    

Existing System

System Proposed by civil society

No politician or senior officer ever goes to jail despite huge evidence because Anti Corruption Branch (ACB) and CBI directly come under the government. Before starting investigation or initiating prosecution in any case, they have to take permission from the same bosses, against whom the case has to be investigated.

Lokpal at centre and Lokayukta at state level will be independent bodies. ACB and CBI will be merged into these bodies. They will have power to initiate investigations and prosecution against any officer or politician without needing anyone's permission. Investigation should be completed within 1 year and trial to get over in next 1 year. Within two years, the corrupt should go to jail.

No corrupt officer is dismissed from the job because Central Vigilance Commission, which is supposed to dismiss corrupt officers, is only an advisory body. Whenever it advises government to dismiss any senior corrupt officer, its advice is never implemented.

Lokpal and Lokayukta will have complete powers to order dismissal of a corrupt officer. CVC and all departmental vigilance will be merged into Lokpal and state vigilance will be merged into Lokayukta.

No action is taken against corrupt judges because permission is required from the Chief Justice of India to even register an FIR against corrupt judges.

Lokpal & Lokayukta shall have powers to investigate and prosecute any judge without needing anyone's permission.

Nowhere to go - People expose corruption but no action is taken on their complaints.

Lokpal & Lokayukta will have to enquire into and hear every complaint.

There is so much corruption within CBI and vigilance departments. Their functioning is so secret that it encourages corruption within these agencies. 

All investigations in Lokpal & Lokayukta shall be transparent. After completion of investigation, all case records shall be open to public.  Complaint against any staff of Lokpal & Lokayukta shall be enquired and punishment announced within two months.

Weak and corrupt people are appointed as heads of anti-corruption agencies.

Politicians will have absolutely no say in selection of Chairperson and members of Lokpal & Lokayukta. Selections will take place through a transparent and public participatory process.

Citizens face harassment in government offices. Sometimes they are forced to pay bribes. One can only complaint to senior officers. No action is taken on complaints because senior officers also get their cut.

Lokpal & Lokayukta will get public grievances resolved in time bound manner, impose a penalty of Rs 250 per day of delay to be deducted from the salary of guilty officer and award that amount as compensation to the aggrieved citizen.

Nothing in law to recover ill gotten wealth. A corrupt person can come out of jail and enjoy that money.

Loss caused to the government due to corruption will be recovered from all accused.

Small punishment for corruption- Punishment for corruption is minimum 6 months and maximum 7 years.

Enhanced punishment - The punishment would be minimum 5 years and maximum of life imprisonment.