Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2013
    Posts
    2

    Question Unanswered: Setting up Sample database

    Hi, I'm a beginner and have just installed DB2 for learning. I'm trying to test first simple queries on Sample database. I can see the local Sample database, and connection test is successfull.

    Problem is that I don't see any tables in the Sample database. When trying to write the first queries with SQL query builder I don't have tables listed on the Add table view.

    Many thanks if someone can advice how to correctly set up the Sample database.

  2. #2
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    if you use db2sampl (executable) this will create sample db and create/populate sample tables : employee.......
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  3. #3
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Quote Originally Posted by tomcrow View Post
    Hi, I'm a beginner and have just installed DB2 for learning. I'm trying to test first simple queries on Sample database. I can see the local Sample database, and connection test is successfull.

    Problem is that I don't see any tables in the Sample database. When trying to write the first queries with SQL query builder I don't have tables listed on the Add table view.

    Many thanks if someone can advice how to correctly set up the Sample database.
    Probably a schema name mismatch. Try the following from DB2 command line:

    db2 list tables for all
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  4. #4
    Join Date
    Jan 2012
    Posts
    20
    db2 list tables for schema <your schema>

  5. #5
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Quote Originally Posted by cauliflower View Post
    db2 list tables for schema <your schema>
    Obviously, if he can't see the tables with his default schema, he doesn't know what the correct schema name is.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  6. #6
    Join Date
    Feb 2013
    Posts
    2
    Thanks for help. I used db2sampl, and now it works. I think the problem might have been with username? First time the Sample db was setup I didn't use my windows username.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •