batch scriptin
DBAsupport.com Forums - Powered by vBulletin
Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: batch scriptin

  1. #1
    Join Date
    Jan 2001
    Posts
    2,828

    batch scriptin

    Hi All

    I want to execute a procedure from windows Nt dos prompt..the procedure is there in the database..the code goes somethin like this

    sqlplus -s system/manager
    set serveroutput on
    spool kill_session.log
    exec kill_session;
    spool off

    exit

    when i put that in a bat file and run it the dos window simply hangs it appaeras to do nuthin..i want to execute this procedure every half an hour..

    regards
    Hrishy

  2. #2
    Join Date
    Nov 2002
    Location
    New Delhi, INDIA
    Posts
    1,796
    Hi

    try running with -s option removed, that will show you the error if any.

    Cheers!
    Amar
    "There is a difference between knowing the path and walking the path."

    Amar's Blog  Get Firefox!

  3. #3
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    Put the SQL commands in a file and "sqlplus -s system/manager @filename"

    (I have had probs with this when the file to execute was in the current directory - waits for a return - let you know if I find out what is going on).
    "The power of instruction is seldom of much efficacy except in those happy dispositions where it is almost superfluous" - Gibbon, quoted by R.P.Feynman

  4. #4
    Join Date
    Jan 2001
    Posts
    2,828
    Hi Dapi ,Amar

    thanks for those lightining fast responses..i have tried both without any result..

    regards
    Hrishy

  5. #5
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    Is it waiting on keyboard input? What happens if you hit return?
    "The power of instruction is seldom of much efficacy except in those happy dispositions where it is almost superfluous" - Gibbon, quoted by R.P.Feynman

  6. #6
    Join Date
    Jan 2001
    Posts
    2,828
    Hi Dapi

    Its still balnk..nuthin happens when i hit the eneter key

    regards
    Hrishy

  7. #7
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    I've been doing (e.g.) "sqlplus -S /nolog @D:\Utils\Stats\ContactStats" for years - (has a connect statement in the sql)
    "The power of instruction is seldom of much efficacy except in those happy dispositions where it is almost superfluous" - Gibbon, quoted by R.P.Feynman

  8. #8
    Join Date
    Jan 2001
    Posts
    2,828
    Hi

    Thanks guys its workin..now..:-)

    regards
    Hrishy

  9. #9
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    Use perl
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  10. #10
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    Come on, be brave , tell us why it wasn't working (perhaps save me a headache one day!)
    "The power of instruction is seldom of much efficacy except in those happy dispositions where it is almost superfluous" - Gibbon, quoted by R.P.Feynman

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