Accessing Db2 Big SQL from the JSqsh client
You can use Db2 Big SQL from any client tool that uses a JDBC or ODBC driver. One of those clients is the Java™ SQL shell (JSqsh).
To connect your JSqsh client to the Db2 Big SQL server, complete the following steps on the JSqsh client node:
Navigate to the JSqsh bin directory:
Run the setup command:
- Type D to launch the Driver wizard.
- Type 1 to select the DB2® driver.
- Type 4to select the URL. Specify the database name (BIGSQL), port (32051), and DB2 server (Db2 Big SQL head node, example.server.name.com).
- Type S to save and then B to go back.
- Type C for the connection wizard.
- Type 1 to select the DB2 driver.
- Type 4 for user (set the user to bigsql), 5 for password (set the password to bigsql), and 6 to set Autoconnect to true (automatically connects to Db2 Big SQL and displays the jsqsh prompt without requesting a password).
- Type T to test the connection and then S to save. Confirm the changes by typing Y.
- Specify a new connection name (for example, bigsql) and save or type Y to confirm.
- Type Q to quit.
To connect to the BIGSQL database, run the following command from the jsqsh prompt.
BIGSQL is the schema name.
To test your connection, create, populate, and query a sample table. For example:
create table t1 (c1 int, c2 varchar(10)); insert into t1 values (1, 'sfsdf'); select * from t1;
To verify that the JSqsh client can connect to the DB2
server on port 32051, log in to the Db2 Big SQL head node with
su bigsqland run the following commands:
db2 connect to bigsql select * from t1Verify that the previously inserted record exists.
What to do next
For more information about using the JSqsh interface with Db2 Big SQL see Java SQL Shell (JSqsh).