Creating multiple DB2 database instances on Windows
Complete these steps for each instance that you plan to create:
Create a new user and add it to the Administrators group.
Note: If you are using DB2®, also add the new user to the DB2ADMNS group.
Remove the user account from the Users group.
- Grant rights to the new user:
- Click Start > Run and enter secpol.msc.
- Expand Local Policies and click User Rights Assignment.
- Open each of the following rights, click Add User or Groupand add the new user:
- Act as part of the operating system
- Adjust memory quotas|Increase quotas for a process
- Create a token object
- Debug programs
- Lock pages in memory
- Log on as a service
- Replace a process level token
Tip: The new account uses the local system as the domain.
For each instance that you want to create, log in as the instance owner before creating the instance.
- Use the DB2 Command Line Processor to enter commands.
After creating the instance, add the instance to the user environment variable. The instance is then visible in the DB2 Control Center. To create DB2 database instances on Windows, follow these steps:
Create an instance: db2icrt instance_name -s ese -u db2_admin_user where instance_name is the name of the instance and db2_admin_user is the user account for that instance.
To set the port number of the instance, edit the C:\WINDOWS\system32\drivers\etc\services file and add the following line:
Set the current instance parameter:
Set the communication protocols for the instance:
db2 update database manager configuration using svcename db2c_instance_name db2set DB2COMM=npipe,tcpip db2stop db2start
Edit your firewall configuration to allow the new instances to communicate through their listening ports.
Parent topic:Creating multiple DB2 database instances