HI
My procedure is as below
#!/bin/bash
us="dbadmin"
pw="tdadb"
PORT=5433
VSQL="/opt/vertica/bin/vsql"
myvsql="$VSQL -A $us $pw -c "
$myvsql "
select * from table;
" >> /opt/etl/etc/files/selectop 2>&1
exit 0
-------------------------------------------------------------
If i execute the script m getting proper op
my procedure is
create procedure test() as 'test.sh' LANGUAGE 'external' USER 'dbadmin';
CREATE PROCEDURE
but When i call it through procedure my err is as below
INFO 4427: Procedure reported:
Could not execute procedure, errno=8
ERROR 4424: Procedure execution error: exit status=1
How to print the outputs ?
Please help me .
Err when calling script through external procedure
Moderator: NorbertKrupa
-
- Newbie
- Posts: 19
- Joined: Thu Aug 08, 2013 8:01 am
Re: Err when calling script through external procedure
Hello rajaduraibanu ,
Vertica Documentation says
http://www.vertica-forums.com/viewtopic.php?f=76&t=1140
Hope this helps..
Vertica Documentation says
Please refer to this post for your queryHandling Procedure Output
Vertica does not provide a facility for handling procedure output. Therefore, you must make your own arrangements for handling procedure output, which should include writing error, logging, and program information directly to files that you manage.
http://www.vertica-forums.com/viewtopic.php?f=76&t=1140
Hope this helps..
-
- Newbie
- Posts: 19
- Joined: Thu Aug 08, 2013 8:01 am
Re: Err when calling script through external procedure
No actuaaly i don need to print or see ma output , But for insert operation it shuld insert a row right .
That is not happening .
That is not happening .
-
- Newbie
- Posts: 19
- Joined: Thu Aug 08, 2013 8:01 am
Re: Err when calling script through external procedure
Now m able to select values and write into file and Create table too .. But Not able to do insert , update and delete operations
. Any permission need to b given ???
when i execute procedure on db console m getting output as 0 , that mean its executed perfectly and inside file it is writing as OUTPUT
1
(1 row)
which indicates it inserted 1 row , but wen i select data , nothing is insertetd
Not getting wat s Hapng
. Any permission need to b given ???
when i execute procedure on db console m getting output as 0 , that mean its executed perfectly and inside file it is writing as OUTPUT
1
(1 row)
which indicates it inserted 1 row , but wen i select data , nothing is insertetd
Not getting wat s Hapng
-
- Newbie
- Posts: 19
- Joined: Thu Aug 08, 2013 8:01 am
Re: Err when calling script through external procedure
hi
I got the solution , Need to specify commit also in the query ...
Now everything is working fine
I got the solution , Need to specify commit also in the query ...
Now everything is working fine