locked
Copying a file and send to a mail box throgh job RRS feed

  • Question

  • I have created a job which queries a table and send the results to a mail box and i have a new requirement to create a job which has to pick a file from a shared location and send to a mail box.

    Can anyone throw light how to copy a file  and send to a mail box through a job.

    • Moved by Tom Phillips Thursday, June 9, 2011 1:47 PM TSQL question (From:SQL Server Database Engine)
    Wednesday, June 8, 2011 4:16 PM

Answers

  • Did you try [@file_attachments  of EXEC sp_send_dbmail ? Read about Database Mail in SQL Server

    MCITP, MCTS, MCDBA,MCP-- Blog : http://experiencing-sql-server-2008.blogspot.com/
    Wednesday, June 8, 2011 4:34 PM
  • You can take a look at following blog entries

     

    SQL Database Mail - Send Emails with Attachment

    http://blogs.msdn.com/b/sqlagent/archive/2010/11/10/sql-database-mail-send-emails-with-attachment.aspx

     

    Database Mail–when attachments don’t work

    http://blogs.msdn.com/b/sqlagent/archive/2010/11/24/database-mail-when-attachments-don-t-work.aspx

     

    Thanks

    Sethu Srinivasan [MSFT]

    SQL Server

     

     

    Thursday, June 9, 2011 4:28 PM

All replies

  • Did you try [@file_attachments  of EXEC sp_send_dbmail ? Read about Database Mail in SQL Server

    MCITP, MCTS, MCDBA,MCP-- Blog : http://experiencing-sql-server-2008.blogspot.com/
    Wednesday, June 8, 2011 4:34 PM
  • What about SQL Server Integration Services (SSIS)? You can use SSIS to archieve this purpose.

    Thursday, June 9, 2011 9:22 AM
  • Just be aware that sql server agent should be running under domain account which has an appropriate permission ...
    Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/
    Thursday, June 9, 2011 9:36 AM
    Answerer
  • You can take a look at following blog entries

     

    SQL Database Mail - Send Emails with Attachment

    http://blogs.msdn.com/b/sqlagent/archive/2010/11/10/sql-database-mail-send-emails-with-attachment.aspx

     

    Database Mail–when attachments don’t work

    http://blogs.msdn.com/b/sqlagent/archive/2010/11/24/database-mail-when-attachments-don-t-work.aspx

     

    Thanks

    Sethu Srinivasan [MSFT]

    SQL Server

     

     

    Thursday, June 9, 2011 4:28 PM
  •  

    Hi All,

     

    Thank you for the replies.

    To what maximun file size we can copy it through a job with out any issues at the server level. 

    Is there any limitation on the file size.

    Tuesday, June 14, 2011 3:01 PM