Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Database maintenance plan Expand / Collapse
Author
Message
Posted Sunday, October 12, 2008 10:54 PM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: 2 days ago @ 5:56 AM
Points: 1,068, Visits: 3,033
Through Database maintenance plan i had configured database backup and backup report text file , so backup was taken daily scuccessfully,and i want send email from server through SMTP.so i had execute the sql script for email alert, it was working fine,

i had execute the The following script
declare @rc int
exec @rc = master.dbo.xp_smtp_sendmail
@FROM = N'WJMN0130136',
@FROM_NAME = N'JG-IDC-SQL Server',
@TO = N'ananda.murugesan@zmail.ril.com',
@replyto = N'',
@CC = N'',
@BCC = N'',
@priority = N'NORMAL',
@subject = N' SQL Server Mail',
@message = N'Goodbye have a nice day, this is for test mail from MSSQL',
@messagefile = N'',
@type = N'text/plain',
@attachment = N'',
@attachments = N'',
@codepage = 0,
@server = N'servername'
select RC = @rc
go

i want script itself how to attach at @messagefile backup report text file automatically from particular disk path,

For example - @messagefile = N' C:\dbbackup\filename.txt', this file name has been changed daily whenever take backup. so i need send email the backup teport text file,

I want set the file name dynamic in @messagefile = N' C:\dbbackup\filename.txt'

Thanks
Post #584653
Posted Monday, October 13, 2008 12:40 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 11:01 AM
Points: 40,197, Visits: 36,600
Please don't post multiple threads with the same topic. It just wastes people's timeas they answer posts already answered. It also fragments replies and makes things harder to find

No replies to this thread please. Direct replies to:
http://www.sqlservercentral.com/Forums/Topic584368-5-1.aspx



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #584668
Posted Tuesday, October 14, 2008 12:31 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, July 4, 2014 7:44 AM
Points: 115, Visits: 646
For this I would recommend you to use SSIS package. You can easily create a SSIS package for this purpose.

Search in SQL server Central, you may get a package ready (depends on ur luck).

Its really easy to create these kind of packages in SSIS.

Its bit difficult to achieve this goal using only SQL SERVER
Post #585715
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse