CLPPlus must be started before any CLPPlus commands can
be run.
Before you begin
- CLPPlus
might not be installed and set up on an existing IBM® data server client. CLPPlus is set up for
use with all other DB2® database
server products.
- Read the CLPPLUS command topic.
Procedure
To start CLPPlus:
- On Windows, Linux, or UNIX operating systems, use the CLPPLUS command:
- In the command line processor (CLP) or DB2 Command Window, run the CLPPLUS command
without specifying a password. For example, to start
CLPPlus and attempt to connect to a database named SAMPLE on the local
host by using user ID db2admin and port number 50000, issue the following
command:
clpplus db2admin@localhost:50000/sample
You can also specify connection
information in a file called login.sql. You can define a variable
and specify that variable in the command you use to start CLPPlus.
For example, if login.sql contains define connStr = localhost:50000/sample,
the command clpplus db2admin@connStr is equivalent
to the first example in this step.
- Enter your password. Using the command
in 1) as an example, if a valid password for db2admin is entered,
the following is displayed:
C:\DB2\10.5\db2 > clpplus db2admin@localhost:50000/sample
CLPPlus: Version 1.6
Copyright (c) 2009, 2011, IBM CORPORATION. All rights reserved.
Enter password: ********
Database Connection Information :
---------------------------------
Hostname = localhost
Database server = DB2/NT64 SQL10012
SQL authorization ID = db2admin
Local database alias = SAMPLE
Port = 50000
SQL>
- On Windows operating
systems, use a menu option:
- Click .
- Specify your user ID and connection information.
The menu option is not available for the following DB2 installations:
- IBM Data
Server Client
- IBM Data Server Runtime Client
- IBM Data
Server Driver Package
- On Linux operating
systems, use a menu option:
- Click .
- Specify your user ID and connection information.
The menu option is not available for the following DB2 installations:
- IBM Data
Server Client
- IBM Data Server Runtime Client
- IBM Data
Server Driver Package
Results
The CLPPlus prompt (SQL>) is available, and you are connected
to the specified database.
What to do next
You can
now use CLPPlus commands and related features. Specify the commands
at the CLPPlus prompt.
To end the CLPPLus session, issue the EXIT or QUIT CLPPlus
command.