Solved

creating replica

Posted on 2006-11-28
13
381 Views
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.
Varvoura
 
0
Comment
Question by:varvoura
[X]
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
13 Comments
 
LVL 46

Accepted Solution

by:
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
    http://www.breakingpar.com/bkp/home.nsf/0/87256B280015193F87256EAD004F314C
0
 

Author Comment

by:varvoura
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.

0
 

Author Comment

by:varvoura
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??

0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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?
0
 
LVL 8

Assisted Solution

by:behenderson
behenderson earned 100 total points
ID: 18031307
Quicker possibility

Dim vServer as Variant

vServer = Evaluate( "@Subset(@MaildbName; 1)" )
strServer = vServer(0)
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...
0
 

Author Comment

by:varvoura
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
0
 
LVL 8

Expert Comment

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

Expert Comment

by:behenderson
ID: 18033624
I'll have to read those damn yellowbooks some more.
0
 
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?
0
 

Author Comment

by:varvoura
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

 
0
 
LVL 18

Assisted Solution

by:marilyng
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.

Regards!
0
 

Author Comment

by:varvoura
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.

Varvoura
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

751 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