Notify Operator Task


The notify operator task sends notification messages to sql server agent operators. A sql server agent operator is an alias for a person or group that can receive electronic notifications. Notify operator task works with sql server agent operator. Server agent operators are persons or groups who receive electronic notifications. So if you want to inform person/group with email, you can define operators in sql server agent.

Step 1:

Open ssms, connect to database engine.


Step 2:

 Under management, double click on database mail.




Step 3:

In the select configuration task, choose manage database mail accounts and profiles. Click next


Step 4:

In the manage profiles and accounts step, choose create a new account option, and click next


Step 5:

In the new account step, enter an account name. Then enter e-mail address with a smtp account,display name, reply e-mail and smtp server name.in smtp authentication, choose basic authentication, enter username and password.


Step 6:

Click on finish




In the next step finish the wizard.

Step 7:

In the ssms double click on database mail under management again,and choose manage database mail account and profile, click next. In the manage profiles and accounts step, choose create a new profile


Step 8:

Create a new profile


Step 9:

In the new profile step, enter profile name and add the account you've created in previous steps.


Step 10:

Click on finish




Step 11:
In the ssms, right click on sql server agent and select properties.
Note that sql server agent service should be started.
Step 12:
In sql server agent properties, go to alert system.
 Step 13:

In the mail session, check the enable mail profile, set mail system with database mail, and choose mail profile also. And then click ok.




Step 14:
After enabling mail profile in sql server agent, you should restart the service.
So right click on sql server agent and choose restart.

In this step we will create an operator;

Step 15:
Under sql server agent, right click on operator’s folder, and choose new operator.
Step 16:

In the new operator properties, enter a name and in the e-mail name write email address of person or group, and then click ok. Note that we don't use net send address or pager e-mail address name because they will be discontinued in next versions of sql server.



Step 17:

Drag and drop notify operator task from maintenance plans tasks into the control flow.


Step 18:

Notify mail task is simple to use task, just setup a connection to server. Then choose the operators to notify, enter the subject and body of message.

Step 19:

Click on view T-SQL


Step 20:

Execute a task


Comments

  1. thank you for providing this information .it is very useful to new learners

    ReplyDelete
  2. Nice and good article. It is very useful for me to learn and understand easily. Thanks for sharing
    Best Msbi Online Training
    Msbi Online Training in Hyderabad

    ReplyDelete

Post a Comment

Hi User,
Thanks for visiting My Blog and please provide your valuable feedback and subscribe for more updates. Please don't post any spam content or comments.
Thank You

Popular Posts

Failed to execute the package or element. Build errors were encountered

Restore of database 'DataBase_Name' failed. (Microsoft.SqlServer.Management.RelationalEngineTasks)

Cannot convert "Column" between a unicode and a non-unicode string data types in SSIS