Solved

Problem with too many large attachments...

Posted on 2001-09-03
9
214 Views
Last Modified: 2013-12-18
Hi all,

we have a database which is about 2Gb in size. Alot of the space is taken up with attachments. This database is replicated to various servers every night.

Does anyone have any ideas for reducing the size of the database to make it more manageable? We had an occassion when it would have been useful to copy the database, but didn't bother since it was so big.

We thought about putting all the attachments in a database of their own, but I'm not sure how to do it - How would a user insert the attachments? How would the first database link to them?

If anyone has had a similar problem, I would be interested in hearing any possible solutions.

Thanks,
Andrew.
0
Comment
Question by:ANDREAG
  • 4
  • 4
9 Comments
 
LVL 18

Expert Comment

by:marilyng
ID: 6451284
Andreag,

It would help to know if the attachments are compressed or zip files, or if they are full size, like word documents.
Is this an intranet application, or one that is accessed by both intranet and internet users?  What version of Notes?

Also,if the attachments are used all the time, or if you can archive out of date ones, then you can set up archiving on the database to move less active documents w/attachments to another database.

It is possible to store attachments in another Notes file, but this is done programmatically, and needs be carefully crafted so that attachments stored in one database can be managed by another (so, deletions, editing, etc. are all maintained).

Another way is to store the documents in a separate folder on the server, but this would also require a good deal of programming to maintain the links, allow the user to open the document, and maintain access control for allowing users to upload to the server.

Compacting the application on a regular basis via the server will reduce the extra white space, but not the size of the uploaded documents.

You can limit the size of the document attached..You can also program an agent to remove attachments from documents no longer in use and store these in another database.

Many possibilities, but all, I think require programming..

Perhaps someone else has a quick solution..

Marilyng
0
 

Author Comment

by:ANDREAG
ID: 6452441
I'm quite sure all the documents are UNzipped.
It's just an intranet application and we're using R5 servers. I doubt if all of the documents are being used.

I like the idea of putting all attachments in a folder on the server. Would it be possible to keep these files on only one server (all servers have access to the others) or would these need to be replicated in some way?

Not everyone would need to upload to the servers, only the editor in a central location.


0
 
LVL 8

Accepted Solution

by:
Jean Marie Geeraerts earned 100 total points
ID: 6452622
No quick solution.
What we did here is create an "attachment repository" where all attachments are saved. The application even checks for duplicate attachments.
In the attachments database a document is created per attachment. In the documents of the database where the attachments resided a doclink to this document is put in place of the attachment.
Before creating a new attachment a check is done to see whether an attachment with the same file name allready exists. If it does, file size is compared to see if the files are the same. If they are, then no no document with the attachment is created, but instead just a doc-link to the existing document is created.
The users can therefor still open their attachments by using the doclink to the document containing the attachment and a lot of diskspace is saved by eliminating duplicate attachments.
It did however as marilyng allready pointed out require some programming. Users have to click an action button in the attachments database to perform the move of the attachments. If it's a central database, you can off course schedule this to be done on a daily basis for example.
If you need help with the code, let me know. I can probably look it up and paste it here if you like.
0
 

Author Comment

by:ANDREAG
ID: 6452731
jerrith,

can you tell me what type of database I would create to hold the attachments? Also, the code for the Action button - I will see how I get on from there.

Andrew.
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 6452773
Just create a blank database, with one form to hold the attachments.
On the form create fields to hold the following :
richtext for the attachment, text for the name of the attachment, number for the size of the attachment, text for the document unique ID of the document you got the attachment from, text for the replica ID of the database that contains the source document.

Apperently they have hidden the design of the database, so I can't access the code anymore.

An agent is used to run through all documents of the source database and remove all attachments, that I can remember. I'll see if I can unhide the design of the database.
0
 

Author Comment

by:ANDREAG
ID: 6463511
jerrith,

so, a user would add attachments to the source database as normal, the Notes would put them in the "attachments" database?

I'd really like to see the code for that agent...
0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 6463568
I can't access the design of the database. Apparently they have hidden the design of the database and I don't have access to the original template.

However it should be fairly straightforward for you to create the agent (if you are kowledgeable in LotusScript).
I don't have time to write the agent at this moment. However here is the logic and a summary of classes/methods you need to look into to write the agent :

1) To run through all documents in the source database, create a handle to a view in the source database and then process all documents in this view.
->
get a handle to the source database (use the new method of the notesdatabase class) and open a view using the getview method.
get the first document using the GetFirstDocument method from the notesview class. Create a while loop to run through documents, use GetNextDocument at the end of the loop to get the next document and check for Doc Is Nothing.

2) From the source document, use methods of NotesRichtextItem to detach the attachments and remove them. Use NotesEmbeddedObject class properties and methods to check the attachments and attach them to a new document created in the repository database.

3) Put a doclink in the source document to the document holding the attachment and put a doclink in the document with the attachment to the original source document.

4) After you move the attachment, don't forget to remove it from the source document.

If you think you won't be able to write the agent, let me know how urgently you need it and I will try to find the time to write it for you.

Regards,

JM
0
 

Author Comment

by:ANDREAG
ID: 6463818
thanks jerrith,

I've had a look around Google Groups and found a script to search the Inbox and remove attachments from mail and put them in a folder on the hard disk. I'll try and use it along with the suggestions you gave. Hopefully I'll come up with a solution. I have a while to experiment, so I'll try it myself, thanks.
0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 6463928
You're welcome. Keep me posted about your progress and if you get stuck I'll try to help you out.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Fax server not receiving SMTP from Lotus Notes 6 330
Lotus notes email code 2 185
Lotus notes VB code 4 200
Domino Server 2 68
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

747 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

13 Experts available now in Live!

Get 1:1 Help Now