4. Once this command has completed, connect to sample database. This is
shown in Figure 9.
[db2inst1@bdtest3 db2inst1]$ db2start
SQL1026N The database manager is already active.
[db2inst1@bdtest3 db2inst1]$ db2sampl
[db2inst1@bdtest3 db2inst1]$ db2 connect to sample
Database Connection Information
Database server
= DB2/LINUX 6.1.0
SQL authorization ID
= DB2INST1
Local database alias
= SAMPLE
Figure 9. Creating and connecting to the DB2 SAMPLE database
5. Verify that the DB2 SQL engine is working by issuing a select from a table
in the SAMPLE database. For our example, we used:
db2  select * from department 
The results are shown in Figure 10.
[db2inst1@bdtest3 db2inst1]$ db2 "select * from department"
DEPTNO DEPTNAME
MGRNO ADMRDEPT LOCATION
                                                                     
A00
SPIFFY COMPUTER SERVICE DIV. 000010 A00
B01
PLANNING
000020 A00
C01
INFORMATION CENTER
000030 A00
D01
DEVELOPMENT CENTER
A00
D11
MANUFACTURING SYSTEMS
000060 D01
D21
ADMINISTRATION SYSTEMS
000070 D01
E01
SUPPORT SERVICES
000050 A00
E11
OPERATIONS
000090 E01
E21
SOFTWARE SUPPORT
000100 E01
Figure 10. An SQL query from the DEPARTMENT table of the SAMPLE database
6. Reset the database connection with:
db2 connect reset
This has verified that the DB2 installation is working.
18
Linux Web Hosting with WebSphere, DB2, and Domino




  

Home

About Services Network Support FAQ Order Contact
 

Linux Web Hosting

Our partners:Jsp Web Hosting Unlimited Web Hosting Cheapest Web Hosting  Java Web Hosting Web Templates Best Web Templates PHP Mysql Web Hosting Interland Web Hosting Cheap Web Hosting PHP Web Hosting Tomcat Web Hosting Quality Web Hosting Best Web Hosting  Mac Web Hosting 

Lunarwebhost.net  Business web hosting division of Vision Web Hosting Inc. All rights reserved