cancel
Showing results for 
Search instead for 
Did you mean: 

extract / file not created

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

saroj_bagai
Contributor
0 Kudos

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.

Former Member
0 Kudos

Thanks...

former_member232292
Participant
0 Kudos

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

Answers (0)