Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

DB2 Express-C

  • 24-06-2013 03:08PM
    #1
    Registered Users, Registered Users 2 Posts: 1,842 ✭✭✭


    Anyone familiar with DB2 Express-C? I've downloaded it along with IBM data studio 3.1. My goal is to create a simple database that I can use for testing through a ODBC connection. However I'm really struggling with the data studio UI and there seems to be little to no support or help online.

    I've created a database and ran a script against it. The script seems to run fine but no tables are appearing in the UI. I'm a complete noob to DB2. Any advise/links on how to setup a new database greatly appreciated.


Comments

  • Registered Users, Registered Users 2 Posts: 2,021 ✭✭✭ChRoMe


    Anyone familiar with DB2 Express-C? I've downloaded it along with IBM data studio 3.1. My goal is to create a simple database that I can use for testing through a ODBC connection. However I'm really struggling with the data studio UI and there seems to be little to no support or help online.

    I've created a database and ran a script against it. The script seems to run fine but no tables are appearing in the UI. I'm a complete noob to DB2. Any advise/links on how to setup a new database greatly appreciated.

    Does it have to be DB2? If you are just looking for a sample data source for a ODBC connection?


  • Registered Users, Registered Users 2 Posts: 1,842 ✭✭✭CountingCrows


    ChRoMe wrote: »
    Does it have to be DB2? If you are just looking for a sample data source for a ODBC connection?

    Afraid so, Oracle & MS SQL Server is my usual testing ground but have a a client who wants us to test with DB2.


  • Closed Accounts Posts: 8,015 ✭✭✭CreepingDeath


    I've created a database and ran a script against it. The script seems to run fine but no tables are appearing in the UI. I'm a complete noob to DB2. Any advise/links on how to setup a new database greatly appreciated.

    How do you know the scripts ran fine ?

    I use DB Visualizer, connecting to DB 2 via JDBC.
    So if I create a couple of tables I'll see
    ... Physical database connection acquired for: My DB2 Schema
    16:43:09 [CREATE - 0 row(s), 0.234 secs] Command processed. No rows were affected
    16:43:10 [CREATE - 0 row(s), 0.121 secs] Command processed. No rows were affected
    ... 2 statement(s) executed, 0 row(s) affected, exec/fetch time: 0.355/0.000 sec [0 successful, 2 warnings, 0 errors]


    In the output of DB Visualizer.

    So the first thing is to confirm the scripts ran.

    Secondly, are you using the same username and password to run the SQL script as you are to view the database ?

    DB2 has the concept of database schemas.
    So make sure you're looking in the right schema for your tables.

    If you know the schema you could try

    SELECT * FROM <schemaname>.<tablename>

    eg.

    SELECT * FROM MYDB2SCHEMA.MYTABLE


  • Registered Users, Registered Users 2 Posts: 1,842 ✭✭✭CountingCrows


    Thanks CreepingDeath, the schema was being created but not displayed in the UI. Downloaded DB Visualizer and everything is working as expected. Will need to get the pro version for multi statement scripts but at least I can see the tables I'm creating!


Advertisement