
-START RESTSVC command (Db2)
The -START RESTSVC command starts the definition of a REST service that is stopped. You can qualify REST service names with a collection ID name.
On successful completion of the command, the specified REST services will be started and any new requests for the specified REST services can begin to execute.
When a new REST service is created, Db2 automatically starts the new REST service.
Abbreviation: -STA RESTSVC
Environment for -START RESTSVC
This command can be issued from a z/OS console, a DSN session under TSO, a DB2I panel (Db2 COMMANDS), an IMS or CICS terminal, or a program using the instrumentation facility interface (IFI).
Data sharing scope: Group
Authorization for -START RESTSVC
- System DBADM authority
- SYSOPR authority
- SYSCTRL authority
- SYSADM authority
Db2 commands that are issued from a logged-on z/OS® console or TSO SDSF can be checked by Db2 authorization using primary and secondary authorization IDs. A logged-on z/OS user ID must be defined in RACF or a similar security server.
Syntax for -START RESTSVC
Option descriptions for -START RESTSVC
For mixed case names, use single quotes (') around the input.
- ( *.* )
- Marks all versions of all REST services in all collection-ids as available to be invoked. Note: when specified, *.* can be the only RESTSVC parameter.
- (collection-id.service-name.version-id)
- Starts a specific version of the specified REST service in the specified collection-id.
- (collection-id.service-name)
- Starts all versions of the specified REST service in the specified collection-id.
- (collection-id.partial-name*)
- Starts all versions in a set of REST services in the specified collection-id. The names of all REST services in the set begin with partial-name and can end with any string, including the empty string. For example, PAYROLL.ABC* starts all REST services with names that begin with ABC in the PAYROLL collection-id.
- (service-name)
- Starts all versions of the specified REST service in the SYSIBMSERVICE collection-id.
- (partial-name*)
-
Starts all versions in a set of REST services in the SYSIBMSERVICE collection-id. The names of all REST services in the set begin with partial-name and can end with any string, including the empty string. For example, ABC* starts all REST services names that begin with ABC in the SYSIBMSERVICE collection-id.
- SCOPE
- Specifies the scope of the command.
- (GROUP)
- Starts the specified REST services in all members of the data sharing group.
Usage notes for -START RESTSVC
- Errors in a definition of a REST service
- Errors are detected at create time for a REST service created with the VALIDATE(BIND) BIND option, and a discover or invoke time for a REST service created with VALIDATE(RUN) BIND option.
- Trace information for commands issued with group scope
- If this command is issued with options that specify group scope in a Db2 data sharing member, it also runs on all other active members. IFICID 090 trace records for other group members can show that the same command was issued by the SYSOPR authorization ID from the 016.TLPKN5F correlation ID, in addition to the trace records from the member where the original command was issued. See Command scope in Db2 data sharing.
The START RESTSVC command affects all versions of the REST services that you specify in the command.
Output for -START RESTSVC
Message DSNL601I indicates the beginning of the output of a START RESTSVC command. Message DSN9022I will indicate the end of the output of the command if no failure occurred during the processing of the command. Message DSN9023I will indicate the end of the output of the command if an abend had occurred during the processing of the command.
Examples for -START RESTSVC
- Example: No authority for a START RESTSVC command
- The following command attempts to use the START RESTSVC command on a service that the user does
not have the proper authorities
for:
-DB2A STA RESTSVC('DB2zRESTServiceTestCollectionID.simpleSelect3')
The output is similar to this output:
DSNL601I -DB2A STA RESTSVC REPORT FOLLOWS- DSNL604I -DB2A USER HAS INSUFFICIENT AUTHORITY FOR START RESTSVC OF DB2zRESTServiceTestCollectionID.simpleSelect3 DSN9022I -DB2A DSNLJDSS 'START RESTSVC' NORMAL COMPLETION
- Example: Start all services within a collection ID
- The following command starts all services with the BankDemo collection ID
name:
-DB2A STA RESTSVC('BankDemo.*')
The output is similar to this output:
DSNL601I -DB2A STA RESTSVC REPORT FOLLOWS- DSNL607I -DB2A ALL SERVICES HAVE BEEN START FOR BankDemo.* DSN9022I -DB2A DSNLJDSS 'START RESTSVC' NORMAL COMPLETION
