Quantcast
Channel: SQL Server Replication forum
Viewing all articles
Browse latest Browse all 4054

Monitoring replication from external system with PHP

$
0
0

Hi,

So I am trying to monitor the status of a replication using php on a Linux system. I set up a user account that has the replmonitor role on the distribution database.

----

Via SMSS and logged as the specific user account, I can execute:

sp_executesql

N'use distribution; exec sp_replmonitorhelpsubscription @publication=''DBNAME'', @publication_type=2'

And I get 2 rows as a result since I have 2 subscription.

----

However when trying it from the Linux box with php, I get the following:

PHP Warning:  mssql_query(): message: Cannot insert the value NULL into column 'agentstoptime', table 'tempdb.dbo.#tmp_replication_monitordata________________________________________________________________________________________000000029230'; column does not allow nulls. INSERT fails. (severity 16) in ....

----

So what could cause the insert issue in one case but not the other especially on a temp table ?

Regards,

Olivier


Viewing all articles
Browse latest Browse all 4054

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>