DB2 START commands

-START is how operators make a stopped DB2 resource usable again: the whole subsystem, a table space, DDF, a stored procedure, a trace, or an optional component such as an accelerator or OpenTelemetry emission. START is not BIND and not CREATE. It changes runtime availability. This page walks each START form in the Command Reference family, with extra depth on START DB2 and START DATABASE because those are the two you cannot afford to confuse.

Db2 commands
Progress0 of 0 lessons

START versus DISPLAY and STOP

DISPLAY shows state. STOP makes a resource unavailable (or drains work). START reverses STOP—or initializes something that has never been started in this IPL (START DB2). Most START commands can be issued from a console, SDSF, DSN, DB2I, IMS, CICS, or IFI once the subsystem is up. START DB2 is the exception: only a z/OS console or TSO SDSF, because Db2 is not there to host DB2I yet.

START command catalog
CommandWhat it starts
-START ACCELTell Db2 to use named accelerator servers (optional ACCESS(MAINT) for maintenance)
-START CDDSAll data sharing members allocate and open the compression dictionary data set
-START DATABASEMake a database or space available (ACCESS RW / RO / UT / FORCE, PART)
-START DB2Initialize the subsystem (MSTR, DBM1, DIST, IRLM); console or SDSF only
-START DDFStart distributed data facility if it is stopped
-START DYNQUERYCAPTUREStabilize qualified cached dynamic queries; optionally monitor below threshold
-START FUNCTION SPECIFICStart a stopped external UDF (not built-in or sourced functions)
-START MLStart IBM Db2 AI for z/OS functions on this member
-START OTELStart OpenTelemetry support; EMIT(YES|NO) controls SMF 1161 span records
-START PROCEDUREActivate a stopped procedure or refresh the cached definition (schema-qualified)
-START PROFILELoad or reload profile tables into memory
-START RLIMITStart the resource limit facility using a specified RLST table
-START RESTSVCStart a stopped REST service definition (collection-qualified)
-START TRACEStart PERFM, ACCTG, STAT, AUDIT, or MONITOR traces to SMF/GTF/OPX

-START DB2

-START DB2 initializes the subsystem. When it completes, TSO, batch, IMS, and CICS can attach, and the MSTR, DBM1, DIST (if DDF is configured to start), and IRLM address spaces are active. IBM: when the operation is complete, the subsystem is active and available to TSO applications and to other subsystems (for example IMS and CICS).

Options that change how Db2 comes up

  • PARM(member) — load a specific DSNZPARM / subsystem parameter member instead of the default from the MSTR JCL. Use this when you must bring Db2 up with a recovery-oriented ZPARM.
  • ACCESS(MAINT) — maintenance mode. Only installation SYSADM and installation SYSOPR (the install authorities) can connect. Application plans fail to allocate. Use for CATMAINT, directory repair, or when you must guarantee no user SQL.
  • LIGHT(YES | NO | NOINDOUBTS) — data sharing light restart. LIGHT(YES) brings a member up quickly after a failure without retaining all locks for retained lock recovery on that path; it is an availability choice with recovery trade-offs. LIGHT(NO) is a normal restart. NOINDOUBTS is a related light option for indoubt handling. Read the Data Sharing Administration Guide before using LIGHT in production.
text
1
2
3
-START DB2 -START DB2 PARM(DSNZPACC) -START DB2 ACCESS(MAINT)

Watch MSTR job output for DSNY001I / DSNY002I style startup messages and for IRLM identifying itself. If IRLM is not started, START DB2 fails. In data sharing, a member that was cancelled may need retained-lock processing; DISPLAY GROUP on a surviving member tells you whether this restart is routine or a recovery restart.

START DB2 is not START DATABASE. The subsystem can be up while every user database is still STOP. Conversely, START DATABASE does nothing if Db2 itself is down. If MSTR starts and then DBM1 abends, you do not have a usable Db2 even though SDSF shows a DSNMSTR job. Read the MSTR and DBM1 JESMSGLG together. Missing IRLM, a damaged BSDS, or an archive-log tape mount that never comes are the usual “START DB2 hung” causes—not a missing START DATABASE.

After a successful START DB2, shops often run a short DISPLAY GROUP, DISPLAY LOG, and DISPLAY DDF checklist before releasing the subsystem to applications. ACCESS(MAINT) startups skip that release step until CATMAINT or REPAIR finishes and Db2 is stopped and started normally. Do not leave ACCESS(MAINT) in place overnight unless the change record says so; application owners will see attach failures that look like a down system.

-START DATABASE

