Operating remote systems

As an administrator in a distributed relational database, you might have to operate a remote IBM® i product.

For example, you might have to start or stop a remote server. The IBM i product provides options that help you ensure that a remote system is operating when it needs to be. Of course, the simplest way to ensure that a remote system is operating is to allow the remote location to power on their server to meet the distributed relational database requirements. But, this is not always possible. You can set up an automatic power-on and power-off schedule or enable a remote power-on to a remote server.

The system provides several ways to do this either in real time or at previously scheduled times. More often, you might need to perform certain tasks on a remote system as it is operating. The three primary ways that you can do this is by using display station pass-through, the Submit Remote Command (SBMRMTCMD) command, or stored procedures.

The Submit Remote Command (SBMRMTCMD) command submits a CL command using Distributed Data Management (DDM) support to run on the server. You first need to create a DDM file. The remote location information of the DDM file is used to determine the communications line to be used. Thus, it identifies the server that is to receive the submitted command. The remote file associated with the DDM file is not involved when the DDM file is used for submitting commands to run on the server.

The Submit Remote Command (SBMRMTCMD) command can submit any CL command that can run in both the batch environment and through the QCAEXEC system program; that is, the command has values of *BPGM and *EXEC specified for the ALLOW attribute. You can display the ALLOW attributes by using the Display Command (DSPCMD) command.

The primary purpose of the Submit Remote Command (SBMRMTCMD) command is to allow a client user or program to perform file management operations and file authorization activities on objects located on a server. A secondary purpose of this command is to allow a user to perform nonfile operations (such as creating a message queue) or to submit user-written commands to run on the server. The CMD parameter allows you to specify a character string of up to 2000 characters that represents a command to be run on the server.

You must have the proper authority on the server for the CL command being submitted and for the objects that the command is to operate on. If the client user has the correct authority to do so (as determined in a server user profile), the following actions are examples of what can be performed on remote files using the Submit Remote Command (SBMRMTCMD) command:

  • Grant or revoke object authority to remote tables
  • Verify tables or other objects
  • Save or restore tables or other objects

Although the command can be used to do many things with tables or other objects on the remote system, using this command for some tasks is not as efficient as other methods on the system. For example, you can use this command to display the file descriptions or field attributes of remote files, or to dump files or other objects, but the output remains at the server. To display remote file descriptions and field attributes at the client, a better method is to use the Display File Description (DSPFD) and Display File Field Description (DSPFFD) commands with SYSTEM(*RMT) specified, and specify the names of the DDM files associated with the remote files.