Questions tagged [senddbmail]
11 questions
5
votes
1 answer
SQL Server Long Running Transaction - WAITFOR(RECEIVE conversation....DatabaseMail)
I have recently implemented an Agent Job which checks SQL Server every 10mins for any long running queries and if detected it will send out a mail to recipients with the information. However since putting this in, I notice alot of the below query…
rdbmsNoob
- 459
- 9
- 30
1
vote
2 answers
Prevent users from sending an email attachment in sql server
In SQL Server, I want to restrict all users (except a few specific users) to send an email with attachment.
For example, someone import data into excel file and send it via mail using the sp_send_dbmail procedure.
Can we restrict use of this…
Farid Zahidov
- 41
- 5
1
vote
1 answer
sp_send_dbmail: Failing When Adding Attachment
I have a simple script that should send an attachment using send_dbmail. It works when I exclude the attachment or send a very small file, e.g. 5KB. The prod file I want to send is 280KB.
Exec msdb.dbo.sp_send_dbmail
@profile_name =…
Stockburn
- 501
- 4
- 22
0
votes
0 answers
Database Mail Unsent
We had to rebuild our SQL server instance over this week and have restored every database including Master and other system settings, but our database mail does not seem to be working.
All of the queued emails are sitting in Unsent and the mail…
bShaver
- 1
- 1
0
votes
0 answers
In SQL Server database mail is not working
Database mail is not working:
Below Error while sending a test mail
Mail not queued. Database Mail is stopped. Use sysmail_start_sp to start Database Mail. (Microsoft SQL Server, Error: 14641)
Checked all the settings of the service broker and…
Ajith Kumar M
- 1
- 1
0
votes
0 answers
Cannot send mail through SQL Server sp_send_dbmail. Certificate error
Below is the error message I see in windows event log. No errors while executing sp_send_dbmail
Exception Information
===================
Exception Type: Microsoft.SqlServer.Management.SqlIMail.Server.Common.BaseException
Message: There was an…
mk SQL
- 5
- 2
0
votes
0 answers
enable job results in a sp_send_dbmail error
On one of our production servers (SQL SERVER 2017 Enterprise) I get the following error whenever I right click and enable a Job in the SQL Server Agent:
Alter failed for Job 'My Job'. (Microsoft.SqlServer.Smo)
...
At least one of the following…
Lumpy
- 2,129
- 9
- 34
- 43
0
votes
1 answer
SQL Server Management Send Mail as Part of a Job
I have a SQL Job that I would like to send an email through, but for some reason I can't get any details on why the email is not sending. This code works as expected when executed in the query window, and SQL Server Agent will also send error emails…
Danchat
- 3
- 3
0
votes
0 answers
How send email with "execute as user"
I need that all my system users can send email from the DB.
not to assign everyone the role in the msdb database I created one login/user "send_mail", and grant permission on msdb db, specifically DatabaseMailUserRole.
I need that all my users send…
Diego Flores
- 459
- 2
- 7
- 15
-1
votes
1 answer
How to report on how many emails have been sent by sql server for a given period of time?
Is there a good way to determine how many emails have been sent by sql server (sql notifications + invocations of sp_send_dbmail by applications) for a given period of time? Need this info for billing discussions.
SQL Server 2014
user2368632
- 1,133
- 1
- 15
- 33
-2
votes
3 answers
Automate SQL Server reports and send them by mail
I work in a large retail business with a decent SQL Server environment.
We have SQL Server replication, Availability Groups, Data warehouse, and some cloud services. In this beautiful environment, we use desktop applications with limited features.…
magdi
- 45
- 2
- 8