
Part of the top 1% Stack Overflow answerers in ASP.NET technology.Ĭreated and actively maintain the tech blog while also editing, writing, and researching topics for publication.Įxcellent skills in Application Development using C#/Vb.Net. Provided knowledge and individual mentoring to team members as neededĪmong top 3% overall in terms of contribution on Stack Overflow (~2.3 million people reached my posts). Specialises in problem identification and proposal of alternative solutions. NET frameworkĮxperienced and skilled Agile Developer with a strong record of excellent teamwork, successful coding & project management.
#Gmail autopurge script software#
Microsoft Certified Professional (MCP) with over 12+ years of software industry experience including development, implementation & deployment of applications in the. NET Professional | Microsoft Certified Professional | DZone’s Most Valuable Blogger | Web Developer | Author | Bloggerĭoctorate in Computer Science and Engineering Step VIII: Table data purge job utility log of one the iteration DROP EVENT IF EXISTS OrdersPurgeEvent ĬREATE EVENT IF NOT EXISTS OrdersPurgeEvent Note: Do change Start DateTime to any future value at which you want event to start. Calls the OrdersPurge Stored Procedure.Or, SET GLOBAL event_scheduler = ON Step VII: Create a recurring event in MySQL # DISABLED: This value renders the Event Scheduler nonoperational. # ON: The Event Scheduler is started the event scheduler thread runs and executes all scheduled events. If it is not enabled, then enable it by updating the MySQL my.ini or my.cnf file as shown below: If it is enabled, it will be listed in the output. ', rowsDeleted, ' rows deleted.'),ĮND Step VI: Check & Enable MySQL Event SchedulerĬheck whether the MySQL Event Scheduler is enabled: SHOW PROCESSLIST (concat('Iteration: ', rowCount, ' rows deleted.'), SELECT rowsDeleted as TotalRowsDeleted SET rowsDeleted = rowsDeleted + rowCount OrderDateUtc = minID AND id = minID AND id = minID AND id = minID AND id = minID AND id = minID AND id <= maxIDĪND OrderDateUtc < DATE_SUB(createdDateUtcForIteration, SET createdDateUtcForIteration = UTC_TIMESTAMP() DECLARE minID INT ĭECLARE createdDateUtcForIteration DATETIME

Here, DaysToRetainParam is input parameter & is used to specify duration in days for which we want to retain the data in the orders table.

Step II: Get minimum & maximum value of ‘ID’ (auto-increment column in orders table) satisfying Date range condition (based on DaysToRetainParam) ) ENGINE=InnoDB AUTO_INCREMENT=81 DEFAULT CHARSET=utf8 COLLATE=utf8_bin `Message` varchar(150) COLLATE utf8_bin NOT NULL, Log table to store the purge job/utility logs CREATE TABLE `log` ( Visit this Google Script Link to setup the script on your Gmail account. ) ENGINE=InnoDB AUTO_INCREMENT=112377 DEFAULT CHARSET=utf8 Orders is the table for which we need to create purge job/utility. Step I: Basic Setup (Sample Database/Tables) In this post, I will be sharing my experience of how we can create a recurring event in MySQL to purge/remove the table data. Recently, I was working on creating a utility to purge the table data of MySQL Database.
