shell script & SQLPlus - Database Discussions
This is a discussion on shell script & SQLPlus - Database Discussions ; Hi guys, Im new here. I have a script that calls a pl/sql script with sqlplus, and shows how much time it take. SHELL SCRIPT Code: #!/usr/bin/ksh echo '----- APAGAR DADOS DA TABELA INTERF.BDG_DIVIDA_AUX -----' echo "" inicio=`date +%s`; echo ...
![]() |
| | LinkBack | Thread Tools | Display Modes |
|
#1
| |||
| |||
| Im new here. I have a script that calls a pl/sql script with sqlplus, and shows how much time it take. SHELL SCRIPT Code: #!/usr/bin/ksh echo '----- APAGAR DADOS DA TABELA INTERF.BDG_DIVIDA_AUX -----' echo "" inicio=`date +%s`; echo "Iniciar sessão no oracle e correr scripts" sqlplus -s 'login/password-at-Database' << END @apagar.sql; exit END fim=`date +%s`; diff=$(($fim-$inicio)); echo "Demorou $diff segundos." echo 'FIM' Code: declare data date; begin for num in 1..9 loop select trunc(sysdate-30,'MM') into data from dual; delete from schem.divida_aux where id_empresa=num and d_inicioThe PL/SQL executes well in TOAD. So i think that is not the problem... perhaps is the calling with sqlplus... but i cant imagine why!! |
|
#2
| |||
| |||
|
I have always done something like: echo "select count(*) from some_table" |sqlplus myuser/mypass What error are you getting? |
![]() |
« Previous Thread
|
Next Thread »
| Thread Tools | |
| Display Modes | |
| |
All times are GMT -4. The time now is 02:22 AM.




Linear Mode