Das Notes Forum

Lotus Notes / Domino Sonstiges => Tools & Downloads => Thema gestartet von: meichhorner am 01.03.04 - 14:32:25

Titel: Antrid 6.0
Beitrag von: meichhorner am 01.03.04 - 14:32:25
Hy,

hier gibt's das altbekannt Antrid in einer neuen Version mit Unterstützung für Notes/Domino 6 ;)

http://www.rprsystems.com/antrid/ANTRID_6_0/antrid_6_0.html (http://www.rprsystems.com/antrid/ANTRID_6_0/antrid_6_0.html)

Cu
Martin
Titel: Re:Antrid 6.0
Beitrag von: BANXX am 02.03.04 - 20:27:44
Danke :-)
Titel: Re:Antrid 6.0
Beitrag von: TMC am 02.03.04 - 20:38:17
Erst hab ich mich gefragt: Who the f** is Antrid? Hatte ich ja schon irgendwo mal gehört.

Dann steht da:
Zitat
It was developed by Perry Rosenboom to allow Administrators to change the Replica ID of a Lotus Notes Database.

Ich hab das jedenfalls schon öfter erfolgreich (unter R5) mit folgendem Code gemacht:
Code
This agent will copy the Replica ID from one database/template and paste it over the Replica ID on another database/template making the two replica copies of each other.

                         

                        %INCLUDE "LSERR.LSS"
                        Declare Function W32_NSFDbOpen Lib "nnotes.dll" Alias "NSFDbOpen" _
                        (Byval dbname As String, dbHandle As Long ) As Integer
                        Declare Function W32_NSFDbClose Lib "nnotes.dll" Alias "NSFDbClose" _
                        (Byval dbHandle As Long ) As Integer
                        Declare Function W32_NSFDBCREATE Lib "NNOTES.DLL" Alias "NSFDbCreate" _
                        (Byval dbname As String, Byval dbClass As Variant, Byval forceIt As Single) As Integer
                        Declare Function W32_NSFDBREPLICAINFOSET Lib "NNOTES.DLL" Alias "NSFDbReplicaInfoSet" _
                        (Byval dbHandle As Long, replInfoStruct As Long) As Integer
                        Declare Function W32_NSFDBREPLICAINFOGET Lib "NNOTES.DLL" Alias "NSFDbReplicaInfoGet" _
                        (Byval dbHandle As Long, replInfoStruct As Long) As Integer

                        Sub Initialize
                        Dim SourceServer As String
                        Dim SourceDatabase As String
                        Dim DestinationServer As String
                        Dim DestinationDatabase As String
                        Dim db As NotesDatabase

                        SourceServer = Inputbox$ ("Enter the server name that the database with the good replica ID resides on." _
                        ,"Switch Replica ID Agent -- Source Server Name" ,"PHIN02/Hub/Towers Perrin")
                        SourceDatabase = Inputbox$ ("Enter the path\name of the database with the good replica ID." _
                        ,"Switch Replica ID Agent -- Source Database" ,"source\testsample.nsf")
                        DestinationServer = Inputbox$ ("Enter the server name of the database with the replica ID " _
                        & "that you would like to change." ,"Switch Replica ID Agent -- Destination Server Name" _
                        ,"PHIN02/Hub/Towers Perrin")
                        DestinationDatabase = Inputbox$ ("Enter the path\name of the database with the replica ID that you would " _
                        & "like to change." ,"Switch Replica ID Agent -- Destination Database" ,"destination\testsample.nsf")

                        If DestinationServer = "Local" Then
                        DestinationServer = ""
                        End If
                        If SourceServer = "Local" Then
                        SourceServer = ""
                        End If
                        Set db = New NotesDatabase("","")
                        Call db.Open(DestinationServer,DestinationDatabase)
                        If Not (db.Isopen) Then
                        Msgbox "Switch Replica ID Agent could not open " & DestinationServer & "!!" & DestinationDatabase _
                        , 16,"Error:"
                        Exit Sub
                        Else
                        Call db.close
                        End If

                        Set db = New NotesDatabase ("","")
                        Call db.Open(SourceServer,SourceDatabase)
                        If Not (db.Isopen) Then
                        Msgbox "Switch Replica ID Agent could not open " & sourceserver & "!!" & sourcedatabase _
                        , 16,"Error:"
                        Exit Sub
                        End If
                        Call db.close

                        Call SwitchReplID(SourceServer,SourceDatabase,DestinationServer,DestinationDatabase)



                        Function SwitchReplID(S_Server As String, S_Db As String, D_Server As String, D_Db As String) As Long

                        Dim S_DbString As String
                        Dim D_DbString As String
                        Dim dbhandle As Long
                        Dim retNoteID As Long
                        Dim noteClass As Long
                        Dim replInfo(5) As Long
                        Dim replID1 As Long
                        Dim replID2 As Long
                        Select Case Ucase$(S_Server)
                        Case "LOCAL"
                        S_DbString = S_Db
                        Case "LOKAL"
                        S_DbString = S_Db
                        Case ""
                        S_DbString = S_Db
                        Case Else
                        S_DbString = S_Server + "!!" + S_Db
                        End Select

                        Select Case Ucase$(D_Server)
                        Case "LOCAL"
                        D_DbString = D_Db
                        Case "LOKAL"
                        D_DbString = D_Db
                        Case ""
                        D_DbString = D_Db
                        Case Else
                        D_DbString = D_Server + "!!" + D_Db
                        End Select

                        '====================================Get the replica info struct from Source
                        DB===============================================

                        REM "W32"
                        rc = W32_NSFDBOPEN(S_DbString, dbhandle&)
                        rc = W32_NSFDBREPLICAINFOGET(dbhandle&, replInfo(0))
                        replID1 = replInfo(0)
                        replID2 = replInfo(1)
                        rc = W32_NSFDBCLOSE(dbhandle&)

                        '=====================================Replace Replica ID on
                        Database===================================================
                        rc = W32_NSFDBOPEN(D_DbString, dbhandle&)
                        rc = W32_NSFDBREPLICAINFOGET(dbhandle&, replInfo(0))
                        replInfo(0) = replID1
                        replInfo(1) = replID2
                        rc = W32_NSFDBREPLICAINFOSET(dbhandle&, replInfo(0))
                        rc = W32_NSFDBCLOSE(dbhandle&)

