CreateCopy (NotesDatabase - LotusScript®)

Creates an empty copy of the current database.

Defined in



Set notesDatabaseNew = notesDatabase .CreateCopy( newServer$ , newDbFile$ [, maxsize% ] )



String. The name of the server where the new database resides. Use an empty string ("") to create a copy on the current computer.


String. The file name of the new copy.


Note: This parameter is new with Release 5.

Integer. Optional. The maximum size (in gigabytes) that you would like to assign to the new database. This parameter applies only to Release 4 databases or those created on a server that has not been upgraded to Release 5. Entering an integer greater than 4, generates a run-time error that reads "Maximum size for database is 4 (gigabytes)," and the script fails.

Return value


NotesDatabase. The new copy.


If a database with the specified file name already exists on the newServer$, error number 4005 occurs ("File already exists").

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.

The ACL of the original database gets copied to the new database, but you may want to modify the copy 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.