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 > db2exfmt

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-03-09, 14:28
prasadv18 prasadv18 is offline
Registered User
 
Join Date: Nov 2007
Posts: 26
db2exfmt

Hi all
Please let me know difference between db2expln and db2exfmt

i am unable to genate db2exfmt

for particular query which is in text file

I am passing query like this

db2exfmt -d ODSQATDB -e DLVRY02 -g -n '/home/dba/db2odsq/Offshore/EODS_Queryplan/Line_Q1.sql' -s DLVRY02 -o '/home/dba/db2odsq/Offshore/EODS_Queryplan/Line_Q1.sql.out'

it showing that no explainplan geneted for this database like that


I am able to generate access plan by db2expln


Thanks and regards
Varaprasad
Reply With Quote
  #2 (permalink)  
Old 01-03-09, 14:32
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
For db2exfmt, run the following SQL:

explain plan set queryno = 1 for select * from your-table;

where "select * from your-table" is the SQL you want explained. Then run db2exfmt.
__________________
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 01-03-09, 14:47
prasadv18 prasadv18 is offline
Registered User
 
Join Date: Nov 2007
Posts: 26
Thanks for the replay
i give like that

it is giving

Phrase?

what should i give here
Reply With Quote
  #4 (permalink)  
Old 01-03-09, 14:56
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Type in the following at the command line:

db2exfmt -d ODSQATDB

then for each prompt, hit the enter key (without typing a response). You will get the last SQL explained and stored in the explain tables. To get more than the last one, you will have to study the Command Reference manual to input the options you want.
__________________
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
  #5 (permalink)  
Old 01-03-09, 15:45
prasadv18 prasadv18 is offline
Registered User
 
Join Date: Nov 2007
Posts: 26
Thankyou very much
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