Sie sind auf Seite 1von 2

To create the sample database, you can either select the Create the SAMPLE database option from

the DB2 First Steps launchpad, or by issuing the db2sampl command from the command line. Before you can issue an SQL statement, you have to connect to a database. To connect to a database, enter the command:
db2 CONNECT TO database USER userID USING password

To connect to a database, and have DB2 prompt you for the password, issue the command:
db2 CONNECT TO database USER userID

To connect to a database using the default user ID, issue the command:
db2 CONNECT TO database

Once you have connected to a database, you can then issue SQL statements or DB2 commands against that database. For example, to select all of the rows from the EMPLOYEE table in the SAMPLE database, issue this command:
db2 "SELECT * FROM employee"

You can avoid typing db2 as the prefix for every SQL statement and DB2 command by issuing DB2 commands using the Command Line Processor (CLP). To start the CLP, issue the db2 command by itself from a Linux command line terminal. DB2 provides the following prompt:
1 ans
:\Documents and Settings\J>nslookup yumie.gidnetwork.com Server: cns3.tm.net.my Address: 202.188.0.133 Non-authoritative answer: Name: yumie.gidnetwork.com Address: 69.30.244.34 4 ans

15. Check the current value of the LOGSECOND db cfg parameter, and then change it to a value of 5 and verify the new value db2 connect to sample db2 get db cfg db2 update db cfg using LOGSECOND 5 db2 get db cfg 9 ans

11. Drop the instance newinst set db2instance=newinst db2stop db2idrop newinst set db2instance=db2 8 ans

Das könnte Ihnen auch gefallen