查看DB2执行计划

[db2inst1@gzdbtsvr4 /home/db2inst1]#su - eser
eser's Password: 
$ cd /home/db2inst1/sqllib/bin
$ db2 conect to esnew
DB21034E  The command was processed as an SQL statement because it was not a 
valid Command Line Processor command.  During SQL processing it returned:
SQL1024N  A database connection does not exist.  SQLSTATE=08003
$ db2 connect to esnew

   Database Connection Information

 Database server        = DB2/AIX64 10.5.8
 SQL authorization ID   = ESER
 Local database alias   = ESNEW

$ db2 set current explain mode explain
DB20000I  The SQL command completed successfully.
$ db2 "select * from sysibm.sysdummy1"
SQL0217W  The statement was not executed as only Explain information requests 
are being processed.  SQLSTATE=01604
$ db2exfmt -d esnew -g TIC -w -l -s % -n % -o db2exmt.out
DB2 Universal Database Version 10.5, 5622-044 (c) Copyright IBM Corp. 1991, 2012
Licensed Material - Program Property of IBM
IBM DATABASE 2 Explain Table Format Tool

Connecting to the Database.
Connect to Database Successful.
Enter up to 26 character Explain timestamp (Default -1) ==> 
Enter section number (0 for all, Default 0) ==> 
Unable to open output file.
$ ls ~/jupiter/
ls: 0653-341 The file /home/eser/jupiter/ does not exist.
$ ls ~/
create_pro.sql  tuning
$ db2exfmt -d esnew -g TIC -w -l -s % -n % -o ~/db2exmt.out
DB2 Universal Database Version 10.5, 5622-044 (c) Copyright IBM Corp. 1991, 2012
Licensed Material - Program Property of IBM
IBM DATABASE 2 Explain Table Format Tool
Connecting to the Database.
Connect to Database Successful.
Enter up to 26 character Explain timestamp (Default -1) ==> 
Enter section number (0 for all, Default 0) ==> 
Output is in /home/eser/db2exmt.out.
Executing Connect Reset -- Connect Reset was Successful.
$ more /home/eser/db2exmt.out

=======================================================
1.db2 conect to esnew
2.db2 set current explain mode explain
3.db2 "sql_statment"
4.db2exfmt -d esnew -g TIC -w -l -s % -n % -o ~/db2exmt.out
5. more /home/eser/db2exmt.out

转载于:https://my.oschina.net/u/2277088/blog/3019113

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值