Hi there,
We are having quite a bit of trouble with the report server failing to send emails out using sql database mail.
The report sever creates the pdf files fine and as far as I can tell the permissions on the folder is ok however we get the following error each time which seems to be coming from the database mail component.
Error sending email:
SQLSTATE = 42000
Microsoft OLE DB Provider for SQL Server
C:\impftp\report\SystemTableListing_14032.pdf is not a valid file or the process is unable to access the file.
The report server application runs as the same user account as the SQL server service account with both on the same box. I have tried using a network share and a local path for the reports folder but both have the same issue.
The tessituraservices application pool runs on a different server under the applicationpoolidentity and I have tried allowing the machine account of this server to access the reports folder but the same issue occurs.
Strangely it broke after we moved the live DB to another SQL server but I got it working however it stopped on the weekend and I have no idea why it won't work.
Any help would be much appreciated
Thanks
Mike Cornthwaite
Hi Mike,
We had some similar issues with the report server emails not coming through after we migrated to a new SQL server. Our issue was resolved after enabling the "Named Pipes" in the SQL Server Configuration. Not sure if this applies to your setup?
Regards,
Naga
Hi Naga,
Thanks for the info. I’ve just tried enabling “named pipes” as it needed a restart of SQL but unfortunately it’s had no effect.
Correct me if I’m wrong but the database mail part of SQL connects to network shares as the account that the SQL service is running as?
The error I’m getting is suggesting this account does not have permission to collect the pdf from the folder. At the moment the folder is local to the SQL server so permissions should be simple.
Mike CornthwaiteICT Manager Theatre by the LakeTelephone: 017687 72282Email: mike.cornthwaite@theatrebythelake.comBox Office 017687 74411Web: www.theatrebythelake.com
Theatre by the Lake is the operating name of Cumbria Theatre Trust. A Company Limited by Guarantee. Registered in England No. 1874868. Registered Charity Number 516673.This document is strictly confidential and is intended only for use by the addressee. If you are not the intended recipient, any disclosure, copying, distribution or other action taken in reliance of the information contained in this e-mail is strictly prohibited.Any views expressed by the sender of this message are not necessarily those of Cumbria Theatre Trust. If you have received this transmission in error, please use the reply function to tell us and then permanently delete what you have received.
From: Tessitura Technical Forum [mailto:forums-technical@tessituranetwork.com] On Behalf Of Naga KakarlaSent: 02 September 2014 16:17To: Mike CornthwaiteSubject: Re: [Tessitura Technical Forum] Report Server Problem accessing network share sending email
From: Mike Cornthwaite <bounce-mikecornthwaite4724@tessituranetwork.com>Sent: 9/2/2014 6:33:04 AM
This message was sent automatically to you by www.tessituranetwork.com because you subscribed to the Tessitura Technical Forum. You may reply to this message to post to the Technical forum or visit the site to search, read and post to the forums. In the interest of keeping the forum posts from becoming cluttered, we encourage you to delete previous message text from your reply before sending. Thank you!
Hi Mike
as the report server is on your DB, you aren't accessing via the network, so that takes one headache away. (You probably know this already) If you were, SQL would need to be running as a domain user, and that domain user would need to have read/write file permissions on the unc share/security.
If SQL Engine is running as a windows user, this shouldn't be needed. If SQL is running as a system account; For folder access, take a note of the security (so you can put it back if it makes no difference) in c:\impftp and c:\impftp\report and add Group: EVERYONE to c:\impftp and subfolders.
My last suggestion (which worked for us when we moved servers) is to put a delay in the SP that does the mailing. When we moved to a new server, the process ran too quickly, so the file was still being written to the disk when the SP was trying to mail it out. We ended up changing the SP and *TEMPORARILY* adding an XP_CMDSHELL "dir" on that folder and storing the output in a new table. This showed the file didn't exist yet. I believe we put a 2 or 5 second delay in the stored procedure to give the report server chance to finish writing the file before attempting to mail it.
Hope this is of some use
Wayne
Hi Wayne,
Thanks for the info.
I have tried adding a delay as you recommended but this hasn’t had any effect I’m afraid.
I’ve just tried a couple more times with process monitor and sql profiler both running on the db server (which hosts both the db and report server and pdf pickup folder) and I can see the pdf being created. But when the error appears about the file being invalid or inaccessible process monitor is showing no further activity in the pickup folder so its almost as if the database mailing process is not even trying to collect the file.
I think I will raise a task ticket for this.
Thanks again for your suggestion.
From: Tessitura Technical Forum [mailto:forums-technical@tessituranetwork.com] On Behalf Of Wayne EvansSent: 03 September 2014 10:16To: Mike CornthwaiteSubject: Re: [Tessitura Technical Forum] Report Server Problem accessing network share sending email
My last suggestion (which worked for us when we moved servers) is to put a delay in the SP that does the mailing. When we moved to a new server, the process ran too quickly, so the file was still being written to the disk when the SP was trying to mail it out. We ended up changing the SP and adding an XP_CMDSHELL "dir" on that folder and storing the output in a new table. This showed the file didn't exist yet. I believe we put a 2 or 5 second delay in the stored procedure to give the report server chance to finish writing the file before attempting to mail it.
On the off-chance that this issue is similar to some of the issues I've seen and troubleshooted with the Report server, try the following:
In the Report Server configuration (gsrbatch.ini, or the window in gsrbatch.exe), set Maximum Concurrent Jobs to 1.
In T_DEFAULTS, set EMAIL REPORT DELETE FILE to No.
I haven't the slightest idea why this is the case, but changing EITHER of those settings in our environment causes PDF emails to fail randomly. They've been consistently successful (except one time when the windows print spooler service died*) since I started running that configuration.
Just to remove some other variables, I assume you've tested sending database mail manually? If the file is being written to the folder properly, what happens when you run the sp_send_dbmail (pointing to the file as an attachment) yourself in SSMS? If that fails with the same error, then you know it's a permissions issue.
----
*Print Spooler Service Issue -- By default the recovery options for this service is set to "Take no action" on "subsequent failures". Might be a good idea to set this to "restart the service", else you may find that all of your infomaker reports fail to do PDF email one day because the Sybase Datawindow PS printer has disappeared.
Hi,
We had the same problem here. I followed some of the suggestions listed here, and still got the error.
Right before I was about to pull my hair out, jump out the window, etc., I tried changing the T_DEFAULTS email report path and email attachment path from our t:\attachmentfoldername to \\servername\c$\...\attachmentfoldername.
That worked. I don't know why. I don't know enough about permissions and whatnot to know what's up with our network, that our t_defaults hates our T drive so much. But... another thing one could try, if this problem's encountered.
Hello,
I am having a similar issue with setting up our v12 report server . I wanted to know is there a script that needed to be run on the SQL side that enabled report server emailing to work in v12. I vaguely remember doing this in earlier versions of Tessi.
Jason
JAson