我有一个可用的Lotus Notes代理。在LN 7上运行。 我的代理每5分钟运行一次,并且每当它在Microsoft SQL(2005)表上找到某些特定记录时,它就会发送一些邮件。在Lotus Notes代理上管理不稳定的SQL连接
它通常工作正常,但最近它停止工作 - 现在不止一次 - 并且不会重新启动,直到Notes服务器重新启动或Notes管理员重新启动所有代理(我没有Notes管理员,所以我我不确定他做了什么,我试图让这个信息添加到这个问题中)。
我想排除我能想到的任何事情,唯一让我想到的是我的LN代理运行查询的MS SQL Server有一些稳定性问题,可能并不总是在线。 ..我认为这可能是问题的原因......(我试图在上次代理成功完成时交叉引用来自SQL的运行时日志)。
我在想如果有什么办法来管理连接,除了我在做什么,所以我可以排除(缺少)连接问题。
在此先感谢您提供的任何建议。
亲切的问候,
迭戈
Option Public
Uselsx "*LSXODBC"
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim subject As String, cc As String, bcc As String, sender As String, OID As String, mailto As String, bodyNotMIME As String
Dim body As NotesMIMEEntity
On Error Goto errorCounter
Set db = session.CurrentDatabase
Gosub SendMailGeneral
Exit Sub
SendMailGeneral:
Dim con As New ODBCConnection
Dim qry As New ODBCQuery
Dim result As New ODBCResultSet
Dim defaultQuery As String
Set qry.Connection = con
If con.ConnectTo("DSN_Name","USER_NAME", "PASSWORD") Then
Set result.Query = qry
defaultQuery = "select TOP (10) * from Message where StatusType=0"
qry.SQL = defaultQuery
result.Execute
If (result.IsResultSetAvailable) Then
Do
result.NextRowcode
//here´s all the code that gets the results from each table´s fields and transform them into notes mails
Loop Until result.IsEndOfData
End If
End If
result.Close(DB_CLOSE)
Return
末次
只需确认,Notes Domino服务器版本是6.5.1。 笔记管理员告诉我,不是重新启动,而是在命令控制台上尝试:telamgr quit 然后他用这个命令取回它:Load namgr 但似乎退出所有代理需要很长时间。 – frenetix 2010-10-04 18:01:51