Home Forums SQL Server 2005 T-SQL (SS2K5) sp_replmonitorhelpsubscription works in SSMS but not using T-SQL RE: sp_replmonitorhelpsubscription works in SSMS but not using T-SQL

  • jslusher (9/22/2014)


    I can run the following in SSMS and get data:

    exec sp_replmonitorhelpsubscription @publisher='publisher', @publication='publication', @publication_type=0

    If I run the same query using T-SQL I get the following:

    MSSQLCheck WARNING: query did not complete: Cannot insert the value NULL into column 'publication_id', table 'tempdb.dbo.#tmp_replication_monitordata________________________________________________________________________________________000000001A64'; column does not allow nulls. INSERT fails.

    What's the difference?

    If you run

    exec sp_replmonitorhelpsubscription @publisher='publisher', @publication='publication', @publication_type=0

    from within SSMS, then you are running it in TSQL.

    Could you explain your issue a little more clearly please?

    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