Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Interviews
Quizzes
Home
Quizzes
Interviews New MS SQL Server Interviews:MS SQL Data MiningMS SQL Reporting ServicesMS SQL Server 2008MS SQL Server IndexesMS SQL Server JoinsMS SQL Server OptimizationMS SQL Server ReplicationMS SQL Server ViewsMS SQL Server XML IntegrationSQL Database ConceptsSQL Server ArchitectureSQL Server ConstraintsSQL Server CursorsSQL Server Database AdministratorSQL Server FunctionsSQL Server LocksSQL Server Service BrokerSQL Server TriggersSQL Stored ProceduresSSISTransaction Server
Copyright © 2018. All Rights Reserved
SQL Database Concepts Interview Question:
Do you know how to send email from database?
Submitted by: AdministratorSQL Server has a feature for sending mail. Stored procedures can also be used for sending mail on demand. With SQL Server 2005, MAPI client is not needed for sending mails.
The following is the process for sending emails from database.
- Make sure that the SQL Server Mail account is configured correctly and enable Database Mail.
- Write a script to send an e-mail. The following is the script.
USE [YourDB]
EXEC msdb.dbo.sp_send_dbmail
@recipients = 'xyz@xyz.com; xyz@xyz.com;abc@edf.com'
@body = ' A warm wish for your future endeavor',
@subject = 'This mail was sent using Database Mail' ;
GO
Submitted by: Administrator
The following is the process for sending emails from database.
- Make sure that the SQL Server Mail account is configured correctly and enable Database Mail.
- Write a script to send an e-mail. The following is the script.
USE [YourDB]
EXEC msdb.dbo.sp_send_dbmail
@recipients = 'xyz@xyz.com; xyz@xyz.com;abc@edf.com'
@body = ' A warm wish for your future endeavor',
@subject = 'This mail was sent using Database Mail' ;
GO
Submitted by: Administrator
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.
https://InterviewQuestionsAnswers.ORG.