Delete in the table via Shell Script

2

I'm trying to do a delete of all rows from a table via Shell Script. The database is oracle. The bank for some reason does not let me do truncate and the delete simply does not delete, without presenting any error. I do not really know why, when trying to do such operations through PL / SQL Developer, I can usually, but through Linux I can not.

Code I am using:

    sqlplus -s usuario/senha <<EOF 
    delete from table;
    exit;
    EOF
    
asked by anonymous 24.05.2014 / 00:29

1 answer

1

I discovered that my problem was that the bank was preventing me from performing such an action. I could see and insert, but delete was not possible because the table was 'locked'. After a conversation with a DBA we 'unlocked' the table and were able to perform delete. Thank you for your help. The code remained the same.

    
26.05.2014 / 18:25