createCopy method

Creates an empty copy of the current database.

Defined in



public Database createCopy(String server, String dbfile)
   throws NotesException

public Database createCopy(String server, String dbfile, int maxsize)
   throws NotesException


String server

String dbfile
int maxsize

Note This parameter is new with Release 5.

Return value



If a database with the specified file name already exists, an exception is thrown.

The copy contains the design elements of the current database, an identical access control list, and an identical title. It does not contain any documents.

The copy is not a replica.

Programs running on a server or using remote (IIOP) calls to a server can't create or access databases on other servers. In these cases, the server parameter must correspond to the server the program is running on. There are two ways to do this:

Programs running on a workstation can access several different servers in a single program.

The ACL of the original database gets copied to the new database, but you may want to modify the copy's ACL. For example, you may want Manager access to the copy for yourself even if you're not a manager of the original. Use the methods grantAccess and revokeAccess to modify the copy's ACL.

If the database property "Database is a template" is checked, the source is treated as a template instead of a database, and the method acts like the createFromTemplate method.

Language cross-reference

CreateCopy method in LotusScript NotesDatabase class

FileDatabaseCopy @command of formula language

See Also