CONNECT TO SAMPLEDB;
From the command line (db2clp, terminal, db2cmd) you can write:
db2 CONNECT TO SAMPLEDB