Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

SET-SQL-DB-CATALOG-STATUS

Changes the status of a database

Scope of validity

DBH administration

See also

Administration statement SHOW-SQL-DB-CATALOG-ENTRIES on "SHOW-SQL-DB-CATALOG-ENTRIES"

Function

The SET-SQL-DB-CATALOG-STATUS statement changes the status of a database.

The possible statuses of a database and what they mean are explained in the functional description of the SHOW-SQL-DB-CATALOG-ENTRIES administration statement.

Depending on the current status of the database, i.e. its status before you issue the SET-SQL-DB-CATALOG-STATUS administration statement, the statement has different results. A distinction can be drawn between the following cases:

  • When the status of the database is ACTIVE before you issue the administration statement:

    • If you specify STATUS = ACTIVE in the administration statement, there is no response. The status of the database remains ACTIVE.

    • If you specify STATUS = FREE in the administration statement, then the call is synchronized if internal or external transactions involving this database are still open. After synchronization is completed, the database is physically closed and the status of the database is set to FREE in the SQL database catalog.

  • When the status of the database is FREE or LOCKED before you issue the administration statement:

    • If you specify STATUS = ACTIVE in the administration statement, the database is physically opened.

    • If you specify STATUS = FREE in the administration statement, nothing happens. The status of the database remains FREE.

  • When the status of the database is CLOSED before you issue the administration statement:

    • If you specify STATUS = ACTIVE in the administration statement, there is no response. The status of the database remains CLOSED

    • If you specify STATUS = FREE in the administration statement, the database is physically closed and released.

  • When the status of the database is RECOVER, REFRESH or REORG, you cannot change the status using this statement.

SET-SQL-DB-CATALOG-STATUS

STATUS = *ACTIVE / *FREE

,SELECT = *LOGICAL(...) / *PHYSICAL(...)


*LOGICAL(...)



|

CATALOG-NAME = <filename 1..18 without-cat-user-gen-vers>


*PHYSICAL(...)



|

PHYS-CATALOG-NAME = <filename 1..18 without-cat-user-gen-vers>

Operands

STATUS = *ACTIVE / *FREE

Status to which the database is to be set

SELECT =Specifies the name by means of which the entry is identified.

SELECT = *LOGICAL(...)

The entry is identified by means of the logical database name.

CATALOG-NAME = <filename 1..18 without-cat-user-gen-vers>

Logical name of the database whose status is to be changed.

SELECT = *PHYSICAL(...)

The entry is identified by means of the physical database name.

PHYS-CATALOG-NAME = <filename 1..18 without-cat-user-gen-vers>

Physical name of the database whose status is to be changed


Administration command in ISP format and at the CALL DML interface

The OPT,DBC-UPD administration command corresponds to the SET-SQL-DB-CATALOG-STATUS administration statement here.

OPT,DBC-UPD,supplement,S[TATUS]=state
	state 		::= {A[CTIVE] | F[REE]}
	supplement 	::= {C[ATALOG]=catalog-name|P[HYSICAL-NAME]=physical-name}