SQL Server Agent Job - Decision Extract Question and Purpose

  • Hello Support Forum,

    I've inherited a 2008 R2 server and after scrubbing through the maintenance Plan and Job setup, I came across a scheduled event with the purpose of conducting a "Decision Extract" for an entire Database (that you specify). I've looked at the Query and can follow it no problem but I'm unaware of what this job is set to accomplish once ran. Can anyone help me with the answer?

    declare @ExtractDate varchar(10)

    declare @SourceDatabase varchar(255)

    declare @SourceServer varchar(255)

    declare @TempDate varchar(10)

    /* M O D I F Y T H E 3 L I N E S B E L O W O N L Y */

    set @SourceDatabase = 'database name' -- Replace with your eSite db name

    set @SourceServer = 'sql server Name' -- Replace with your SQL Server name

    Set @TempDate = 'X/X/XXXX' -- Replace with the date this job gets set up.

    Select @ExtractDate = convert(varchar(10),DateAdd(d,1,IsNUll(Max(ExtractDate),@TempDate)),101)

    from ExtractDetails

    Where DBName = @SourceDatabase and DBServerName = @SourceServer

    exec DecisionDataExtract @ExtractDate, NULL , @SourceDatabase, 'sa', '', 'N'

    insert into ExtractDetails select @ExtractDate, @SourceDatabase, @SourceServer, getdate()

     

  • It runs the DecisionDataExtract stored procedure with the specified arguments.

    John

  • Hello John Mitchell-245523,

    Is this query/action only pulling data/text showing the Decision Extract Tree/Stored Procedure?

    -OR-

    Does it provide some sort of performance boost according to this Microsoft article? https://docs.microsoft.com/en-us/sql/relational-databases/stored-procedures/stored-procedures-database-engine?view=sql-server-2017

    Thank You

     

  • I can't answer that without seeing the stored procedure definition... and even then I couldn't be sure.  The only way you can know is by testing.

    John

  • Thank you for the information. Very helpful

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

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