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

Thread: how do i insert a shell var into sqlplus ?

  1. #1
    Join Date
    May 2006
    Posts
    11

    how do i insert a shell var into sqlplus ?

    i need to insert a shell var into sqlplus, sqlplus needs to run an sql file but i want to make the direcroty of the sql file dynamic by var.

    thanks.

  2. #2
    Join Date
    Nov 2001
    Location
    UK
    Posts
    152
    accept sqldir prompt 'Dir: '

    @&sqldir/sqlscript

  3. #3
    Join Date
    Apr 2006
    Posts
    377
    You could do something like:

    Code:
    #!/usr/bin/ksh
    v_dir=/tmp
    sqlplus -s scott/tiger @${v_dir}/test.sql

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