Creates DB2® instances.
On Linux and UNIX operating systems, this utility is located in theDB2DIR/instance directory, where DB2DIR represents the installation location wherethe current version of the DB2 database system is installed. On Windowsoperating systems, this utility is located under the DB2PATH\bin directory whereDB2PATH is the location where theDB2 copy is installed.
The db2icrt command creates DB2instances in the instance owner's home directory.
Root user authority on Linux and UNIX operating systems or LocalAdministrator authority on Windows operatingsystems.
For Linux and UNIX operatingsystems
>>-db2icrt--+-----+--+-----+--+---------------+-----------------> +- -h-+ '- -d-' '- -a--AuthType-' '- -?-'>--+---------------+--+---------------+--+---------------+------> '- -p--PortName-' '- -s--InstType-' '- -u--FencedID-'>--InstName----------------------------------------------------><For Windows operatingsystems
>>-db2icrt--InstName--+---------------+-------------------------> '- -s--InstType-'>--+-------------------------+--+-------------------+-----------> '- -u--UserName, Password-' '- -p--InstProfPath-'>--+---------------+--+----------------+------------------------> '- -h--HostName-' '- -r--PortRange-'>--+------------------------------------------------------+-----> '- -j--"TEXT_SEARCH-+--------------+-+-------------+-"-' '-,servicename-' '-,portnumber-'>--+-----+----------------------------------------------------->< '- -?-'For Linux and UNIX operatingsystems
-h | -?Displays the usage information.-dTurns debug mode on. Use this option only when instructed by DB2database support.-a AuthTypeSpecifies the authentication type (SERVER, CLIENTor SERVER_ENCRYPT) for the instance. Thedefault is SERVER.-p PortNameSpecifies the port name or number used by the instance. This optiondoes not apply to client instances.-s InstTypeSpecifies the type of instance to create. Use the -s option only when you are creating aninstance other than the default associated with the installed product from whichyou are running db2icrt. Valid values are:clientUsed to create an instance for a client. This is the defaultinstance type for IBM® Data Server Client,IBM Data Server Runtime Client, and DB2Connect™ Personal Edition.standaloneUsed to create an instance for a database server with localclients. It is the default instance type for DB2 PersonalEdition.eseUsed to create an instance for a database server with local andremote clients with partitioned database environment support. This is thedefault instance type for DB2 Enterprise ServerEdition or DB2 Advanced Enterprise ServerEdition.wseUsed to create an instance for a database server with local andremote clients. This is the default instance type for DB2Workgroup Server Edition, DB2 Express® Editionor DB2 Express-C, and DB2 ConnectEnterprise Edition.DB2 database products support their default instance types and theinstance types lower than their default ones. For instance, DB2 Enterprise Server Edition supports the instance typesof ese, wse, standalone and client.
-u Fenced IDSpecifies the name of the user ID under which fenced user-definedfunctions and fenced stored procedures will run. The -u option is required if you are notcreating a client instance.InstNameSpecifies the name of the instance which is also the name of anexisting user in the operating system. This has to be the last argument of thedb2icrt command.For Windows operatingsystems
InstNameSpecifies the name of the instance.-s InstTypeSpecifies the type of instance to create. Currently, there are fourkinds of DB2 instance types. Valid values are:clientUsed to create an instance for a client. This is the defaultinstance type for IBM Data Server Client, IBM Data Server Runtime Client, and DB2Connect Personal Edition.standaloneUsed to create an instance for a database server with localclients. It is the default instance type for DB2 PersonalEdition.eseUsed to create an instance for a database server with local andremote clients with partitioned database environment support. The -s ese -u Username, Passwordoptionshave to be used with db2icrt to create theESE instance type and a partitioned databaseenvironment instance.wseUsed to create an instance for a database server with local andremote clients. This is the default instance type for DB2Workgroup Server Edition, DB2 Express Editionor DB2 Express-C, and DB2 ConnectEnterprise Edition.DB2 database products support their default instance types and theinstance types lower than their default ones. For instance, DB2 Enterprise Server Edition supports the instance typesof ese, wse, standalone and client.
-u Username, PasswordSpecifies the account name and password for the DB2 service. Thisoption is required when creating a partitioned database instance.-p InstProfPathSpecifies the instance profile path.-h HostNameOverrides the default TCP/IP host name if there is more than onefor the current machine. The TCP/IP host name is used when creating the defaultdatabase partition (database partition 0). This option is only valid forpartitioned database instances.-r PortRangeSpecifies a range of TCP/IP ports to be used by the partitioneddatabase instance when running in MPP mode. For example, -r 50000,50007. The services file of the local machine will be updatedwith the following entries if this option is specified:DB2_InstName baseport/tcpDB2_InstName_END endport/tcp/j "TEXT_SEARCH"Configures the DB2 Text Search serverusing generated default values for service name and TCP/IP port number. Thisparameter cannot be used if the instance type is client./j "TEXT_SEARCH, servicename"Configures the DB2 Text Search serverusing the provided service name and an automatically generated port number. Ifthe service name has a port number assigned in the services file, it uses the assigned port number.
/j "TEXT_SEARCH, servicename, portnumber"Configures the DB2 Text Search serverusing the provided service name and port number.
/j "TEXT_SEARCH, portnumber"Configures the DB2 Text Search serverusing a default service name and the provided port number. Valid port numbersmust be within the 1024 - 65535 range.
-?Displays usage information.- On an AIX® machine, to create an instance for the user ID db2inst1, issue the following command:On a client machine:DB2DIR/instance/db2icrt db2inst1On a server machine:DB2DIR/instance/db2icrt -u db2fenc1 db2inst1wheredb2fenc1 is the user ID under which fenceduser-defined functions and fenced stored procedures willrun.
- The instance_home/sqllib/db2tss/config folderis created by db2icrt on Linux and UNIXoperating systems. It is advised that you use a symbolic link to an area outsidethe sqllib directory.
- The -s option isintended for situations in which you want to create an instance that does notuse the full functions of the system. For example, if you are using DB2 Enterprise Server Edition (ESE) on a UNIX operatingsystem, but do not want partition capabilities, you could create a DB2 Workgroup Server Edition (WSE) instance, using theoption -s WSE.
- To create a DB2 instance that supports Microsoft Cluster Server,first create an instance, then use the db2mscs command to migrate it to run in a MSCSinstance.
- On Linux and UNIX operating systems, only one instance can becreated under a user name. If you want to create an instance under a user namethat already has an instance, you must drop the existing instance beforecreating the new one.
- When creating DB2 instances, consider the following restrictions:
- If existing IDs are used to create DB2 instances, make sure thatthe IDs are not locked and do not have passwords expired.
- You can also use the db2isetupcommand to create and update DB2 instances using a graphical interface on allsupported Linux and UNIX operating systems.
- On Linux and UNIX operating systems, if you are using the su command instead of the login command to become the root user, you mustissue the su command with the - option to indicate that the processenvironment is to be set as if you had logged in to the system using the login command.
- On Linux and UNIX operating systems, you must not source the DB2instance environment for the root user. Running db2icrt when you sourced the DB2 instanceenvironment is not supported.
On AIX 6.1 (or higher), whenrunning this command from a shared DB2 copy in a system workload partition(WPAR) global environment, this command must be run as the root user.
- On Windows operating systems, if the IBM Tivoli® Monitoring forDatabases: DB2 Agent is installed and the DB2 instance is created, theMonitoring Agent for DB2 instance is also created if the following are true:
- The DB2 instance type is standalone, wse, or ese.
- The default DB2 copy has the ITM agent component installed.
- The DB2 instance is at version 9.5 (or higher).
- There is no existing ITM for Databases product.