Results 1 to 10 of 10

Thread: Expalin.ddl

  1. #1
    Join Date
    May 2008
    Posts
    39

    Expalin.ddl

    Hi,

    Can you please tell me how to execute EXPALIN.DDL

    when I give db2> -tvf EXPLAIN.DDL
    it says tvf is invalid command

    when I give dbe -tvf EXPLAIN.DDL

    it says db2 isinvalid
    Please help

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,734
    <instance-home>/sqllib/misc
    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 2004
    Location
    Belgium
    Posts
    1,126
    Quote Originally Posted by usDB2
    Can you please tell me how to execute EXPLAIN.DDL
    When I give db2> -tvf EXPLAIN.DDL
    it says tvf is invalid command
    Assuming you're on a unix system, just run the following on the command line:
    Code:
    db2 -tvf EXPLAIN.DDL
    When you're on MS-Windows, and you've opened the Command Line Processor (CLP), just type the command "quit", then (at the DOS prompt) type the above (possibly after having changed your current directory with the CD command).
    --_Peter Vanroose,
    __IBM Certified Database Administrator, DB2 9 for z/OS
    __IBM Certified Application Developer
    __ABIS Training and Consulting
    __http://www.abis.be/

  4. #4
    Join Date
    May 2008
    Posts
    39
    thanks so much

  5. #5
    Join Date
    May 2008
    Posts
    39

    Explain.ddl

    Hi
    When i execute db2 -tvf EXPLAIN.DDL I get DB21005E An error occured while accessing EXPLAIN.ddl.
    Is it beacause of file permissions.How should I correct it
    Thanks

  6. #6
    Join Date
    May 2003
    Location
    USA
    Posts
    5,734
    Use the instance owner id to create the tables. You can also do a Visual Explain from the Control Center and the tables will be created for you automatically.
    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
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,452
    Quote Originally Posted by usDB2
    Hi
    When i execute db2 -tvf EXPLAIN.DDL I get DB21005E An error occured while accessing EXPLAIN.ddl.
    I think it's because CLP cannot find the file. Why don't you specify the full path to EXPLAIN.DDL.
    ---
    "It does not work" is not a valid problem statement.

  8. #8
    Join Date
    Sep 2004
    Location
    Belgium
    Posts
    1,126
    Quote Originally Posted by usDB2
    DB21005E An error occured while accessing EXPLAIN.ddl
    Most likely the file is not in the current directory.
    Use the "cd" command, as I stated in my earlier post.
    Suppose the file EXPLAIN.ddl is in C:\EXPLAIN.dll
    Either type the following two commands:
    Code:
    cd \
    db2 -tvf EXPLAIN.DDL
    or just the following:
    Code:
    db2 -tvf C:\EXPLAIN.DDL
    --_Peter Vanroose,
    __IBM Certified Database Administrator, DB2 9 for z/OS
    __IBM Certified Application Developer
    __ABIS Training and Consulting
    __http://www.abis.be/

  9. #9
    Join Date
    May 2008
    Posts
    39
    I am working in UNIX box.Tries all possible options,Still it gives the same error.I am executing the db2 -tvf Explain.ddl inthe path SQLIB/MISC where I can see EXPLAIN.DDL

  10. #10
    Join Date
    Sep 2004
    Location
    Belgium
    Posts
    1,126
    Quote Originally Posted by usDB2
    I am working in UNIX box.Tries all possible options,Still it gives the same error.I am executing the db2 -tvf Explain.ddl inthe path SQLIB/MISC where I can see EXPLAIN.DDL
    That will never work, certainly not on a unix system.
    Try to change that to
    Code:
    cd SQLIB/MISC
    db2 -tvf  EXPLAIN.DDL
    (File names are case sensitive on UNIX.)
    --_Peter Vanroose,
    __IBM Certified Database Administrator, DB2 9 for z/OS
    __IBM Certified Application Developer
    __ABIS Training and Consulting
    __http://www.abis.be/

Posting Permissions

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