DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Shell Script Needed

  1. #1
    Join Date
    Jun 2000
    Location
    chennai,tamil nadu,india
    Posts
    159

    Shell Script Needed

    Hi,
    Can any one give me a sample shell script which pass and receive values from the oracle database.

  2. #2
    Join Date
    May 2001
    Location
    Maryland, USA
    Posts
    409
    Can you tell us in more detail what values of database? something like SQL? like what exactly you want to do? Thanks.
    -- Dilip

  3. #3
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    well pass values are asy

    something like

    #!/bin/ksh

    X=$1
    Y=$2

    sqlplus -s << EOF >> /tmp/hi.log
    user/password@tns

    whenever sqlerror exit 1
    @tst.sql $1 $2

    exit 0

    EOF

    receive is harder, I only know how to receive one value back

    Z=`sqlplus -s << EOF >> /tmp/hi.log
    user/password@tns

    whenever sqlerror exit 1

    variable x number

    begin
    :x:=8;
    end;
    /

    exit :x

    EOF`

  4. #4
    Join Date
    Jun 2000
    Location
    chennai,tamil nadu,india
    Posts
    159
    I just want to pass some values from the shell script to a procedure and to retrive some values from the procedure to the shell.

    For example.
    i want a table status from dba_objects.so i pass the table name from the shell script and i need the status from the database to the shell script.

    I am very weak in shell scripting.Would you mind helping me.


    Thanks

  5. #5
    Join Date
    Jun 2000
    Location
    chennai,tamil nadu,india
    Posts
    159
    I just want to pass some values from the shell script to a procedure and to retrive some values from the procedure to the shell.

    For example.
    i want a table status from dba_objects.so i pass the table name from the shell script and i need the status from the database to the shell script.

    I am very weak in shell scripting.Would you mind helping me.


    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width