Skip to main content

Posts

Showing posts from January, 2010

SQL Server 2005 send email from job

Start Menu – Program Files – Microsoft SQL Server 2005 – Configuration Tools – SQL Server 2005 Surfrace Area Configuration – Surface Area Configuration for Features   Under Database Engine – Database Mail – tick Enable Database Mail stored procedures In SSMS – Under Management – right click Database Mail – Configure Database Mail   Set up Database Mail by performing the following tasks: Type Profile name then choose Add   Type Account name, Email address, Display name, Reply e-mail if any, SMTP Server name and port number Under SQL Server Agent – right click Operators – New Operator   Type Name, tick Enabled and Email name. u can separate by semicolon (;) if u want to send to many recipients   Under SQL Server Agent – right click Jobs – New Job In General – type Name, Owner, Category if any In Steps – type Step name, Type, Command. I choose so the backup set will have ‘day month year’ name DECLARE @filename NVARCHAR(250) select @Filename = 'D:\DATABASE\MSSQL.1\MSSQL\Backup\