<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SQL Job &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/sql-job/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dbrnd.com</link>
	<description>BIGData &#124; NoSQL &#124; MSSQL &#124; MySQL &#124; PostgreSQL</description>
	<lastBuildDate>Thu, 26 Apr 2018 19:13:35 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.6</generator>
	<item>
		<title>MySQL: How to create a SQL Job or Event Scheduler for scheduling the Database Task</title>
		<link>https://www.dbrnd.com/2016/11/mysql-how-to-create-a-sql-job-or-event-scheduler-for-scheduling-the-database-task-to-execute-automatically/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Thu, 17 Nov 2016 18:28:12 +0000</pubDate>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[Event Scheduler]]></category>
		<category><![CDATA[event_scheduler]]></category>
		<category><![CDATA[MySQL Command]]></category>
		<category><![CDATA[MySQL Database Administrator]]></category>
		<category><![CDATA[MySQL Database Designing]]></category>
		<category><![CDATA[MySQL Database Programming]]></category>
		<category><![CDATA[MySQL Error]]></category>
		<category><![CDATA[MySQL Performance Tunning]]></category>
		<category><![CDATA[MySQL Query]]></category>
		<category><![CDATA[MySQL Tips and Tricks]]></category>
		<category><![CDATA[Schedule Database Task]]></category>
		<category><![CDATA[SQL Job]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=3864</guid>

					<description><![CDATA[In this post, I am sharing one of important and basic article about, How to create a SQL Job or scheduler in the MySQL Database Server. For scheduling the database tasks are very common exercise for all Database Developers and Database Administrators. The SQL Agent is available in SQL Server and The PG Agent is [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F11%2Fmysql-how-to-create-a-sql-job-or-event-scheduler-for-scheduling-the-database-task-to-execute-automatically%2F&amp;linkname=MySQL%3A%20How%20to%20create%20a%20SQL%20Job%20or%20Event%20Scheduler%20for%20scheduling%20the%20Database%20Task" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F11%2Fmysql-how-to-create-a-sql-job-or-event-scheduler-for-scheduling-the-database-task-to-execute-automatically%2F&amp;linkname=MySQL%3A%20How%20to%20create%20a%20SQL%20Job%20or%20Event%20Scheduler%20for%20scheduling%20the%20Database%20Task" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F11%2Fmysql-how-to-create-a-sql-job-or-event-scheduler-for-scheduling-the-database-task-to-execute-automatically%2F&amp;linkname=MySQL%3A%20How%20to%20create%20a%20SQL%20Job%20or%20Event%20Scheduler%20for%20scheduling%20the%20Database%20Task" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F11%2Fmysql-how-to-create-a-sql-job-or-event-scheduler-for-scheduling-the-database-task-to-execute-automatically%2F&amp;linkname=MySQL%3A%20How%20to%20create%20a%20SQL%20Job%20or%20Event%20Scheduler%20for%20scheduling%20the%20Database%20Task" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F11%2Fmysql-how-to-create-a-sql-job-or-event-scheduler-for-scheduling-the-database-task-to-execute-automatically%2F&amp;linkname=MySQL%3A%20How%20to%20create%20a%20SQL%20Job%20or%20Event%20Scheduler%20for%20scheduling%20the%20Database%20Task" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F11%2Fmysql-how-to-create-a-sql-job-or-event-scheduler-for-scheduling-the-database-task-to-execute-automatically%2F&amp;linkname=MySQL%3A%20How%20to%20create%20a%20SQL%20Job%20or%20Event%20Scheduler%20for%20scheduling%20the%20Database%20Task" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F11%2Fmysql-how-to-create-a-sql-job-or-event-scheduler-for-scheduling-the-database-task-to-execute-automatically%2F&#038;title=MySQL%3A%20How%20to%20create%20a%20SQL%20Job%20or%20Event%20Scheduler%20for%20scheduling%20the%20Database%20Task" data-a2a-url="https://www.dbrnd.com/2016/11/mysql-how-to-create-a-sql-job-or-event-scheduler-for-scheduling-the-database-task-to-execute-automatically/" data-a2a-title="MySQL: How to create a SQL Job or Event Scheduler for scheduling the Database Task"></a></p><p>In this post, I am sharing one of important and basic article about, How to create a SQL Job or scheduler in the MySQL Database Server.</p>
<blockquote><p>For scheduling the database tasks are very common exercise for all Database Developers and Database Administrators.</p></blockquote>
<p>The SQL Agent is available in SQL Server and The PG Agent is available in PostgreSQL.<img fetchpriority="high" decoding="async" class="wp-image-3867 size-medium alignright" title="mysql event scheduler sql job" src="https://www.dbrnd.com/wp-content/uploads/2016/11/MySQLEventSchedulerSQLJob-300x300.png" alt="mysqleventschedulersqljob" width="300" height="300" /></p>
<blockquote><p>If you want to schedule your database task in MySQL, You should use default Event Scheduler of MySQL Database Server.</p></blockquote>
<blockquote><p>You can define event using CREATE EVENT statement and It requires the EVENT privilege for the schema in which the event is to be created.</p></blockquote>
<blockquote><p>It might also require the SUPER privilege.</p></blockquote>
<p>You can access below full demonstration step by step.</p>
<p><strong>Create a sample table:<br />
</strong><br />
<pre class="crayon-plain-tag">CREATE TABLE tbl_Students 
(
	StudID INT 
    ,StudName VARCHAR(50)
);</pre>
<strong>Check the status of Event Variable:<br />
</strong><br />
<pre class="crayon-plain-tag">SET GLOBAL event_scheduler = ON;</pre>
<strong>If it is not enabled, enable it:</strong><br />
<pre class="crayon-plain-tag">SET GLOBAL event_scheduler = ON;</pre>
<strong>Check the running processes:</strong><br />
<pre class="crayon-plain-tag">SHOW PROCESSLIST;
-- event_scheduler User is running under command "Daemon"</pre>
<strong>Create an event to insert in tbl_Students at every minute:<br />
</strong><br />
<pre class="crayon-plain-tag">CREATE EVENT Eve_tbl_Students_Temp_Insert
ON SCHEDULE EVERY 1 MINUTE
DO
  INSERT INTO tbl_Students 
  VALUES (1,'Anvesh');</pre>
<strong>Create one more event to test the Delete operation:<br />
</strong><br />
<pre class="crayon-plain-tag">CREATE EVENT Eve_tbl_Students_Temp_Delete
ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 MINUTE
DO
  DELETE FROM tbl_Students;</pre>
<strong>You can also alter the created events:<br />
</strong><br />
<pre class="crayon-plain-tag">ALTER EVENT Eve_tbl_Students_Temp_Insert ON SCHEDULE EVERY 2 MINUTE;</pre>
<strong>You can also disable the events:</strong><br />
<pre class="crayon-plain-tag">ALTER EVENT Eve_tbl_Students_Temp_Insert DISABLE; 
ALTER EVENT Eve_tbl_Students_Temp_Delete DISABLE;</pre>
<strong>You can also drop the events:</strong><br />
<pre class="crayon-plain-tag">DROP EVENT Eve_tbl_Students_Temp_Insert;
DROP EVENT Eve_tbl_Students_Temp_Delete;</pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>SQL Server: Important System Tables for Alerts, SQL Jobs, Operators</title>
		<link>https://www.dbrnd.com/2016/05/sql-server-important-system-tables-for-alerts-sql-jobs-operators/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Fri, 13 May 2016 20:14:37 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server DBA Script]]></category>
		<category><![CDATA[Alert]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[Operator]]></category>
		<category><![CDATA[SQL Job]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tunning]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=2786</guid>

					<description><![CDATA[In this post, I am sharing a list of important system tables to find information about the SQL Server Agent. These system tables are very useful for a Database Administrator to find out different information about the SQL Job, Alerts and Operators. The MSDB contains all SQL Server Agent information in the following tables. Stores [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F05%2Fsql-server-important-system-tables-for-alerts-sql-jobs-operators%2F&amp;linkname=SQL%20Server%3A%20Important%20System%20Tables%20for%20Alerts%2C%20SQL%20Jobs%2C%20Operators" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F05%2Fsql-server-important-system-tables-for-alerts-sql-jobs-operators%2F&amp;linkname=SQL%20Server%3A%20Important%20System%20Tables%20for%20Alerts%2C%20SQL%20Jobs%2C%20Operators" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F05%2Fsql-server-important-system-tables-for-alerts-sql-jobs-operators%2F&amp;linkname=SQL%20Server%3A%20Important%20System%20Tables%20for%20Alerts%2C%20SQL%20Jobs%2C%20Operators" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F05%2Fsql-server-important-system-tables-for-alerts-sql-jobs-operators%2F&amp;linkname=SQL%20Server%3A%20Important%20System%20Tables%20for%20Alerts%2C%20SQL%20Jobs%2C%20Operators" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F05%2Fsql-server-important-system-tables-for-alerts-sql-jobs-operators%2F&amp;linkname=SQL%20Server%3A%20Important%20System%20Tables%20for%20Alerts%2C%20SQL%20Jobs%2C%20Operators" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F05%2Fsql-server-important-system-tables-for-alerts-sql-jobs-operators%2F&amp;linkname=SQL%20Server%3A%20Important%20System%20Tables%20for%20Alerts%2C%20SQL%20Jobs%2C%20Operators" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F05%2Fsql-server-important-system-tables-for-alerts-sql-jobs-operators%2F&#038;title=SQL%20Server%3A%20Important%20System%20Tables%20for%20Alerts%2C%20SQL%20Jobs%2C%20Operators" data-a2a-url="https://www.dbrnd.com/2016/05/sql-server-important-system-tables-for-alerts-sql-jobs-operators/" data-a2a-title="SQL Server: Important System Tables for Alerts, SQL Jobs, Operators"></a></p><p>In this post, I am sharing a list of important system tables to find information about the SQL Server Agent. </p>
<p>These system tables are very useful for a Database Administrator to find out different information about the SQL Job, Alerts and Operators. </p>
<p>The MSDB contains all SQL Server Agent information in the following tables. </p>
<p><strong>Stores information about the alerts:</strong></p>
<pre class="crayon-plain-tag">SELECT *FROM msdb.dbo.sysalerts</pre> </p>
<p><strong>Stores information about current SQL Server Agent job activity and status:</strong></p>
<pre class="crayon-plain-tag">SELECT *FROM msdb.dbo.sysjobactivity</pre> </p>
<p><strong>Stores information about the execution of scheduled jobs by SQL Server Agent:</strong></p>
<pre class="crayon-plain-tag">SELECT *FROM msdb.dbo.sysjobhistory</pre> </p>
<p><strong>Stores information for each scheduled job to be executed by SQL Server Agent:</strong></p>
<pre class="crayon-plain-tag">SELECT *FROM msdb.dbo.sysjobs</pre> </p>
<p><strong>Stores schedule information for jobs to be executed by SQL Server Agent:</strong></p>
<pre class="crayon-plain-tag">SELECT *FROM msdb.dbo.sysjobschedules</pre> </p>
<p><strong>Stores information about each step of the jobs:</strong></p>
<pre class="crayon-plain-tag">SELECT *FROM msdb.dbo.sysjobsteps</pre> </p>
<p><strong>Stores information about job step logs:</strong></p>
<pre class="crayon-plain-tag">SELECT *FROM msdb.dbo.sysjobstepslogs</pre> </p>
<p><strong>Stores information about SQL Server Agent operator:</strong></p>
<pre class="crayon-plain-tag">SELECT *FROM msdb.dbo.sysoperators</pre> </p>
<p><strong>Stores information about SQL Server Agent job schedules:</strong></p>
<pre class="crayon-plain-tag">SELECT *FROM msdb.dbo.sysschedules</pre> </p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
