< Day Day Up > |
Administrative commands are provided to assist the user with the active administration, resource specification, and environment modification of DB2 subsystems. Each command modifies an environmental aspect of the DB2 subsystem. The administrative commands are as follows :
Administrative Command GuidelinesWhen you issue administrative commands, you are actually changing the DB2 environment. Administrative commands should be used with caution. Review the following guidelines before utilizing administrative commands. Educate the Users of Administrative CommandsOnly an experienced analyst who knows the DB2 commands and their effect on the DB2 subsystem and its components should issue administrative commands. Such control should be accomplished by implementing strict DB2 authorization procedures. Use ALTER BUFFERPOOL to Dynamically Manage BufferpoolsThe ALTER BUFFERPOOL command can be used to dynamically change the size and characteristics of a buffer pool. The following parameters can be used to change the buffer pool using ALTER BUFFERPOOL :
Use ALTER UTILITY to Impact REORG ProcessingThe ALTER UTILITY command can be used to change the value of the DEADLINE , MAXRO , LONGLOG , and DELAY parameters for REORG utilities running SHRLEVEL REFERENCE or SHRLEVEL CHANGE . Refer to Chapter 33, "Data Organization Utilities," for more information on the functionality of these parameters. Use ARCHIVE LOG to Synchronize Disaster Recovery Plans with DB2Issue the ARCHIVE LOG command to synchronize DB2 log archival and copying with application and DB2 Catalog image copies sent to a remote site for disaster recovery. See Chapter 38, "DB2 Contingency Planning," for further guidance. Use ARCHIVE LOG to Synchronize New Logs with Shift ChangesSometimes a new active DB2 log should begin at the commencement of each new operational shift. This can be accomplished with the ARCHIVE LOG command. Use RECOVER INDOUBT with CautionThe RECOVER INDOUBT command can abort or commit changes made by in-doubt threads. Be cautious before committing in-doubt threads. Most DB2 programs are coded to process updates in commit scopes defined as a unit of work. The unit of work, as described in Chapter 11, "Using DB2 in an Application Program," is coded as much as possible to maintain data integrity between related tables. If the RECOVER INDOUBT command commits changes for a partial unit of work, the affected tables may not be in a consistent state. If database-enforced referential integrity is always used, this is not a concern because the database forces the tables to be in a consistent state. However, very few applications require that every referential constraint be explicitly defined and enforced by DB2. Avoid Using ACCESS(FORCE)Issuing the START DATABASE command with the ACCESS(FORCE) option is not recommended because it may cause table spaces or indexes to be in an inconsistent state. ACCESS(FORCE) forces all pending flags (check, copy, and recover) to be reset for the specified object. Never use ACCESS(FORCE) unless you are absolutely sure that the data is in a consistent state for the specified object (for example, after restoring objects using the DSN1COPY service aid utility). To be safe, never use ACCESS(FORCE) . Instead, use the appropriate utility to reset the exception flags. Ensure That DASD Is Online Before Stopping DatabasesThe DASD volume for the underlying VSAM data sets for the object that will be started by the START DATABASE command does not need to be online when the START command is issued. Because the STOP DATABASE command closes the underlying VSAM data sets, however, the corresponding volume for that object must be online when the STOP command is issued. Start and Stop at the Partition LevelThe START and STOP commands can be executed for partitioned table spaces and indexes at the partition level. This functionality enhances availability by enabling users to stop only portions of an application (table space or index). Be Aware of the Time Constraints of the STOP CommandThe STOP command can be used to close VSAM data sets and cause buffer pages associated with the closed data set to be flushed and forced to DASD. The VSAM close operation may take a while before it is complete, though. The buffers may not be flushed completely to DASD immediately after the STOP DATABASE command completes. Subsequent processing must consider this fact. Explicitly Start Objects Stopped with the SPACENAM ParameterWhen a table space or index is explicitly stopped using the SPACENAM parameter of the STOP DATABASE command, it must be explicitly started again before it can be accessed. Starting at the database level will not affect the status of explicitly stopped table spaces or indexes. Use START PROCEDURE Before CallingThe START PROCEDURE command must be issued for each DB2 stored procedure prior to any application calling the stored procedure. Failure to start a stored procedure before trying to execute it with the CALL statement results in the CALL statement failing. Use the ACTION Clause When Stopping Stored ProceduresThe stop command disables subsequent executions of the named stored procedure. The ACTION clause can be specified to indicate whether future attempts to run the stored procedure will be entirely rejected [ACTION(REJECT)] or queued [ACTION(QUEUE)] to be run when the stored procedure is started again. Use START RLIMIT to Vary Resource LimitsSTART RLIMIT can use different resource limit specification tables (RLST) with different limits. By specifying the ID parameter, a specific RLST is chosen ; for example -START RLIMIT ID=02 starts the RLF using the SYSIBM.DSNRLS02 table. This enables different limits to be specified for
Use START TRACE to Specify Trace DestinationsWhen issuing the START TRACE command, each type of trace can specify different destinations for the trace output. The following lists destinations for each type of trace:
Use START TRACE to Specify ConstraintsWhen you issue the START TRACE command, each type of trace can place optional constraints on the data to be collected. The following lists constraints for each type of trace:
Use No More Than Six Active TracesAlthough as many as 32 traces can be active at one time, you should limit the number of active traces to 6 to avoid performance degradation. Add this recommendation to the trace guidelines presented in Chapter 24 to establish the proper controls for issuing DB2 traces. Be Aware of the Authority Required to Terminate UtilitiesTo terminate utilities, the issuer of the TERM UTILITY command must meet one of the following requirements. The issuer must
If your operational support staff must have the ability to terminate utilities that they did not originally submit, they should be granted SYSOPR authority. However, SYSOPR authority permits the user to start and stop DB2, which is not generally acceptable because the uncontrolled issuing of these commands can wreak havoc on a production system. There is no viable alternative to SYSOPR authority, though, because explicit TERM UTILITY authority is unavailable. Avoid Using Wildcards When Terminating UtilitiesWhen terminating utilities, explicitly specify the UID to be terminated , rather than use the -TERMINATE UTILITY command to terminate all utilities invoked by your ID. When you explicitly specify what should be terminated, you avoid inadvertently terminating an active utility. After a utility is terminated, it can never be restarted. The utility must be rerun from the beginning and may require data recovery before rerunning. Use Caution When Changing System Parameters "On The Fly"Changing system parameters can have a dramatic impact on the manner in which your DB2 subsystem operates. Before changing any DSNZPARM system parameters using the SET SYSPARM command, be sure to examine the parameter in “depth and understand the effect the change will have on your DB2 subsystem. Also, be aware that not every system parameter can be changed dynamically. Consult the IBM DB2 Installation Guide (Appendix C) for a complete list of system parameters, including information regarding whether or not each parameter can be changed dynamically. |
< Day Day Up > |