Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Email Task 1

Status
Not open for further replies.

Eyespi20

Technical User
Jan 14, 2004
296
US
I have a question regarding setting up an e-mail task in DTS.

I've done one where I only had one recipient and that works a treat, but would like to do one where it emails a file to someone depending upon an "ownership" criteria for the file.

Can this be done in DTS? What do you recommend for setting it up?

I've done a cursor in a job that does this, but since DTS will create an excel file which is more user friendly to my group than text or cvs files are, that it might work better overall.

Thanks for your input!

Margaret
 
My qucik suggestion would be end of the cusor add script to attach and send email to appropriate owners.

after cur_createExcel
select @emailID =email from emailtable where excelfiletype='xxxx'
EXEC xp_sendmail
@recipients = @emailid,
@subject = 'SQL Server Report',
@message = 'The contents ofINFORMATION_SCHEMA.TABLES:',
@attach_results = 'TRUE', @width = 250

Thsi should take care of everything. But make sure after the email is executed move the file to backup folder.


Dr.Sql
Good Luck.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top