LotusNotesエージェントが機能しています。LN 7で実行しています。エージェントは5分ごとに実行され、Microsoft SQL(2005)テーブルで特定のレコードが見つかるたびにメールを送信します。
通常は正常に動作しますが、最近は動作を停止し(2回以上)、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
サブ終了