If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Expalin.ddl

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old
Registered User
 
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
Reply With Quote
  #2 (permalink)  
Old
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,702
<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
Reply With Quote
  #3 (permalink)  
Old
Registered User
 
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/
Reply With Quote
  #4 (permalink)  
Old
Registered User
 
Join Date: May 2008
Posts: 39
thanks so much
Reply With Quote
  #5 (permalink)  
Old
Registered User
 
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
Reply With Quote
  #6 (permalink)  
Old
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,702
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
Reply With Quote
  #7 (permalink)  
Old
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 5,333
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.
Reply With Quote
  #8 (permalink)  
Old
Registered User
 
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/
Reply With Quote
  #9 (permalink)  
Old
Registered User
 
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
Reply With Quote
  #10 (permalink)  
Old
Registered User
 
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/
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On