createReplica (Database - Java)

Creates a replica of the current database at a new location.

Defined in

Database

Syntax

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

Parameters

String server

The name of the server where the replica will reside. Specify null or an empty string ("") to create a replica on the current computer.

String dbfile

The file name of the replica.

Return value


Database

The new replica.

Usage

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

The new replica has the same access control list as the current database.

Programs making 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:

  • Use null or an empty string ("") to indicate the current computer. This is the safer method.
  • Make sure the name of the server that the program runs on matches the name of the server parameter.

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

Example