Server für Replikation per Script umstellen

  • Wir haben das Problem, dass einige Anwenden mehr oder weniger keine Ahnung haben was Sie machen müssen wenn eine DB auf einen anderen Server umzieht, aber eine lokale haben.
    Für diese Gruppe ist es nicht zumutbar die Replikationseigenschaften zu ändern.
    Unsere Überlegung war, einen Button zur Verfügung zu stellen, der dies automatisch erledigt.


    Ich hab in der Hilfe geschaut. Die Klasse NotesReplication gibt zwar die Eigenschaft Destination, aber die ist ReadOnly.


    Hat jemand eine Lösung?

  • Hallo Codde,


    Hatte schon mal was in der richtung gemacht,
    Du must blos die Werte die abgefragt werden einfach definieren sollte gehen.


    Sub Initialize
    REM Get local database
    dbName$ = _
    Inputbox$("Database name", _
    "Enter name of local database")
    Dim db As New NotesDatabase("", dbName$)
    Dim rep As NotesReplication
    Dim re As NotesReplicationEntry
    If Not db.IsOpen Then
    Messagebox "No local database",, dbName$
    Exit Sub
    End If

    REM Get source and destination computers
    source$ = Inputbox$("Source", _
    "Enter name of source computer")
    If Instr(1, source$, "Any Server", 5) > 0 Then
    source$ = "-"
    End If
    destination$ = _
    Inputbox$("Destination", _
    "Enter name of destination computer")
    If Instr(1, destination$, "Any Server", 5) > 0 Then
    destination$ = "-"
    End If

    REM Get replication entry
    Set rep = db.ReplicationInfo
    Set re = rep.GetEntry(source$, destination$, False)
    If re Is Nothing Then
    Messagebox _
    "No replication entry for " & source$ & _
    " and " & destination$,, _
    "No such replication entry"
    Exit Sub
    End If

    REM Get server for destination
    Dim dbdir As NotesDbDirectory
    If re.Destination = "-" Then
    Set dbdir = New NotesDbDirectory("")
    Else
    Set dbdir = New NotesDbDirectory(re.Destination)
    End If
    If dbdir.Name = "" Then
    dbdirname$ = "Local"
    Else
    dbdirname$ = dbdir.Name
    End If
    Messagebox dbdirname$,, "Name of server"
    End Sub


    Viel spass.