16.10.2015 Views

Getting Started with DB2 Express-C

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 4 – <strong>DB2</strong> Environment 61<br />

Figure 4.3 – The default <strong>DB2</strong> instance created<br />

To create a new <strong>DB2</strong> instance, use the command db2icrt , where<br />

is replaced <strong>with</strong> any 8 character name. For example, to create the<br />

instance myinst, we use this command: db2icrt myinst.<br />

Figure 4.4 shows a new instance called myinst as a separate green box on the right side.<br />

Figure 4.4 – A <strong>DB2</strong> server <strong>with</strong> two instances<br />

Note that each instance has a unique port number. This helps to distinguish between<br />

instances when you want to connect to a database in a given instance from a remote client<br />

using TCP/IP. If you use the <strong>DB2</strong> Command Window, you can make any <strong>DB2</strong> instance the<br />

active one by using this operating system command on Windows:<br />

set db2instance=myinst

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!