on 07-25-2016 7:38 AM
Hi, Experts
Env
---------
IQ 15.4
OS : Linux
env|grep SQLCONNECT
SQLCONNECT=uid=DBA;pwd=password;eng=RBADB
/tmp> dbisql -nogui ext.sql
---> NO ERROR BUT no file was created (a.dat)
/***************** ext.sql (bof) *************************/
set temporary option temp_extract_name1= '/tmp/a.dat';
select * from tab_a;
set temporary option temp_extract_name1='';
/****************** (eof) *********************************/
But not using script file( ext.sql)
Extracted file is created successfully without error ....
What is the problem ???
Thanks in advance
YOu do need set
(DBA)> set option isql_show_multiple_result_sets='on' ;
(DBA)> SET OPTION ISQL_PRINT_RESULT_SET = 'ALL';
extract file default location is .db directory.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Saroj,
I'm facing the same issue too... But after added the 2 option you mentioned, I still fail to create extract file with script... Here's my sample file --
asiq160@bigDataIQ:/iq_data/bcp> cat ex.sh
#!/bin/bash
echo `date +%F' '%T`:started
dbisql -c "uid=dba;pwd=sql" -host 10.128.244.161 -port 2641 -nogui << EOF
set temporary option temp_extract_name1='export.dat';
set temporary option temp_extract_directory='/iq_data/bcp';
set temporary option isql_show_multiple_result_sets='on' ;
SET temporary OPTION ISQL_PRINT_RESULT_SET = 'ALL';
select * from STOCK;
set temporary option temp_extract_name1='';
EOF
echo `date +%F' '%T`:ended
asiq160@bigDataIQ:/iq_data/bcp> ./ex.sh
2016-07-26 03:00:12:started
(DBA)> Execution time: 0.003 seconds
(DBA)> 2016-07-26 03:00:13:ended
asiq160@bigDataIQ:/iq_data/bcp> ls
ex.sh
And I also checked the .db folder -- find no file named export.dat created. Would you please have a look? Thanks
Regards
Eisen
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.