DB2 Version 9.7 for Linux, UNIX, and Windows

START DATABASE MANAGER command

Starts the current database manager instance background processes on a single database partition or on all the database partitions defined in a multi-partitioned database environment.

This command is not valid on a client.

Scope

In a multi-partitioned database environment, this command affects all database partitions that are listed in the $HOME/sqllib/db2nodes.cfg file, unless the DBPARTITIONNUM parameter is used.

Authorization

One of the following:
  • sysadm
  • sysctrl
  • sysmaint

The ADD DBPARTITIONNUM start option requires either sysadm or sysctrl authority.

You must meet Windows operating system requirements for starting a service. If Extended Security is disabled, you must be a member of the Administrators, Server Operators or Power Users group. If Extended Security is enabled, you must be a member of either the Administrators group or the DB2ADMNS group to start the database.

Required connection

None

Command syntax

Read syntax diagramSkip visual syntax diagram
>>-+-START--+-DATABASE MANAGER-+-+------------------------------>
   |        +-DB MANAGER-------+ |   
   |        '-DBM--------------' |   
   '-db2start--+----+------------'   
               '-/D-'                

>--+--------------------------------------------------------+--->
   '-REMOTE--+----------+--instancename--| remote options |-'   
             '-INSTANCE-'                                       

>--+---------------------------------------------------------+-->
   '-ADMIN MODE--+------------------+--+-------------------+-'   
                 +-USER--username---+  '-RESTRICTED ACCESS-'     
                 '-GROUP--groupname-'                            

>--+------------------+----------------------------------------->
   '-PROFILE--profile-'   

>--+--------------------------------------------------------+--><
   '-DBPARTITIONNUM--db-partition-number--| start options |-'   

remote options

|--+-ADMINNODE--nodename-+--USER--username--USING--password-----|
   '-HOSTNAME--hostname--'                                    

start options

|--+----------------------------------------------------+-------|
   +-ADD DBPARTITIONNUM--| add dbpartitionnum options |-+   
   +-STANDALONE-----------------------------------------+   
   '-RESTART--| restart options |-----------------------'   

add dbpartitionnum options

|--HOSTNAME--hostname--PORT--logical-port----------------------->

>--+-------------------------+--+----------------+-------------->
   '-COMPUTER--computer-name-'  '-USER--username-'   

>--+--------------------+--+------------------+----------------->
   '-PASSWORD--password-'  '-NETNAME--netname-'   

>--+------------------------------------------+-----------------|
   +-LIKE DBPARTITIONNUM--db-partition-number-+   
   '-WITHOUT TABLESPACES----------------------'   

restart options

|--+--------------------+--+--------------------+--------------->
   '-HOSTNAME--hostname-'  '-PORT--logical-port-'   

>--+------------------------+--+----------------+--------------->
   '-COMPUTER--computername-'  '-USER--username-'   

>--+--------------------+--+------------------+-----------------|
   '-PASSWORD--password-'  '-NETNAME--netname-'   

Command parameters

/D
Allows the DB2® product installation on Windows to be run as a process. Note that you cannot use the /D parameter to start a DB2 instance as a process in a partitioned database environment.
REMOTE [INSTANCE] instancename
Specifies the name of the remote instance you want to start.
ADMINNODE nodename
With REMOTE, or REMOTE INSTANCE, specifies the name of the administration node.
HOSTNAME hostname
With REMOTE, or REMOTE INSTANCE, specifies the name of the host node.
USER username
With REMOTE, or REMOTE INSTANCE, specifies the name of the user.
USING password
With REMOTE, or REMOTE INSTANCE, and USER, specifies the password of the user.
ADMIN MODE
Starts the instance in quiesced mode for administration purposes. This is equivalent to the QUIESCE INSTANCE command except in this case the instance is not already "up", and therefore there is no need to force the connections OFF.

If the ADMIN MODE option is specified alone, the databases within the quiesced instance will be activated to do authorization checking for all connect attempts to the database. This is necessary to determine if the connecting user ID has dbadm authority; this authority is stored in the database catalog and the database must be activated to determine if the user ID has it. To prevent this authorization checking from happening, specify the RESTRICTED ACCESS option.

USER username
With ADMIN MODE, specifies the name of the user.
GROUP groupname
With ADMIN MODE, specifies the name of the group.
RESTRICTED ACCESS
Specify this option to prevent authorization checking for all connect attempts to the databases of a quiesced instance to determine if the user ID has dbadm authority. Instance-level authorization checking can still occur; checking a user ID for sysadm, sysctrl, or sysmaint authority does not require a database to be activated.
Note: This command option is available in DB2 Version 9.7 Fix Pack 2 and later fix packs.

All of the following parameters are valid in an Enterprise Server Edition (ESE) environment only.

PROFILE profile
Specifies the name of the profile file to be executed at each database partition to define the DB2 environment. This file is executed before the database partitions are started. The profile file must reside in the sqllib directory of the instance owner. The environment variables in the profile file are not necessarily all defined in the user session.
DBPARTITIONNUM db-partition-number
Specifies the database partition to be started. If no other options are specified, a normal startup is done at this database partition.

