All Link servers working status check and failure alert over E-mail

  • Comments posted to this topic are about the item All Link servers working status check and failure alert over E-mail

  • The script works fine for SQL2012 . But does not for SQL2008 and 2008R2.
    Error:

    Msg 102, Level 15, State 1, Procedure proc_check_linked_servers, Line 37 [Batch Start Line 0]

    Incorrect syntax near '?'.

    Msg 102, Level 15, State 1, Procedure proc_check_linked_servers, Line 39 [Batch Start Line 0]

    Incorrect syntax near '?'.

    Msg 102, Level 15, State 1, Procedure proc_check_linked_servers, Line 40 [Batch Start Line 0]

    Incorrect syntax near '?'.

    Msg 102, Level 15, State 1, Procedure proc_check_linked_servers, Line 42 [Batch Start Line 0]

    Incorrect syntax near '?'.

    Msg 102, Level 15, State 1, Procedure proc_check_linked_servers, Line 43 [Batch Start Line 0]

    Incorrect syntax near '?'.

    Msg 137, Level 15, State 2, Procedure proc_check_linked_servers, Line 43 [Batch Start Line 0]

    Must declare the scalar variable "@emailSubject".

    Msg 102, Level 15, State 1, Procedure proc_check_linked_servers, Line 46 [Batch Start Line 0]

    Incorrect syntax near '?'.

    Msg 137, Level 15, State 2, Procedure proc_check_linked_servers, Line 53 [Batch Start Line 0]

    Must declare the scalar variable "@emailSubject".

    Msg 319, Level 15, State 1, Procedure proc_check_linked_servers, Line 53 [Batch Start Line 0]

    Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xmlnamespaces clause or a change tracking context clause, the previous statement must be terminated with a semicolon.

  • j.hilgers - Thursday, February 8, 2018 2:52 AM

    The script works fine for SQL2012 . But does not for SQL2008 and 2008R2.
    Error:

    Msg 102, Level 15, State 1, Procedure proc_check_linked_servers, Line 37 [Batch Start Line 0]

    Incorrect syntax near ' '.

    Msg 102, Level 15, State 1, Procedure proc_check_linked_servers, Line 39 [Batch Start Line 0]

    Incorrect syntax near ' '.

    Msg 102, Level 15, State 1, Procedure proc_check_linked_servers, Line 40 [Batch Start Line 0]

    Incorrect syntax near ' '.

    Msg 102, Level 15, State 1, Procedure proc_check_linked_servers, Line 42 [Batch Start Line 0]

    Incorrect syntax near ' '.

    Msg 102, Level 15, State 1, Procedure proc_check_linked_servers, Line 43 [Batch Start Line 0]

    Incorrect syntax near ' '.

    Msg 137, Level 15, State 2, Procedure proc_check_linked_servers, Line 43 [Batch Start Line 0]

    Must declare the scalar variable "@emailSubject".

    Msg 102, Level 15, State 1, Procedure proc_check_linked_servers, Line 46 [Batch Start Line 0]

    Incorrect syntax near ' '.

    Msg 137, Level 15, State 2, Procedure proc_check_linked_servers, Line 53 [Batch Start Line 0]

    Must declare the scalar variable "@emailSubject".

    Msg 319, Level 15, State 1, Procedure proc_check_linked_servers, Line 53 [Batch Start Line 0]

    Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xmlnamespaces clause or a change tracking context clause, the previous statement must be terminated with a semicolon.

    Hi Jeroen Hilgers,
    Thanks for your inputs.

    I had not tested it on 2008R2 and older versions, So agree with your words, If possible will try on old versions as well and let you know.thanks
    Subhash

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

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