Recently got stuck with the stored procedure sys.sp_dbmmonitorupdate which is used to monitor the database mirroring session. As usual you could do using the GUI tool, but sometimes using TSQL methods is good enough to see what is happening on your system. On the system with SQL 2005 Service pack2 when executing this stored procedure getting the error: Msg 102, Level 15, State 1, Line 1 Incorrect syntax near '-'. Msg 319, Level 15, State 1, Line 1 Incorrect syntax near the keyword 'with'. If this...(
read more)
Read the complete post at http://sqlserver-qa.net/blogs/ha/archive/2007/11/12/database-mirroring-sys-sp-dbmmonitorupdate-stored-procedure-fails-with-error-incorrect-syntax-near.aspx