• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 257
  • Last Modified:

Replication manager

Who knows a tool that can create replica's automatically from the input in a database?

I get a lot of questions like "please create a replica of xxx.ntf on our Swiss server". Now I would like to go in the database, select the document for xxx.nsf and add a server to the list of servers in that document. Some kind of agent will then create a replica on the desired server automatically.

I hope someone has an answer.

Greetz
Filips
0
Filips
Asked:
Filips
  • 2
2 Solutions
 
HemanthaKumarCommented:
Write this in an agent, and set it to run on selected docs

Dim session As New NotesSession
Dim db As NotesDatabase
Dim col as NotesDocumentCollection
Dim doc as NotesDocument
Dim replica As NotesDatabase, fdb as NotesDatabase

Set db = session.CurrentDatabase
set col = db.UnprocessedDocuments
set doc = col.GetFirstDocument
while not doc is nothing
Server = doc.Server(0) ' Server where db is residing currently
Path = doc.Path(0)     ' File path
if Path <> "" then
set fdb = session.GetDatabase( Server, Path)
if not fdb is nothing
Set replica = db.CreateReplica( "Jakarta", "sales.nsf" )
end if
end if
Set doc = col.GetNextDocument(doc)
wend

~Hemanth
0
 
HemanthaKumarCommented:
I made some mistake in line

Set replica = db.CreateReplica( "Jakarta", "sales.nsf" )


It should be

Set replica = fdb.CreateReplica( doc.NewServer(0), doc.NewPath(0))    ' NewServer and NewPath should be mentioned in the document
0
 
qwaleteeCommented:
Not sure I understand why you want to do that.  There is a built-in tool for this:

"I would like to go in the database," = Start Domio Adminstrator
"select the document for xxx.nsf " = Select teh database from teh files tab
"add a server to the list of servers in that document. " = Pop menu "Create replica..."

Why does this not suffice?

I would NOT go with Hemantha's solution, as it requires YOUR WORKSTATION to create the new replica and replicate it IN TEH FOREGROUND, meaning your Notes client is locked up uuntil it completes.  On a slow, long-haul link, with a very large database, you can leave for the day.

If you absolutely must have a tool built, I would have it write a request to the administration process database on a "source server" that is closest in proximity to the destination server.  That will get t processed cleanly, efficiently, and using only server resources.  Essentially, it "automates" the process I outlined above (open Administrator, right click DB file, CREATE REPLICA...)
0
 
FilipsAuthor Commented:
I agree with qwaletee. I don't like the foreground stuff but the Domino administrator isn't user-friendly enough. I searched myself a lot of ours but couldn't find anything so I presume it doesn't exist.

Thanks
Greetz
Filips
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now