Niente... ho fatto a modo mio: con un agente che gira server side scrivo il file nrf direttamente su disco riga per riga Sub Initialize() Dim NS As New NotesSession Dim db As NotesDatabase Dim vista As NotesView Dim DBMail As NotesDatabase Dim PathMail As String Dim ServerMail As String Dim currserver As String Dim repid As String Dim nrfname As String Dim DBTitle As String Dim dominobasedir As String Dim ref As String Dim fileNum As Integer Dim fileName As String Const intestazionenrf = "[NotesRedirectFile]" Const typenrf = "Type=Move" Set db = NS.CurrentDatabase Set vista = db.Getview("move_certify_swID") Set people = vista.Getfirstdocument() dominobasedir = NS.Getenvironmentstring("Directory",true) currserver = NS.Getenvironmentstring("ServerKeyFileName_Owner",true) While Not people Is Nothing \'controllo se il db è su questo server If (people.MOVE_HomeMailServer(0) = currserver) Or (people.MOVE_ClusterMate_OLD(0) = currserver) Then PathMail = people.move_PathMailFile(0) \'aggancio db Set DBMail = NS.GetDatabase("" , PathMail,True) \'controllo se agganciato If Not DBMail.Isopen Then Print ("Impossibile accedere al database " + PathMail) Else \'Salvo replicaID e DB.Title per dopo repid = "RepID=" + DBMail.Replicaid DBTitle = "Title=" + DBMail.Title Call DBMail.Remove() Print ("Il database " + PathMail + " è stato rimosso") End If \'*********Creo NRF \'calcolo il nome nrfname = dominobasedir + "/" + Replace(StrLeftBack(people.move_PathMailFile(0),".") + ".nrf","\","/") fileNum% = FreeFile() fileName$ = nrfname Open fileName$ For Output As fileNum% Print #fileNum%, intestazionenrf Print #fileNum%, typenrf Print #fileNum%, repid Print #fileNum%, DBTitle \'verifico se sono sul primario o sul clustermate per fare una redirect 1:1 If people.MOVE_HomeMailServer(0) = currserver Then ref = "Ref=" + people.MOVE_HomeMailServer_1(0) + "!!" + people.move_PathMailFile_1(0) ElseIf people.MOVE_ClusterMate_OLD(0) = currserver Then ref = "Ref=" + people.MOVE_ClusterMate(0) + "!!" + people.move_PathMailFile_1(0) End If Print #fileNum%, ref Close fileNum% Else Print ("Il DB " + people.move_PathMailFile(0) + " non risiede su questo server") End If Set people = vista.Getnextdocument(people) Wend End Sub
|