Link to home
Start Free TrialLog in
Avatar of CommView
CommView

asked on

How to create a empty replica?

I'm trying to create an empty replica database.
After creating this empty replica database, I will use API to create a selective replication formula.
Then the replicator will do the rest, I hope.

What I want is this.
- I have a database with 1000 documents.
- I want to create a replica without documents, through lotus-script.
- Create the selective replication formula (API).
- Replicate (about 15 documents are replicated).

I tried the standard functions (like CreateReplica), but you cannot use "Replication Options".
Does anybody know how to create this empty replica?
Avatar of martijnmulder
martijnmulder
Flag of Honduras image

what we have done is create an empty replica manually (just select an emtpy view or folder in the replication settings) and attach that empty replica to a document. using lotusscript you can then detach it.....

martijn
Avatar of marilyng
marilyng

How empty do you want it to be?  Else delete stubs and design stubs will go with it and if the "empty" replica is held after the server purges it's delete and design stubs, those that sit on the empty will come back.

To avoid having the stubs replicate, we normally enable the "do not send deletions to other replicas", create a new replica, (restore the delete on the original), then in replication advanced settings change the "remove files older than --" to 0.

Compact the new replica should remove the design stubs.

Verify with Notes Peek.

(Note: if your server version is live, then I would recommend spawning a local replica and creating a clean replica from that one.

But this is probably not what you are looking for.. smile.
How about first setting a replication formula that won't select any documents in the original database, create the replica and then changing the replication formula to whatever you want ?
Just thinking out loud, here ;-)
Avatar of CommView

ASKER

I will try to work out the idea of having an empty replica attached. Seems a good suggestion to me!

On another site I got a suggestion of using API to create an empty replica. This would do better and makes it easier for employees/customers to work with.
Just a quick note, on the last project we had to create empty replicas for installation CD's, and we went through a long process trying to create these without having the design and delete stubs carry into the replica.  However, this was in Notes 4.6, so the API for R5 might have a few bells and whistle calls that can remove the stubs.. we were not successful using the API.  The delete and design stubs carry into the replica and are hidden files.

Reason we noticed this is because a user who had trained on an application, but didn't use it for six months, found she had new duties that required her to use it.  So, when she installed using the CD and then replicated, about 500 training document stubs and an assortment of design elements migrated up to the live application on the server.

If you're sure that your replica will be generated every 30 or 60 days, then you won't have a problem.
ASKER CERTIFIED SOLUTION
Avatar of asselin
asselin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It's clear to me who earns this points!!
- martijnmulder your answer was very creative, but I guess you will use the code from asselin next time.
- marilyng, thanks for your suggestions and remarks!
- jerrith, don't stop thinking out loud... you never know!

asselin, your code seems the work fine.
Thanks again!

Well, I've learned something from this question too, so thinking out loud helped :-)
You're welcome..
Marilyng
CommView
i was just wondering if you could post the code you will use to create the selective replication formula ? We are doing  something similar and having some problems with it....
I've tried this code, but I keep on getting :

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Method : Int32 W32_NSFDbCreateAndCopy(System.String ByRef, System.String ByRef, Int64, Int64, Int64, Int64)


VB.NET 2008