SQL Server Job

  • hi,

    I need to create a job which will execute two procedures....

    Excution of Procedure1

    =>IF it Success goto next Step for another Procedure[Proc2] execution

    If Procedure2 executes succefully, it generates a data summary report which is saved in .txt and should be attached to Mail.

    If Procedure2 fails it should give the error message to the User

    => IF Procedure1 fails give an error message that "Failed executing the Procedure1"

    Please give me the steps how to do ..........

    Thanks in Advance......

  • you can use SSIS to do that easy 😉

    MCITP: Database Administrator 2005
    MCTS SQL Server 2008
    MCP SQL 2012/2014
    MCSA SQL Server 2012/2014
    MCSE Data Management and Analytics

  • I have to do it from SSMS only.....

    Creating new job in SQL jobs....The job should send mail that error log info...or successfull info....as attachment

  • Sasidhar Pulivarthi (4/14/2010)


    The job should send mail that error log info...or successfull info....as attachment

    check BOL for msdb.dbo.sp_send_dbmail

    http://msdn.microsoft.com/en-us/library/ms190307.aspx

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply