Solved

Replication formula doesn't work

Posted on 1998-11-30
13
499 Views
Last Modified: 2013-12-18
I designed a Notes database in which I have a "Preferences" document for saving various user parameters e.g. a serial number which is incremented every time a document of a specific form is created. The Prefernces document is created and maintained internally using LotusScript. I am using the following replication formula for my database in order to protect the Prefernces document from being overwritten by the Preferences document of a replica:

SELECT Form != "Preferences"

The problem is that the Preferences document does get overwritten from time to time without being able to find out why my replication formula doesn't work.

Any suggestions? Please help!
0
Comment
Question by:marios
  • 4
  • 3
  • 2
  • +4
13 Comments
 

Author Comment

by:marios
ID: 1117695
Adjusted points to 150
0
 
LVL 1

Expert Comment

by:bbangerter
ID: 1117696
Do all replicas of the database contain the same replication formula?
Replication formulas do not replicate across databases.  So potentially you might have one replica of the database that contains the formula, and another one that does not.  Depending on which database the replication is being initiated from the replication formula could be different.
0
 
LVL 2

Expert Comment

by:ray_leach
ID: 1117697
Does your form have an alias? Why not use the master slave principle and have the ACL in the master database not allow updates to the preferences form from other servers?
0
 
LVL 1

Expert Comment

by:rloomis
ID: 1117698
Do you store form in document?  If  so, is the form name stored in $title rather than in form?  BTW, what you're doing sounds a lot like what the profile field was created for.  You might want to look at that feature.
0
 

Expert Comment

by:mkthakur
ID: 1117699
Please try
SELECT !(Form = "Preferences")
if it doesn't work then try putting the same formula at every replica.
0
 

Author Comment

by:marios
ID: 1117700
The Preferences document is created transparently with LotusScript. There is no form used to create it and no "Preferences" form exists, although my document has a field named "Form" which contains the value "Preferences".
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.

 

Expert Comment

by:mkthakur
ID: 1117701
Did you actually try my suggestion? It should work even if it is a field.
Moreover when you create the document there is a property called Form also exists. So it should work.


0
 

Author Comment

by:marios
ID: 1117702
I tried mkthakur's suggestion with no luck. I noticed that the Preferences document is overwritten when a new replica is created and the replication formula is NOT set BEFORE the documents start replicating. In other words, it seems that there is no problem when the replication formula is set in Replication Settings before the replica is initialized. Still, this doesn't make any sense since the original database on the server already has a replication formula, and therefore should not accept any documents with Form = "Preferences". Right? Or is it that once two documents are replicas of each other, then their changes are replicated regardless of the replication formulas? The problem is solved if the answer to the last question is "yes".
0
 

Expert Comment

by:mkthakur
ID: 1117703
Could you please tell me the steps which you are doing more clearly and what do you intend to do.
0
 

Author Comment

by:marios
ID: 1117704
I experimented with this to death, and finally concluded that the problem is because the replication formulas are not the same (as bbangerter said). Of course it's nice to know what is causing the problem, but this doesn't help me because I cannot force my users to set the correct replication formula every time they create a replica. Anyway, someone please reply to this question so that I can give you the points (most of them).
0
 
LVL 1

Expert Comment

by:ChrisD
ID: 1117705
I am not a Notes developer so this may be a stupid question,
Would it be possible in LotusScript to save your preferences info into a local text file and look it up when required? - instead of referencing the information from within the DB? If you could automatically create this file (e.g prefs.txt)the file name would be the same for everybody but each would contain different info.
Alternatively - could you set up a lookup DB with a preferences document for each user ? - it could work out who they are from their ID file and lookup the corresponding document in the second DB ?

If all this is totally off the point, I apologize. Like I said, it's not my thing really -  but I am interested to know if this kind of stuff can be done with Notes. If it can't, then It's a bit basic I would think.
0
 
LVL 4

Accepted Solution

by:
stamp earned 200 total points
ID: 1117706
Perhaps this helps you:

In the ACL define a role "DoNotReplicate".

In properties of "Preferences" form deselect under key symbol: "All readers and above"
and select "[DoNotReplicate]". Resave all documents you want to protect this way.

Give this role in the ACL only to those peoples and servers which do not replicate...
And this is the point. If you can not separate them, do not do the upper work.

Important note: you can not see any document without dedicated role.
Even not as manager!
0
 
LVL 1

Expert Comment

by:ChrisD
ID: 1117707
instead of using the selectForm command - why not use ([Compose];"";"preferences")where "preferences is the basic form - have hidden fields in the form which are all computed ones so no user entry is required - this will add in all the info you need, include in the formula  save and close commands and it will be created in the DB invisibly to the user. Give it a hidden Author field with @Username and reference it when required.

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

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
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…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

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

24 Experts available now in Live!

Get 1:1 Help Now