Link to home
Create AccountLog in
Avatar of baylar
baylar

asked on

sql mail attach-network -file

This works perfect;

exec msdb.dbo.sp_send_dbmail @profile_name = 'SQLMal'
  , @recipients = 'itmanager@xyz.com'
  , @subject = 'Consistency Checks of DEV'
, @File_Attachments c:\ConsistencyChecks\ConsistencyJobOutput.txt'

But if I want to attach the file(like below) from remote location why does it not like, can anyone please let me know why it does not like remote location, I don’t want to create a network drive.

@File_Attachments =‘\\dev\c$\ConsistencyChecks\ConsistencyJobOutput.txt'
SOLUTION
Avatar of sammySeltzer
sammySeltzer
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER CERTIFIED SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Both answers in the thread indicates that author had the problem with the permissions.
Both answers in the thread indicates that author had the problem with the permissions.
I totally agree with dwkor. These poster get ideas from experts and come and say, "I resolved my own problem" when infact they did with experts help.

In case, it was a permission issue which was sugested for him.