0
我試圖使用它們提供的存儲過程來監視SQL Server 2005複製。SQL Server 2005 SP調用在SSMS中工作,但不使用tiny_tds
我可以運行在SSMS以下,並得到數據:
exec sp_replmonitorhelpsubscription
@publisher = 'publisher', @publication = 'publication', @publication_type = 0
如果我使用tiny_tds運行相同的查詢我得到如下:
mssql = TinyTds::Client.new(
:dataserver => config[:host],
:port => config[:port],
:username => config[:username],
:password => config[:password],
:database => db
)
result = mssql.execute("exec sp_replmonitorhelpsubscription @publisher='publisher', @publication='publication', @publication_type=0")
........ .......
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.
我沒有運氣在任何地方發現這個特定的錯誤。誰能幫忙?
我永遠不會想到我自己,但那是問題所在。非常感謝你! – numb3rs1x 2014-09-23 00:41:02