MarkForDelete (NotesDatabase - LotusScript®)

Marks a database for deletion from a server in a cluster.

Note: This method is new with Release 6.

Defined in

NotesDatabase

Syntax

Call notesDatabase .MarkForDelete( )

Usage

Once a database is marked for deletion, it does not accept any new database open requests. After all active users are finished with it, the Cluster Manager pushes all changes to another replica (if there is another replica) and then deletes the database.

Use this method if you want to remove a database that is obsolete or if you are copying a database from one server to another and want to delete the database from the original server. If you want to delete a database and all its replicas from a cluster, each database on each server must be marked for deletion.

This method cannot be undone. You cannot remove a mark for deletion from a database once this method is used.

This method sets IsPendingDelete to True and IsInService to False.

This method differs from the Remove method in that the database must be in a cluster. If the database is not on a server in a cluster, this method does not return an error, but the database is not deleted. Additionally, the Remove method fails if the database is in use. MarkForDelete waits for all current users to finish, then deletes the database. The Cluster Manager is responsible for deleting databases marked for deletion in the cluster; the Adminp task is not called.

You can programmatically determine if a database is available on other servers in a cluster by querying the CLDBDIR.NSF database, which exists on every cluster and holds an up-to-date list of all the databases in the cluster and their replicas. The CLDBDIR.NSF database also tracks each database's enabled or disabled status.

Use the DeleteReplicas method of the NotesAdministrationProcess class if you want to delete a database and all replicas of it from the entire domain.

This method requires Manager access privileges.

Example