• Jeff Moden (7/21/2014)


    Mac1986 (7/21/2014)


    I created a job with a step which has OperatingSystem(CMDEXEC) and run as DOMAIN\MYACCOUNT.

    SQLCMD -q "SQLOPSDB.DBO.sp_now"

    But now the job is not finishing as the above command does not have EXIT command. Can someone please help me with syntax to run above query with EXIT Command.

    Why are you shelling out to run a stored procedure? And, why on this good green Earth would you name a stored procedure with the system prefix of "sp_"?

    +10

    Inquiring minds want to know.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events