OSQL and ERRORLEVEL

  • When I get this message by by running a script using OSQL, what is the errorlevel being returned?

    "Cannot add rows to sysdepends for the current stored procedure because

    it depends on the missing object 'DBPostDBHSCash_Balance'. The stored

    procedure will still be created."

    I need to ignore the particular errorlevel in a WISE script where I'm

    running the script using OSQL.

  • I do not think that it will. It is more of an informational message from Transact-SQL. This is one of the 'undocumented features' that has existed in SQL Server since it was ported/copied from Sybase way back around v4.2 (on OS2 no less). The sysdepends table is not totally accurate <period>

    RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."

  • Rudy is correct, the errorlevel is not set by that informational message. Unfortunately, I don't know of any way to suppress it. The error will occur when a stored procedure is created that calls another non-existent stored procedure. Just ignore it, if you can.

  • After careful inspection of the offending script, we have found that

    the problem was occuring because a SP was referencing a view that

    had referenced a table that had been dropped. The View had not yet

    been updated.

    So we moved the View deletion/creation above the SPs and it works.

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

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