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

Thread: Stupid SQL* Question

  1. #1
    Join Date
    Jan 2001
    Posts
    3,134

    Stupid SQL* Question

    SQL*Plus: Release 9.2.0.1.0

    Is there any type of "nohup" command for SQL* Plus?
    I'd like to run commands in the background.
    I hate having my session lock up when I issue long running command (analyze, rebuild, ect..)

    MH
    I remember when this place was cool.

  2. #2
    Join Date
    Nov 2002
    Location
    New Delhi, INDIA
    Posts
    1,796
    try using sqlplus -s

    create a .bat file

    test.bat
    Code:
    sqlplus -s system/manager@orcl @test.sql
    in test.sql write what ever command you want eg.

    Code:
    spool e:\amar_test.log
    select username from dba_users;
    spool off
    exit
    exclusively for windoz users

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

    Amar's Blog  Get Firefox!

  3. #3
    Join Date
    Feb 2000
    Location
    Washington DC
    Posts
    1,843
    AFAIK its 'NO', I don't think SQL*Plus is that flexible product from user perspective. TOAD and may be other 3rd party products have flexibility to run your queries background setting up couple of options.
    Reddy,Sam

  4. #4
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    Can't you just start a second session? (or is the question too subtle for me?)
    "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

  5. #5
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439

    Re: Stupid SQL* Question

    Originally posted by Mr.Hanky
    I hate having my session lock up when I issue long running command (analyze, rebuild, ect..)
    That's what DBMS_JOB is there for.... Just submit a job and continue working in your SQL*Plus session.
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  6. #6
    Join Date
    Jan 2001
    Posts
    3,134
    Thanks for the replies folks.
    Of course I can start another session, use either crontab or at for scheduling, I was just curious if such a command exists. I am reading my SQL* definitive guide but not having any luck.

    It just does not make sense that you have to stare at a blank white screen while your command runs.
    I have to read up more on DBMS_JOB, I never use it.

    MH
    I remember when this place was cool.

  7. #7
    Join Date
    Sep 2001
    Location
    NJ, USA
    Posts
    1,287
    What about :

    sqlplus username/pwd@database @script.sql >>/dev/nul &

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