Solved

creating replica

Posted on 2006-11-28
13
378 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
  • 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
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…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

911 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now