-START DATABASE makes the specified database—or table spaces and index spaces inside it—available for use. Name the database, optionally SPACENAM, optionally PART. Wildcards match the same patterns as DISPLAY DATABASE.

ACCESS values on START DATABASE
ACCESSEffect
RWRead-write. Applications and utilities that require update can use the space. Normal production state.
RORead-only. SELECT and read-only utilities work; INSERT/UPDATE/DELETE and updating utilities fail. Use for investigation or to freeze a table space.
UTUtility-only. Protects the object while COPY, REORG, or RECOVER runs without application writers. Applications receive resource-unavailable errors.
FORCEReset certain restrictive statuses and start RW. Does not magically repair broken pages. Never FORCE a space that still needs RECOVER from RECP without understanding why RECP was set.
text
1
2
3
4
-START DATABASE(PAYROLL) -START DATABASE(PAYROLL) SPACENAM(TSACCT) ACCESS(RW) -START DATABASE(PAYROLL) SPACENAM(TSACCT) PART(1,2) ACCESS(RO) -START DATABASE(PAYROLL) SPACENAM(TSACCT) ACCESS(UT)

Always DISPLAY DATABASE first. If the status is STOP because someone issued STOP DATABASE, START with RW is correct. If the status is RECP, START FORCE does not replace RECOVER. If COPY pending, you likely need COPY (or START only after the pending reason is cleared). If a utility is STOPPED, START DATABASE will not finish that utility—restart or TERM it.

In data sharing, START DATABASE on one member can trigger group buffer pool recovery actions for GRECP objects. DISPLAY GROUPBUFFERPOOL and DISPLAY DATABASE LPL/GRECP before you start large numbers of spaces after a CF failure.

-START DDF

Starts the distributed data facility if it is not already started, enabling the DIST address space’s VTAM and/or TCP/IP listener so DRDA requesters can connect. If DDF failed to start at -START DB2 because of a port or VTAM problem, fix the network definition, then START DDF rather than bouncing the whole subsystem. DISPLAY DDF confirms STARTD. Applications that only run locally do not need DDF; JDBC/DDF workloads do.

-START TRACE

Starts Db2 traces. You choose TYPE (PERFM, ACCTG, STAT, AUDIT, MONITOR—abbreviations P, A, S, AU, MON), CLASS numbers, optional IFCID lists, DEST (SMF, GTF, SRV, OPX buffers), and qualification (PLAN, AUTHID, LOCATION, PKGLOC, and others). Accounting class 1 is cheap; class 3 wait times and class 7/8 package times cost more. Performance traces to GTF for a single plan are the usual diagnostic pattern. DISPLAY TRACE shows the trace number; STOP TRACE(n) turns it off. Leaving a wide PERFM trace on SMF can flood the MAN data sets—always pair START with a reminder to STOP.

text
1
2
-START TRACE(ACCTG) CLASS(1,2,3) DEST(SMF) -START TRACE(PERFM) CLASS(3) DEST(GTF) PLAN(PAYRPT)

-START PROCEDURE and -START FUNCTION SPECIFIC

START PROCEDURE activates the definition of a stored procedure that is stopped, or refreshes one stored in the cache. Qualify names with a schema. After STOP PROCEDURE (STOPQUE queues new CALLs; STOPREJ rejects them), START allows CALL again. After REPLACE_JAR or a WLM environment recycle, START PROCEDURE refreshes what Db2 cached about the routine. It does not compile Java and does not start WLM application environments by itself—check WLM and SDSF for the stored-procedure address space.

START FUNCTION SPECIFIC starts an external user-defined function that was stopped. Built-in functions and sourced functions cannot be started with this command. DISPLAY FUNCTION SPECIFIC is the matching display.

text
1
2
-START PROCEDURE(PAYROLL.PAY_CALC) -START FUNCTION SPECIFIC(PAYROLL.BONUS_UDF)

-START PROFILE, RLIMIT, and RESTSVC

START PROFILE loads or reloads the profile tables into a memory structure. Until you START PROFILE, rows in DSN_PROFILE_TABLE do nothing. After you UPDATE those tables, START PROFILE again to pick up changes (or use the documented reload behavior for your release). STOP PROFILE disables profiling.

START RLIMIT starts the resource limit facility (governor) and names the resource limit specification table (for example DSNRLSTxx under an authid). The governor can cancel runaway dynamic SQL based on ASUTIME in that table. DISPLAY RLIMIT shows whether it is active. STOP RLIMIT turns it off—useful if a bad RLST is cancelling production.

START RESTSVC starts a REST service that was stopped. Qualify with a collection ID. DISPLAY RESTSVC lists status. STOP RESTSVC prevents new discover/invoke requests without dropping the service package.

