Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Problem with too many large attachments...

Posted on 2001-09-03
9
Medium Priority
?
230 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
[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
  • 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 400 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

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
 
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

Independent Software Vendors: 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!

Question has a verified solution.

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

  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

604 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