Extract data from corrupted databases using LotusScript code

Source: Internet
Author: User
ArticleDirectory
    • Problem:
Problem:

In some rare cases, a notes/domino database may fail to be opened due to damage. But when you use
When notespeek or another tool checks the database, it finds that the documents still look intact. However, you
This issue cannot be fixed when "fixup", "updall-R", or "Compact" is used. There are other ways to restore these documents and
Can I access these documents?

Answer:

After the database is damaged, you may use the LotusScript proxy
The document is copied from the corrupted database to another new database. If the damaged part only affects the design of the database,
These documents can be recovered.

For example, if a user's email file cannot be opened by the Notes client, you can create
Create a new email database. Then write a proxy to copy the documents in the corrupted database to the new mail count.
Database. This proxyCode.
Note: This script code is only a method for dealing with database corruption. Before running the script, you should try other methods (see later)

Example of proxy code:

1. Create a manually executed proxy in any database.

2. Use the following sample code and execute it,

Sub initialize
Dim s as new notessession
'Change "" In the next line to the appropriate server name if the database is not local.
Dim srcdb as new notesdatabase ("", "badfile. nsf") 'replace "badfile. nsf" with the name of the specified upted DB
Dim newdb as new notesdatabase ("", "newfile. nsf") 'replace "newfile. nsf" with the name of the new DB
Dim Coll as notesdocumentcollection
Dim doc as notesdocument
Set coll = srcdb. alldocuments
For I = 1 to Coll. Count
Set Doc = Coll. getnthdocument (I)
Call Doc. copytodatabase (newdb)
Next
End sub

Other possible solutions:

-- Try to use log. nsf to locate a corrupted document or design element, and copy and paste these documents or elements.
To this database.
-- Create a copy or a new copy for the database.
-- Run "fixup", "updall-R", or "Compact ".
-- If the database has a full-text index, you can try to delete and recreate the full-text index.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.