Valid values are from 0 to 999 inclusive. If ADD DBPARTITIONNUM is not specified, the value must already exist in the db2nodes.cfg file of the instance owner. If no database partition number is specified, all database partitions defined in the configuration file are started.

ADD DBPARTITIONNUM
Specifies that the new database partition server is added to the db2nodes.cfg file of the instance owner with the hostname and logical-port values.

Ensure that the combination of hostname and logical-port is unique.

The add database partition server utility is executed internally to create all existing databases on the database server partition being added. The new database partition server is automatically added to the db2nodes.cfg file.

Note: Any uncataloged database is not recognized when adding a new database partition. The uncataloged database will not be present on the new database partition. An attempt to connect to the database on the new database partition returns the error message SQL1013N.

If the ADD request is made in an environment that has two or more active database partition servers, the new database partition server is visible to the environment when the ADD processing completes.

If the ADD request is made in an environment that has one database partition server and it is active, after ADD processing completes, the new database partition server is inactive. The instance must be restarted by using db2stop and db2start before the new database partition server can participate in the partitioned database environment. If the ADD request is made in an environment that has one database partition server and it is inactive, after ADD processing completes, the new database partition server (or servers, if more than one is added) is active. Only the original database partition server needs to be started.

A newly added database partition is configured during ADD processing as follows:
  1. In a multipartition environment, the new database partition is configured using the database configuration parameter values from a noncatalog database partition.
  2. In a single-partition environment, the new database partition is configured using the database configuration parameter values from the catalog partition.
  3. If a problem occurs in copying the database configuration parameter values to the new database partition, the new database partition is configured using the default database configuration parameter values.
HOSTNAME hostname
With ADD DBPARTITIONNUM, specifies the host name to be added to the db2nodes.cfg file.
PORT logical-port
With ADD DBPARTITIONNUM, specifies the logical port to be added to the db2nodes.cfg file. Valid values are from 0 to 999.
COMPUTER computername
The computer name for the machine on which the new database partition is created. This parameter is mandatory on Windows, but is ignored on other operating systems.
USER username
The user name for the account on the new database partition. This parameter is mandatory on Windows, but is ignored on other operating systems.
PASSWORD password
The password for the account on the new database partition. This parameter is mandatory on Windows, but is ignored on other operating systems.
NETNAME netname
Specifies the netname to be added to the db2nodes.cfg file. If not specified, this parameter defaults to the value specified for hostname.
LIKE DBPARTITIONNUM db-partition-number
Specifies that the containers for the system temporary table spaces will be the same as the containers on the specified db-partition-number for each database in the instance. The database partition specified must be a database partition that is already in the db2nodes.cfg file. For system temporary table spaces that are defined to use automatic storage (in other words, system temporary table spaces that were created with the MANAGED BY AUTOMATIC STORAGE clause of the CREATE TABLESPACE statement or where no MANAGED BY CLAUSE was specified at all), the containers will not necessarily match those from the partition specified. Instead, containers will automatically be assigned by the database manager based on the storage paths that are associated with the database. This may or may not result in the same containers being used on these two partitions.
WITHOUT TABLESPACES
Specifies that containers for the system temporary table spaces are not created for any of the databases. The ALTER TABLESPACE statement must be used to add system temporary table space containers to each database before the database can be used. This option is ignored for system temporary table spaces that are defined to use automatic storage (in other words, system temporary table spaces that were created with the MANAGED BY AUTOMATIC STORAGE clause of the CREATE TABLESPACE statement or where no MANAGED BY CLAUSE was specified at all). For these table spaces, there is no way to defer container creation. Containers will automatically be assigned by the database manager based on the storage paths that are associated with the database.
STANDALONE
Specifies that the database partition is to be started in stand-alone mode. FCM does not attempt to establish a connection to any other database partition. This option is used when adding a database partition.
RESTART
Starts the database manager after a failure. Other database partitions are still operating, and this database partition attempts to connect to the others. If neither the hostname nor the logical-port parameter is specified, the database manager is restarted using the hostname and logical-port values specified in db2nodes.cfg. If either parameter is specified, the new values are sent to the other database partitions when a connection is established. The db2nodes.cfg file is updated with this information. When using the RESTART option to update the db2nodes.cfg file, do not remove the database partition entry with port 0 until the other database partitions with higher port numbers are removed.
HOSTNAME hostname
You can use the HOSTNAME option with the RESTART parameter to restart a database partition on a different machine than is specified in the database partition configuration file, db2nodes.cfg.
Restriction:
When you are using the DB2 High Availability Feature, you should not use the HOSTNAME option with the RESTART parameter to restart a database partition on a different machine. To restart or move a database partition from one machine in a cluster to another machine, use the DB2 high availability instance configuration utility (db2haicu).
PORT logical-port
With RESTART, specifies the logical port number to be used to override that in the database partition configuration file. If not specified, this parameter defaults to the logical-port value that corresponds to the num value in the db2nodes.cfg file. Valid values are from 0 to 999.
COMPUTER computername
The computer name for the machine on which the new database partition is created. This parameter is mandatory on Windows, but is ignored on other operating systems.
USER username
The user name for the account on the new database partition. This parameter is mandatory on Windows, but is ignored on other operating systems.
PASSWORD password
The password for the account on the new database partition. This parameter is mandatory on Windows, but is ignored on other operating systems.
NETNAME netname
Specifies the netname to override that specified in the db2nodes.cfg file. If not specified, this parameter defaults to the netname value that corresponds to the db-partition-number value in the db2nodes.cfg file.

