Installing the sample database in IBM DB2 C in Linux (Ubuntu)


After you install DB2 on your Linux system (along with IBMs Data Studio) you may have problems connecting to the sample database.  It may be that it did not install.  If you have any questions about the above, post a comment.

To install the sample database, first be sure you log in to your instance.  By default during your first install, your instance name should be db2inst1

 

 

Login to your db2inst1 account

Once you are in you’re logged into your instance session, navigate to your sqllib/samples folder.   Execute the db2sampl file.  This will begin the Sample Database installation process.

installing sample DB2 database in Linux

 

Once the installation is complete, connect to the database by typing: db2 connect to sample.

You can list the tables in the database by typing: db2 list tables

connect to and list tables in database

 

Now that you’ve set up your playground, have fun.

Leave a comment

Filed under Linux, SQL

Comments are closed.