-START ACCEL, CDDS, DYNQUERYCAPTURE, ML, OTEL

  • START ACCEL — notifies Db2 to use the named IBM Db2 Analytics Accelerator servers. ACCESS(MAINT) limits the accelerator to maintenance. DISPLAY ACCEL confirms. Queries with SET CURRENT QUERY ACCELERATION then have a place to go.
  • START CDDS — directs all members of a data sharing group to allocate and open the compression dictionary data set used in GDPS Continuous Availability with zero data loss. DISPLAY LOG shows CDDS mode. STOP CDDS closes it.
  • START DYNQUERYCAPTURE — stabilizes access paths for qualified cached dynamic queries and can start monitoring of statements that match a scope but have not hit the execution threshold yet. DISPLAY DYNQUERYCAPTURE lists monitors. This is not START TRACE.
  • START ML — starts IBM Db2 AI for z/OS functions on the member. DISPLAY ML DETAIL shows daemons. Requires the Db2ZAI environment to be established; otherwise DISPLAY ML stays STOPPED.
  • START OTEL — Db2 13 OpenTelemetry (APAR PH67971). EMIT(YES) writes SMF type 1161 subtype 1 span records for unique units of work when a valid inbound W3C trace context is present. EMIT(NO) starts the function without emitting. The z/OS Data Gatherer OpenTelemetry Emitter reads those SMF records. Issue START OTEL on every data sharing member; SCOPE(GROUP) is not supported. DISPLAY OTEL DETAIL shows success/fail counts.
text
1
2
3
4
5
-START ACCEL(ACCEL1) -START PROFILE -START RLIMIT ID=DSNRLST01 -START OTEL EMIT(YES) -START ML

Authorization and safety

START DB2 is a z/OS operator action: RACF console authority plus whatever your shop requires to submit the MSTR procedure. START DATABASE requires database start privilege (SYSCTRL, SYSADM, DBADM, or STARTDB on that database depending on the command and object). START TRACE often needs TRACE, SYSOPR, or higher. Do not grant START DATABASE FORCE widely. Do not START TRACE(PERFM) CLASS(*) DEST(SMF) on a production member as a joke.

After every START, DISPLAY the same resource. START can complete (DSN9022I) while the object remains RECP or the procedure remains STOPQUE because WLM is down. The display is the proof, not the completion message.

Explain It Like I'm Five

START is flipping a switch from “closed” to “open.” START DB2 opens the whole school. START DATABASE opens one classroom. ACCESS(RO) opens the classroom but puts a sign on the crayons that says look-don’t-draw. ACCESS(UT) lets only the janitor (utilities) in. START DDF opens the front gate for visitors from other schools. START TRACE turns on a security camera. START PROCEDURE wakes up a helper robot that was told to nap. You still look through the window (DISPLAY) after you flip the switch.

Exercises

  1. Write the START DATABASE command to open PAYROLL.TSACCT for read-only application access, then the command to return it to read-write.
  2. Explain in two sentences when you would use START DB2 ACCESS(MAINT) instead of a normal START DB2.
  3. List three things START PROCEDURE does not do (for example: it does not INSTALL_JAR).
  4. Draft a START TRACE command for accounting classes 1–3 to SMF, and name the DISPLAY command that confirms it.
  5. If your site has data sharing, ask operations whether START OTEL must be issued on every member and why.

Quiz

Test Your Knowledge

1. Where can you issue -START DB2?

  • From SPUFI before the subsystem exists
  • From a z/OS console or TSO SDSF only
  • Only from CICS
  • Only as a DSN BIND subcommand

2. What does -START DATABASE(...) ACCESS(UT) mean?

  • Applications get full read-write SQL
  • Only Db2 utilities may access the named spaces; application SQL is rejected
  • DDF starts automatically
  • IRLM is stopped

3. What does -START DDF do?

  • Formats SYSCOPY
  • Starts the distributed data facility so remote DRDA requesters can connect (VTAM/TCPIP)
  • Binds all packages
  • IPLs z/OS

4. Why issue -START PROCEDURE after a Java JAR replace?

  • It re-IPLs IRLM
  • It activates a stopped procedure definition or refreshes a cached definition so CALL uses the new load/JAR resolution
  • It runs RUNSTATS
  • It grants SYSADM

5. What is -START OTEL EMIT(YES)?

  • A Db2 13 command that starts OpenTelemetry processing and emits SMF 1161 span records for units of work
  • A COPY utility option
  • A storage group parameter
  • Only valid on Db2 LUW