running a script
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 7 of 7

Thread: running a script

  1. #1
    Join Date
    Dec 2000
    Posts
    1
    hi,

    On HP unix , logging as a oracle user we are unable to run a sql script.
    giving below command.
    svrmgrl>@/avl1/oracle/file_name.sql
    once we press Return it is comming to next line.If we type ";" and return
    it is giving sql command not properly ended etc.

    we tried with some simple sql script , that is also not working.

    For time being we typed the contents of the sql file.

    can any one suggest what settings has to be done at OS level and Oracle level.
    where does '@' executable reside.
    Do I need to set any Path ?

    can any one help us in this matter.

    Your earliest help is kindly appreciated.

    thanks and regards,

    madhavi




  2. #2
    Join Date
    Feb 2000
    Location
    Singapore
    Posts
    1,758
    Try running the scripts from sqlplus instrad of svrmgrl.

    Sanjay

  3. #3
    Join Date
    Nov 2000
    Posts
    71
    You can set the env variable SQLPATH pointing to all the directories containing your scripts.
    In this way you can call your scripts everytime simply using an @ without specifing the script destination path.
    However if your script is in the current directory and it is not spiecified in the SQLPATH env variable you can call it using a double @ (example @@myscript)
    Remember that this variable is only read by SQLPLUS and not by SVRMGR
    Bye.

  4. #4
    Join Date
    Apr 2000
    Location
    Russia
    Posts
    11
    You must write only the name of script without .sql .

  5. #5
    Join Date
    Jun 2000
    Posts
    417
    Adding the .sql shouldn't prevent it from executing, you can do it either way.

    Can you post your script? If it's giving a sql command not properly ended odds are it's executing your script but the script contains an error.

  6. #6
    Join Date
    Dec 2000
    Posts
    43
    I agree.
    Sometimes by add a / at the very end (last line) helps too. Try it :-)

  7. #7
    Join Date
    Mar 2000
    Location
    CA
    Posts
    317
    Running from svrmgrl also should work provided you are running on the tables available from that level.

    So in your case, it may be some adding / or ; in your script. Just post it and some of us will help u.
    Thanks
    Kishore Kumar

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