Results 1 to 11 of 11
  1. #1
    Join Date
    Sep 2010
    Posts
    36

    Unanswered: create database not working

    I'm new to DB2 for z/OS, but I have experience with DB2 Windows. I'm trying to create a new database for my testing purpose. It doesn't work and gives

    DSN9019I -DT31 VERB '-CREATE' IS NOT A KNOWN COMMAND
    DSN9023I -DT31 DSN9SCND '-CREATE ' ABNORMAL COMPLETION


    Please help me.

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    A database in DB2 z/OS is totally different concept than in DB2 LUW. In z/OS it is merely a collection of tablespaces. You need find some DB2 z/OS documentation and start looking at it because at the DBA level, those two products are very different.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  3. #3
    Join Date
    Sep 2010
    Posts
    36
    I checked DB2 z/OS documentation. The command is correct

    >>-CREATE DATABASE--database-name------------------------------->

    .-------------------------------------------.
    V (1) |
    >--------+-----------------------------------+-+---------------><
    +-BUFFERPOOL--bpname----------------+
    +-INDEXBP--bpname-------------------+
    +-AS WORKFILE--+------------------+-+
    | '-FOR--member-name-' |
    | .-SYSDEFLT------. |
    +-STOGROUP--+-stogroup-name-+-------+
    '-CCSID--+-ASCII---+----------------'
    +-EBCDIC--+
    '-UNICODE-'

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    I don't think that dash before CREATE goes with the command. You give us the exact syntax you used (not just the error message) and what facility you used to submit it? You need to issue SQL, not a command.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  5. #5
    Join Date
    Sep 2010
    Posts
    36
    I don't know where to enter this command. I used db2 commands option.

    Command:
    -create database shamik

    If I input:
    create database shamik

    I have:
    DSNE291A ALL DB2 COMMANDS BEGIN WITH A DASH

  6. #6
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    I told you in my post above that in DB2 z/OS create database is not a command, and cannot be entered in the DB2 Command Processor. It must entered as SQL (try SPUFI).

    You should have noticed that the create database SQL statement was documented in the SQL Reference, not the Command Reference manual.
    Last edited by Marcus_A; 06-13-13 at 11:01.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  7. #7
    Join Date
    Sep 2010
    Posts
    36
    OKay, got it. Create database created. Now I want to connect to create tablespace and table. Where do I input connect to shamik?

  8. #8
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    You need to do some reading. A database in DB2 z/OS is not the same as a database in LUW. You do not connect to a database in z/OS. You connect to the DB2 sub-system. You can input SQL statements via SPUFI. In the DB2I panel defaults (TSO), you specify the DB2 sub-system (equivalent to a LUW database).
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  9. #9
    Join Date
    Sep 2010
    Posts
    36
    OKay. How db2 knows where to create my table? I created 2 databases. When I create my table, how db2 knows where to put iit. Does it mean I can't have 2 tables with the same name in 2 databases?

  10. #10
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    This is the last time I am going to answer your questions, because you obviously refuse to read the documentation. Please refer to the Create Table statement in the SQL Reference manual to get an answer to your question.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  11. #11
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,369
    You tell db2 where to create it by specifying '...in <db>.<tbs>'. If you omit db and/or tbs, db2 will create it for you. You can't have two tables with the same name and schema. The table name can be the same if the schema is different. There is one system catalog for all databases in the sub-system. Check InfoCenter for db2 z/OS.

Posting Permissions

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