creating replica

Posted on 2006-11-28
Last Modified: 2013-12-18
Hi all,

I have created a LS and placed it behind a button to create a replica from a database on the server to users machine.
The button is placed in the email sent to all users. THIS BIT WORKS GREAT.

However, our users are not all connecting to the same sever, they are split into two server.
At the moment I have hard-coded the main server name in the script that creates the replica, how can I change it so that the replica is created from the mail server that the user belongs to.
For example, if my mail server is server1 and user2 mail server is server2 then I want to create my replica from server1 and I want user2 to create their replica from server2. Both server will have a replica of the database.

Also, is there a way in LS to bookmark the replica that the user creates on the bookmark within the same script(create replica script)?
i know that I can create a bookmark with @command([addbookmark;......]); but I need to use LS.

Thank you in advance.
Question by:varvoura
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 3
  • +1
LVL 46

Accepted Solution

Sjef Bosman earned 100 total points
ID: 18026643
1) The name of the person's mail server is in his/her User document in the N&A-book, in the field MailServer
2) Adding a bookmark using LS might be possible, see

Author Comment

ID: 18026771
Thanks sjef, ur always prompt.

1)That bit I know,but the bit that i need to work out is to extract it with the least code possible.

2) I'll check this out and I am sure u'll hear from me if any problems.


Author Comment

ID: 18026792
1) got it

dim dbname as NotesDatabase
Set dbname = New NotesDatabase( myservername, "names.nsf" )
set view = dbname.GetView("LookupbyFullName")
dim user as string
user = session.commonusername
set namedoc = view.getdocumentbykey(user)
dim strserver as string
strServer = namedoc.MailServer(0)

Then in the create replica where I need to hard code the server, I will just use the strServer variable.
Is this correct??

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

LVL 46

Expert Comment

by:Sjef Bosman
ID: 18028113
1) Yes, I think so, but the proof of the coding is in the running, isn't it?

Assisted Solution

behenderson earned 100 total points
ID: 18031307
Quicker possibility

Dim vServer as Variant

vServer = Evaluate( "@Subset(@MaildbName; 1)" )
strServer = vServer(0)
LVL 46

Expert Comment

by:Sjef Bosman
ID: 18032908
Ah, interesting, but would that not be the current user's current mail database? So if he runs in a location with a local mail setup, the server would be wrong? Just guessing...

Author Comment

ID: 18033025
The script works great now with behenderson's idea. But looking at sjef last post, it looks like I may have a problem.
most of our users (laptops, etc..) have the server in their location document set up to local.

Just when I thought I had things under control!!

I'll see if I can go back to my first option.

Thanks guys

Expert Comment

ID: 18033620
You are absolutely right and very polite about being right.  Both very good qualities.  Sorry varvoura.  Thanks sjef.

Expert Comment

ID: 18033624
I'll have to read those damn yellowbooks some more.
LVL 46

Expert Comment

by:Sjef Bosman
ID: 18035126
Heh, I just had to find a flaw in your idea ;-)) Anyway, for the original code, I suppose the user needs access to (a replica of) the N&A-book. Do laptops have a local replica of the N&A-book?

Author Comment

ID: 18035404
Ok, original code works great, obviously still testing while online.
users don't have a replica of names.nsf. I suppose the only other way is to send them a replica with this one, hopefully this way it will be fine

By the way sjef, thanks for the bookmark link, I have a look at the idea and written the code to bookmark the replica on the bookmark bar and it works like a charm.

....The luxury of trying to make things eaiser for everyone!

Thanks again

LVL 18

Assisted Solution

marilyng earned 100 total points
ID: 18060194
Hi varvoura,

For laptop users, I generally create a condensed directory on the server, and replicate this down to them.  Then add the light directory filename to the list of address books in user preferences.

The condensed directory is basically the ($USERS) view, a list of all users and groups for addressing purposes and has 1/4 the size of the NAB.  Also, it is more secure and less server intensive when replicating.

See: Setting up a condensed Directory Catalog in Adminstration Help.


Author Comment

ID: 18061725
Thanks Maryling, its a great idea because we replicate nearly every database to mobile users.
However, what i did to get myself going with this one is asked the user to replicate using the button while they're online for this time, this way I didn't have to download a copy of the entire directory.

I will definitely set up the condensed directory catalog, it will save me a lot of hassle in future.

Thanks you all for your great help, every one of your idea came handy, much appreciated.


Featured Post

Want Experts Exchange at your fingertips?

With Experts Exchange’s latest app release, you can now experience our most recent features, updates, and the same community interface while on-the-go. Download our latest app release at the Android or Apple stores today!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses

626 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question