Domino 9 und frühere Versionen > ND6: Entwicklung
Preferred Server in der Replikations Settings einstellen
(1/1)
Daenu:
Hallo Zusammen
Ich hab ein kleines Programm geschrieben, welches eine Datenbank automatisch lokal repliziert.
Das Problem ist, dass der "Preferred Server/Bevorzugte Server" in der Replikations Einstellung per Default auf "Any available, try last successful first" steht. Das will ich aber nicht. Es sollte stehen "Any available, try ServerXY first"
Ich hab vieles ausprobiert, jedoch haben weder die LS Klasse
db.ReplicationInfo
noch die API Funktion
NSFDbReplicaInfoSet (siehe hier http://atnotes.de/index.php?topic=8837.0, P.S. Danke Eknori)
ein Flag dies zu ändern.
Hat jemand vielleicht sonst ne Idee....
Ich danke im Voraus
Daniel
Untitled:
Nützt ev. das hier?
--- Code: ---Type REPLSERVSTATS
Pull As REPLFILESTATS
Push As REPLFILESTATS
StubsInitialized As Long
TotalUnreadExchanges As Long
NumberErrors As Long
LastError As Integer
End Type
Declare Function ReplicateWithServerExt Lib "nnotes.dll" Alias "ReplicateWithServerExt" ( Byval PortName As Long, Byval ServerName As String, Byval Options As Long, Byval NumFiles As Integer, Byval FileList As String, ExtendedOptions As Long, retStats As REPLSERVSTATS ) As Integer
Function ReplicateDatabase( SourceServer As String, TargetServer As String, TargetDb As String, RepFlags As Long ) As Integer
'by http://www-10.lotus.com/ldd/46dom.nsf/0/13133796bf6cadf4852568e2005b8f9a?OpenDocument
'*** Replicate database given by TargetServer!!TargetDb with a replica it has on SourceServer.
'*** Use RepFlags& to specify Push, Pull or both.
'*** Returns True if successfull, False otherwise.
Dim Tdb As String
Dim hdb As Long
Dim RetStats As REPLSERVSTATS
Dim rc As Integer
ReplicateDatabase% = False
'*** Build a path to the database.
If TargetServer$ = "" Then
Tdb$ = TargetDb$
Else
Tdb$ = TargetServer$ & "!!" & TargetDb$
End If
'*** Do the replication thang. Can check RetStats to display what hapened... maybe later!
rc% = ReplicateWithServerExt( 0&, SourceServer$, RepFlags&, 1&, Tdb$, 0&, RetStats )
If rc% <> 0 Then
'Messagebox "Rep with server failed."
Exit Function
End If
ReplicateDatabase% = True
End Function
--- Ende Code ---
Hier kannst du angeben, mit welchem Server die DB repliziert werden kann.
Daenu:
Also hab das Ganze mal angeschaut und durchgespielt. Auch den Code von http://www-10.lotus.com/ldd/46dom.nsf/0/13133796bf6cadf4852568e2005b8f9a?OpenDocument
Leider hat es nicht viel gebracht. Es repliziert zwar mit dem angebenen Server aber in den Settings stellt es nichts um. Immer noch auf "try last successful". Über die REPL_OPTION_xxx kann man einige Flags ansteuern. Nicht aber den Bevorzugten Server :'(
REPL_OPTION_RCV_NOTES - Receive notes from server (pull).
REPL_OPTION_SEND_NOTES - Send notes to server (push).
REPL_OPTION_ALL_DBS - Replicate all database (NSF) files, as well as files named in the file list argument.
REPL_OPTION_CLOSE_SESS - Close sessions when done.
REPL_OPTION_ALL_NTFS - Replicate all template (NTF) files, as well as files named in the file list argument.
REPL_OPTION_PRI_LOW - Replicate low, medium, and high priority database.
REPL_OPTION_PRI_MED - Replicate medium and high priority databases only.
REPL_OPTION_PRI_HI - Replicate high priority databases only.
REPL_OPTION_PRIVATE - (For use with ReplicateWithServerExt only) Replicate private documents even if not selected by default.
REPL_OPTION_ALL_FILES - Replicate all database (NSF) and all template (NTF) files.
REPL_OPTION_ABSTRACT_RTF - (For use with ReplicateWithServerExt only) Abstract/truncate docs to receive summary and 40KB of rich text only.
REPL_OPTION_ABSTRACT_SMRY - (For use with ReplicateWithServerExt only) Abstract/truncate docs to summary only data.
Tode:
wir stehen hier gerade vor exakt dem selben Problem. Konntest Du inzwischen eine Lösung finden ?
thanx
Daenu:
nö. leider nie herausgefunden... Sorry :-:
Navigation
[0] Themen-Index
Zur normalen Ansicht wechseln