• just tested this wonderful scripts and definately one of the must in job schedules.

    One thing I would like to know that as soon the script completed it created the job. But in job the step comes as :-

    sqlcmd -E -S $(ESCAPE_SQUOTE(SRVR)) -d ...................

    and this will fail with incorrect servername and the only option I found is replace $(ESCAPE_SQUOTE(SRVR)) with real sql server name.

    Am I taking this script incorrectly or do I need to modify it somewhere to reflect the correct servername while running the main script to create these jobs.

    edit :- Sorry just checked that this blog is quiet old. But one thing cant understand that this script is on Ola blog from thu 20jan 2011, and the discussion seems to be started here on this website from 2/25/2008 12:21:14 AM.

    ----------
    Ashish