The writers of this blog are a part of the Microsoft SQL Server team. We will be blogging about our tools, scripts, webcasts, and miscellaneous tips that will help you get the most out of SQL Server components on Windows Azure Virtual machines

SQL Server Management Studio can be used to create a database backup job to backup an user database. Here are the steps and User interface workflow to create a simple backup job, run the job and view results
1) Create a demo database and insert sample...

This post demonstrates how you can have T-SQL results being sent to you in emails by using SQL Database Mail.
The article here is assumed that a SQL Database Mail profile "MailProfile1' has been created. The MailProfile1 tells Database Mail what account...

Database Mail allows you to attach files in emails. Several examples are provided to show how you can do it.
The article here is assumed that a SQL Database Mail profile "MailProfile1' has been created. The MailProfile1 tells Database Mail what account...

The goal of this post is to show how you can create a schedule and attach an existing job to that schedule.
Create a schedule on an existing job (or create a job as described in a number of previous posts).
1) Open SQL Server Manament Studio (SSMS...

Email is so popular now. Do you also want to send emails from database applications by using T-SQL statements? Do you want to send a result of T-SQL queries directly to some one else? If you do, Database Mail is the solution to fulfill your needs. This...

Usually the content of emails is sent by Database Mail in a plain text. You can change it to HTML format for a richer content. This article demonstrates how to do it.
The article here is assumed that a SQL Database Mail profile "MailProfile1' has been...

To enable email notifications in SQL Agent you will need to follow the following steps:
1. Configure Datbase Mail: create an email SMTP account and corresponding Email Profile. To do so please follow directions outlined in the blog post: "SQL Database...

When any critical error / warning is reported by SQL Server Agent, it is written to a log file MSSQL\Log\SQLAgent.out. By default only critical errors and warnings are reported to this log file. If you would like to see additional information messages...

If you are using SQL 2012 , please take a look at http://blogs.msdn.com/b/sqlagent/archive/2012/04/05/remove-associated-data-collector-jobs-in-sql-2012.aspx
**NOTE**Please use the following script only for testing purpose on TEST systems.
T-SQL...

Issue: In SQL 2012, stored procedures that call any other stored procedures or
extended stored procedures that return result sets should specify WITH RESULT SETS SQL Agent's stored procedure sp_help_job
- returns single resultset if no parameters...

Background:
Database Mirroring in SQL Server is used to increase database availability. You can read more about database mirroring at http://msdn.microsoft.com/en-us/library/ms189852.aspx .
Database can be backed up only on the primary instance...

To prevent anyone from sending arbitrary emails, Database Mail is guarded by the database role DatabaseMailUserRole. Users who are not the member of DatabaseMailUserRole cannot send emails except sysadmin who has all privileges.
For example, an unauthorized...

SQL Agent can be used to perform scheduled backup job to backup a database to a unique file name that is constructed based on the system date. To construct a unique file name, you can use SQL Agent’s token substitution mechanism. You can read more...

In SQL Server 2012 Service Pack 1 few changes were made in Activity Monitor. We had to stop using PerformanceCounterCategory class to get information about number of logical CPUs on the remote machine and switched to using more accurate information available...

Here are the steps to Start SQL Server Agent service using SQL Server Configuration Manager. Using SQL Server Configuration Manager, you can also set Agent Service startup parameters like changing service startup account
1) Launch SQL Server Configuration...

Auditing can be used to track and log events that occur on system. You can read more about auditing here . SQL Agent jobs are added / removed using stored procedure interface sp_add_job and sp_delete_job. Customers have asked us how we could track user...

SQLAGENT.OUT, the log file for SQL Agent, is usually the first place to investigate what could go wrong. However, when SQL Agent cannot start, a new SQLAGENT.OUT even is not generated at all. What should we investigate? If this kind of things happens...

I will explain how to add another step to existing job and configure it correctly.
Let's assume that you already have a job with 1 step (for example as in Sethu's backup job example )
1. Open SSMS (SQL Server Management Studio, make sure that SQL...

In a previous post ( Scheduling Tips and Tricks ) I described how to use TSQL to create a schedule and attach it to an existing job.
In this post, I will describe what are the permissions required to create a job/schedule and attach a job to an existing...

Here is the fix for data collector purge job taking too long to complete. Please let us know if this fix solves your problem. Please send us your feedback to sethu.srinivasan@microsoft.com . I have also attached the query as attachment to this blog entry...

Hello
In SQL Agent logs for SQL Server 2012 you may see following message that appears every 90 seconds: "Reloading agent settings". It's indeed painful behavior from the user perspectives, and we will address this issue in nearest Service Pack for...