Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Cannot create tables with IBM Data Studio

604 views
Skip to first unread message

msde...@gmail.com

unread,
Dec 26, 2014, 10:27:56 PM12/26/14
to
I just downloaded the latest version of DB2 and DS for Windows. I am a SQL Server guy with plenty of Oracle experience as well and wanted to give DB2 a try. I just have to say I am finding DS to be completely unintuitive and difficult to use. I just wanted to create a simple test db with some test tables to play around with.

Is there no table designer in DS? I cannot even create a schema in DS, whenever I try I get the following error: No DDL was generated because no changes were made to the database.

I really want to make the leap but i am not finding it easy. Any help is appreciated.

Mark A

unread,
Dec 27, 2014, 4:55:17 AM12/27/14
to
It is a little difficult to help you because I am not sure what you are actually doing. Have you already
created a database? There is a SAMPLE database that can be created with a a bunch of tables and
data included. It may have been created at install time depending on your install options. If not, open a
command window as administrator (or instance owner) user id, and type in "db2sampl". Or you can
open the "First Steps" dialog.

It will take a few mintues to create the db.

Also, you do not need to create a schema. A schema in DB2 is not like Oracle. It is merely the first part
of the table name. For table, DB2INST1.EMP, the schema is DB2INST1 and is implicitly created the first
time it is used. Schemas in DB2 do not have their own accounts or other separate physical properties.

msde...@gmail.com

unread,
Dec 28, 2014, 8:27:57 AM12/28/14
to
It's pretty basic what I am trying to do. I created a test db and now I am trying to create some tables and I am unable to do so. Something that takes me two minutes with SQL Server. I have the sample database which is pre-setup, I am not interested in that. I am trying to setup my own db and finding it incredibly difficult.

Peter H. Coffin

unread,
Jan 7, 2015, 1:25:06 PM1/7/15
to
On Sun, 28 Dec 2014 05:27:55 -0800 (PST), msde...@gmail.com wrote:

> It's pretty basic what I am trying to do. I created a test db and now
> I am trying to create some tables and I am unable to do so. Something
> that takes me two minutes with SQL Server. I have the sample database
> which is pre-setup, I am not interested in that. I am trying to setup
> my own db and finding it incredibly difficult.

Okay, in Data Studio, and ignoring a nearly unimaginable number of
complications...

1) connect to your test database
2) Set "Activity" (top center) to Administer Database
3) Select "Schemas" in the folder list below the database connection in
the left pane. If there's a user schema already you want to use, you can
skip to the table create part.
4) wait for the Change Plan to be created.
5) Change the name of the Schema in the bottom pane to a name of your
choice.
--Table Create Part
6) Select "Tables" in the folder list below the database connection in
the left pane.
7) In the top-right pane, click the green "+". (Maybe wait for Change
Plan to be created.)
8) select type "Table"
9) Pick a user schema to put the table in.
10) Change the table name in the properties pane to one of your
choosing.
11) Click on the Columns tab
12) Use the gold diamond to add a new column, set the properties to that
of your first column.
13) repeat 12 for as many columns as you have.
14) Push "Generate DDL" in the top right pane.
15) Push Finish.

Table is created.

From prior posts, I think there may be some misapprehension about what a
Schema is. It's nothing more than a collection (like a folder) of
database objects (like tables or indexes).

--
"Doesn't everybody?" is a question that never expects an answer of "No."
0 new messages