PreviousNext

Setting the _s(sec) Variable

You can supply the name of the registry site to bind to as an argument to the dcecp commands that operate on the registry. If you do not supply a name, the command binds to the replica named in the _s(sec) variable. If this variable is not set, the command binds to the cell's master replica. You can set the _s(sec) variable and then use that replica as the default replica for dcecp registry commands. To do so, use the set command as shown in the following sample that sets the default replica to the master replica (named slave_3) in the cell giverny.com:

dcecp> set _s(sec) /.../giverny.com/subsys/dce/sec/slave_3
dcecp>

The name of the new default replica that you supply as an argument to the set command can be in any of the following forms:

· A cell name (for example, /.../dresden.com)

If you enter a cell name, the named cell becomes the default cell. The DCE control program randomly chooses a replica to bind to in the named cell, and that replica becomes the default replica.

· The global name given to the replica when it was created (for example, /.../dresden.com/subsys/dce/sec/rs_server_250_2)

A global name identifies a specific replica in a specific cell. That cell becomes the default cell, and that replica becomes the default replica.

· The replica's name as it appears on the replica list of the current default replica (that is, its cell-relative name; for example, subsys/dce/sec/rs_server_250_2)

That replica becomes the default replica, and the cell in which the replica exists becomes the default cell.

· The network address of the host on which the replica is running (for example, ncadg_ip_udp:15.22.144.248)

The replica on that host becomes the default replica, and the cell in which the host exists becomes the default cell.

Some of the dcecp commands can act only on the master replica and thus require binding to the master. If you execute a command that acts only on the master and the master is not the default replica, in most cases dcecp automatically attempts to bind to the master replica in the current default cell. In other cases, dcecp displays an error message, and the command fails.