1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

"Nothing in SQL buffer to run." message on executing a shell script

Discussão em 'Outras Linguagens' iniciado por Stack, Janeiro 9, 2021.

  1. Stack

    Stack Membro Participativo

    I am running the following shell script which calls a .SQL file, that contains a list of DELETE statements. On executing ./delete_crr_input_purge.sh, I get the following message "Nothing in SQL buffer to run.". The .SQL file gets executed anyway but what is wrong with my code in the shell script?

    #!/bin/ksh
    #
    # @(#)Copyright All Rights Reserved.
    # @(#) $Id: run_drm_utility.sh $

    # Setup common environment
    . `dirname $0`/db_env.sh
    cd `dirname $0`

    echo "Enter the SHBA Atomic DB User Name:"
    read USERNAME
    echo "Enter the SHBA Atomic DB User Password:"
    read PASS


    cnt=`sqlplus -s /nolog <<-EOF
    WHENEVER OSERROR EXIT 9;
    WHENEVER SQLERROR EXIT SQL.SQLCODE;
    connect $USERNAME/$PASS@$ORACLE_SID
    SET PAGESIZE 0 FEEDBACK OFF VERIFY OFF HEADING OFF ECHO OFF
    @delete_crr_input_purge.sql;
    commit;

    EOF`
    echo [$cnt]

    return $?


    [​IMG]

    Continue reading...

Compartilhe esta Página