unix script ti connect to an oracle database and call a stored procedure

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • istruttorenuoto
    New Member
    • Oct 2006
    • 7

    unix script ti connect to an oracle database and call a stored procedure

    hi to everbody
    i need to write a unix script to do a sqlplus connection (using user id and password) to an oracle database and call a stored procedure.

    how could i do it?

    thanks to all
  • milonov
    New Member
    • Oct 2006
    • 32

    #2
    hi!

    you can execute script like:

    sqlplus user/password@databa sename @command_file

    where command_file contans smth like:

    select your_prosedure( ) from dual;
    exit

    With Best Regards,
    Michael Milonov
    http://www.snotratech. com

    Comment

    • istruttorenuoto
      New Member
      • Oct 2006
      • 7

      #3
      thanks

      so, to connect i use:
      sqlplus user/password@databa sename @command_file
      and to call the stored procedure i use:
      select your_prosedure( ) from dual;
      ?

      Comment

      • milonov
        New Member
        • Oct 2006
        • 32

        #4
        yep, correct

        end exit to leave sqlplus

        With Best Regards,
        Michael Milonov
        http://www.snotratech. com

        Originally posted by istruttorenuoto
        thanks

        so, to connect i use:
        sqlplus user/password@databa sename @command_file
        and to call the stored procedure i use:
        select your_prosedure( ) from dual;
        ?

        Comment

        • istruttorenuoto
          New Member
          • Oct 2006
          • 7

          #5
          thanks
          i will try now

          Comment

          Working...