Examples

The following is sample output from db2start issued on a three-database partition system with database partitions 10, 20, and 30:
04-07-1997 10:33:05    10   0   SQL1063N  DB2START processing was successful.
04-07-1997 10:33:07    20   0   SQL1063N  DB2START processing was successful.
04-07-1997 10:33:07    30   0   SQL1063N  DB2START processing was successful.
SQL1063N  DB2START processing was successful.

Usage notes

On Microsoft Windows Vista or later versions, when using an id that has local or domain administrator authority, you must execute this command from a DB2 command window running with full administrator privileges.

It is not necessary to issue this command on a client node. It is provided for compatibility with older clients, but it has no effect on the database manager.

Once started, the database manager instance runs until the user stops it, even if all application programs that were using it have ended.

If the database manager starts successfully, a successful completion message is sent to the standard output device. If an error occurs, processing stops, and an error message is sent to the standard output device. In a partitioned database environment, messages are returned on the database partition that issued the START DATABASE MANAGER command.

If no parameters are specified in a partitioned database environment, the database manager is started on all parallel nodes using the parameters specified in the database partition configuration file.

If a START DATABASE MANAGER command is in progress, ensure that the applicable database partitions have started before issuing a request to the database.

The db2cshrc file is not supported and cannot be used to define the environment.

You can start an instance in a quiesced state. You can do this by using one of the following choices:

   db2start admin mode 

or

   db2start admin mode user username

or

   db2start admin mode group groupname

The RESTRICTED ACCESS option will prevent the databases within the quiesced instance from being activated to do authorization checking. Any user ID trying to connect to a database, which has dbadm authority or quiesce_connect privilege on the database, will not be allowed to connect. Only user IDs which have sysadm, sysctrl, or sysmaint authority and the user or group specified with the command will be allowed to connect to the database.

The RESTRICTED ACCESS option should be used when there is a need to have exclusive connections to a database within the quiesced instance. Such cases can include making an offline backup or performing other maintenance activities.

When adding a new database partition server, START DATABASE MANAGER must determine whether or not each database in the instance is enabled for automatic storage. This is done by communicating with the catalog partition for each database. If automatic storage is enabled then the storage path definitions are retrieved as part of that communication. Likewise, if system temporary table spaces are to be created with the database partitions, START DATABASE MANAGER might have to communicate with another database partition server to retrieve the table space definitions for the database partitions that reside on that server. The start_stop_time database manager configuration parameter is used to specify the time, in minutes, by which the other database partition server must respond with the automatic storage and table space definitions. If this time is exceeded, the command fails. If this situation occurs, increase the value of start_stop_time, and reissue the command.

A new database partition server cannot be added when any of the following commands, statements, or operations are in progress. Otherwise SQL6074N is returned.
  • QUIESCE INSTANCE
  • UNQUIESCE INSTANCE
  • STOP DB2 (db2stop)
  • STOP DATABASER MANAGER DBPARTITIONNUM
  • START DB2 (db2start)
  • START DATABASE MANAGER DBPARTITIONNUM
  • START DATABASE MANAGER with restart options
  • CREATE DATABASE
  • DROP DATABASE
  • QUIESCE DATABASE
  • UNQUIESCE DATABASE
  • ACTIVATE DATABASE
  • DEACTIVATE DATABASE
  • A Z lock on a database object
  • Backing up the database on all database partition servers
  • Restoring the database
  • ALTER, ALTER, or DROP of a table space
  • Updating of automatic storage paths

On UNIX platforms, the START DATABASE MANAGER command supports the SIGINT signal. It is issued if CTRL+C is pressed. If this signal occurs, all in-progress startups are interrupted and a message (SQL1044N) is returned from each interrupted database partition to the $HOME/sqllib/log/db2start. timestamp.log error log file. Database partitions that are already started are not affected. If CTRL+C is pressed on a database partition that is starting, db2stop must be issued on that database partition before an attempt is made to start it again.

On Windows operating systems, neither the db2start command nor the NET START command returns warnings if any communication subsystem failed to start. The database manager in a Windows environment is implemented as a service, and does not return an error if the service is started successfully. Be sure to examine the Event Log or the db2diag log file for any errors that might have occurred during the running of db2start.

Compatibilities

For compatibility with versions earlier than Version 8:
  • The keywords LIKE NODE can be substituted for LIKE DBPARTITIONNUM.
  • The keyword ADDNODE can be substituted for ADD DBPARTITIONNUM.
  • The keyword NODENUM can be substituted for DBPARTITIONNUM.