Home > Articles > Data > DB2

This chapter is from the book

This chapter is from the book

Creating the Sample Database

This section shows you how to create the sample database provided with DB2 UDB. You can verify the installation of the DB2 UDB product by creating the sample database and connecting to it using the CLP.

You need about 15MB of disk to create the sample database. It can be created by the first steps of the GUI, after installing DB2 (db2fs), or with the db2sampl command:

db2sampl path
   

path represents the directory where the initial database files are created. Unless specified, the sample database will be created in the path defined by the DFTDBPATH database manager configuration parameter. The default value of the DFTDBPATH database manager configuration parameter is the home directory of the instance owner.

This process will take a few minutes to complete. When the creation process is complete, try to connect to the sample database using the CONNECT command, as shown in Figure 2.40.

02fig40.jpgFigure 2.40. Connecting to the Sample Database

  • + Share This
  • 🔖 Save To Your Account