Wobei Antrid bestimmt komfortabler sein mag, wenn man das öfter braucht.....

Matthias
Titel: Re:Antrid 6.0
Beitrag von: eknori am 02.03.04 - 20:48:07
wenn ich gaaanz ehrlich  bin, habe ich das noch nie gebraucht. Warum sollte ich einer wildfremden Datenbank die Replik-ID einer bestehenden DB verpassen ?
Aus reinem Forscherdrang mit Sicherheit nicht.  Und selbst, wenn ich mal aus Zufall eine Kopie statt einer Replik erstellt haben sollte... What solls, dann wird die Kopie halt gelöscht und eine Replik erstellt.

Also nenne mir doch mal jemand einen triftigen Grund, warum man dieses Tool unbedingt braucht !

Ulrich
Titel: Re:Antrid 6.0
Beitrag von: animate am 02.03.04 - 20:56:53
Also nenne mir doch mal jemand einen triftigen Grund, warum man dieses Tool unbedingt braucht !

Also ich habs auch noch nie gebraucht, aber hier steht eine Begründung:

http://www.openntf.org/projects/pmt.nsf/ProjectLookup/Surely%20Template

(bei den Details)
Titel: Re:Antrid 6.0
Beitrag von: Semeaphoros am 02.03.04 - 21:07:49
Für einen Rebuild einer korrupten Datenbank kann so etwas nützlich sein (na, das ist aber wirklich ein sehr seltener Fall und ob das dann "unbedingt" sein muss, ist auch nicht sicher)
Titel: Re:Antrid 6.0
Beitrag von: meichhorner am 03.03.04 - 08:39:38
Hy,

in meinem aktuellen Fall hatten wir da eine Applikation die über Replik ID von mehreren seiten angesprochen würde und wie das so ist gabs da so gut wie keine Doku dazu alsohabe ich mir das suchen erspart und die Replik ID geändert ;)

Cu
Martin
Titel: Re:Antrid 6.0
Beitrag von: eknori am 03.03.04 - 08:54:19
Also bitte nicht falschverstehen; selbstverständlich finde ich so Tools auch immer ganz toll, aber wie z.B. in meichhorners Fall hätte man das auc ganz locker mit einer Kopie der DB ( also Notes Bordmittel) erledigen können.
Die Sache mit den Templates übrigens auch...

Nur wurde in der Vergangenheit ANTRID immer quasi als eine Art Wunderwaffe dargestellt; und mir ist das nie richtig in den Sinn gekommen, warum das so ist

Ulrich
Titel: Re:Antrid 6.0
Beitrag von: meichhorner am 03.03.04 - 09:02:44
Zitat
Also bitte nicht falschverstehen; selbstverständlich finde ich so Tools auch immer ganz toll, aber wie z.B. in meichhorners Fall hätte man das auc ganz locker mit einer Kopie der DB ( also Notes Bordmittel) erledigen können.

 ??? Seit wann geht bei einer Kopie die Replik ID mit  ???