Creating an instance using db2icrt
A Db2® instance is an environment in which you store data and run applications. Use the db2icrt command to create an instance.
Before you begin
On Linux® or UNIX operating systems, you must have root user authority.
To create an instance using db2icrt:
- Log in with proper authority.
- Run the db2icrt command. For example, on Linux or UNIX operating systems:
DB2DIR/instance/db2icrt -a AuthType -u FencedID InstName
- is the Db2
- On theAIX® operating system, the default Db2 installation directory is /opt/IBM/db2/V11.5.
- On Linux operating systems, the default installation directory is /opt/ibm/db2/V11.5.
- -a AuthType (Linux or UNIX)
- Represents the authentication type for the instance. AuthType can be one of SERVER, CLIENT, or SERVER_ENCRYPT. SERVER is the default. This parameter is optional.
- -u FencedID
- Represents the name of the user under which fenced user defined functions (UDFs) and fenced stored procedures will run. This flag is not required if you are creating an instance on a client. Specify the name of the fenced user you created.
- Represents the name of instance. The name of the instance must be the same as the name of the instance owning user. Specify the name of the instance owning user you created. The instance will be created in the instance owning user's home directory.
/opt/IBM/db2/V11.5/instance/db2icrt -a server -u db2fenc1 db2inst1
What to do next
(Optional) After you create an instance you can configure notification for health monitoring. This task can be performed using the Db2 CLP commands.