Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Attachment using backup


Attachment using backup

Author
Message
kd11
kd11
SSC Veteran
SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)

Group: General Forum Members
Points: 217 Visits: 1475
I can setup a script using sp_send_db_mail to include the attachment of a backup job But I can't include an attachment if I use the the backup wizard correct?
Grant Fritchey
Grant Fritchey
SSCoach
SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)

Group: General Forum Members
Points: 17597 Visits: 32267
No, a backup needs to be restored. You can only attach a database that has been detached (or at least shut down).

----------------------------------------------------
The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
Theodore Roosevelt

The Scary DBA
Author of: SQL Server Query Performance Tuning and SQL Server Execution Plans
Product Evangelist for Red Gate Software
kd11
kd11
SSC Veteran
SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)

Group: General Forum Members
Points: 217 Visits: 1475
I don't know if you understand what I was asking. If you run a command backup database dbname ......... , when it's done you see information as such "Processed 0 pages for database
'DBName', on file 1.BACKUP LOG successfull........" I can script the backup job & use db_send_mail to include the attachment but If I create the backup job using the maintenance plan can I have it send the email with the attachment to the operator.
Grant Fritchey
Grant Fritchey
SSCoach
SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)

Group: General Forum Members
Points: 17597 Visits: 32267
Oh, I don't know. I don't use SQL Server to send emails except for alerts. If I had to do that, I'd probably go to Powershell for it anyway. There's no reason why you couldn't include a backup in an email from there, although that's potentially a big file to be emailing around.

----------------------------------------------------
The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
Theodore Roosevelt

The Scary DBA
Author of: SQL Server Query Performance Tuning and SQL Server Execution Plans
Product Evangelist for Red Gate Software
Brandie Tarvin
Brandie Tarvin
SSCertifiable
SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)

Group: General Forum Members
Points: 7798 Visits: 8745
Depends on how big the backup is. You could use an Execute T-SQL Statement Task to send the email, but I think there's a size limitation on the attachment using this method and it's not very large. Though the issue could be the size limitation in Outlook rather than in SSIS (the base for the maintenance plan wizard).

I would not send a backup file via email anyway. Too easy for it to get corrupted or intercepted or just to plain fail due to backup size. Use a NAS share that only a select few have access to and copy it there. That way you can control access and it is less likely to cause other issues.

I certainly wouldn't want to receive an attachment that large in my inbox. Outlook would freeze while trying to process that.

EDIT: From BOL about sp_send_dbmail - By default, Database Mail limits file attachments to 1 MB per file. For more information, see Database Mail Configuration Wizard.

EDIT 2: It occurs to me you might be talking about the log instead of the actual backup file. If the log, then usually those aren't big. You could send that using the Execute T-SQL Statement Task.

Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search