June 22, 2016 at 10:10 am
I am getting an file is invalid with both the server and local drives.
I have tried it with and without the declare and set. Not sure what I am doing
wrong in this SSIS package.
DECLARE @attach nvarchar(50)
--SET @attach = '\\Server\D$\Temp\ShipCompBrand.xlsx'
SET @attach = 'C:\Temp\ShipCompBrand.xlsx'
EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'Sql2008_Email_Profile',
@recipients = 'jjoseph@pabst.com',
@body = 'Test Attachment',
@file_attachments = @attach
June 22, 2016 at 11:01 am
What size is the file? Compare it to the max file size when you run this command
EXEC msdb.dbo.sysmail_help_configure_sp ;
Does the user the SQL Services is running under have access to thefolder?
June 22, 2016 at 11:23 am
Yes the user has permissions to the drive directory.
MaxFileSize1000000Default maximum file size
File Size only 12KB
June 23, 2016 at 2:29 am
Which version of SSIS are you using?
The information posted at this URL might help you to resolve the issue:
June 23, 2016 at 4:47 am
This sounds like a permissions error - is there an error code?
I would check:
- Does the user account running the package have access to the mail profile
- Does the sql server engine account have access to the file
Is there a real need to do this using a SQL task? Can you not do it using a send mail task?
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply