DBAsupport.com Forums - Powered by vBulletin
Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 23

Thread: batch scriptin

  1. #11
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    Originally posted by marist89
    Use perl
    Thought that was some kind of stitch in knitting.

    Jeff, just seen your post in the other scripting thread - that's a monumental piece of knitting - makes me feel quite humble.

    Cheers -
    Last edited by DaPi; 03-07-2003 at 09:54 AM.
    "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

  2. #12
    Join Date
    Jan 2001
    Posts
    2,828
    Hi Jeff

    Use perl...dude LOL...was that a hint to me :-)
    ..i mean for some other posts :-)

    Dapi i am not sure i just double clicked on that file and it started workin..i dont know why ?


    regards
    Hrishy

  3. #13
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Originally posted by marist89
    Use perl
    Use DBMS_JOB
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  4. #14
    Join Date
    Jan 2002
    Location
    Netherlands
    Posts
    1,587
    MSTask.exe is a reasonably good tool to automate your tasks.
    Tarry Singh
    I'm a JOLE(JavaOracleLinuxEnthusiast)
    TarryBlogging
    --- Everything was meant to be---

  5. #15
    Join Date
    Jan 2001
    Posts
    2,828
    Hi All

    i found cron.exe :-) on the web..

    regards
    Hrishy

  6. #16
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    Originally posted by hrishy
    Dapi i am not sure i just double clicked on that file and it started workin..i dont know why ?
    Ah! you have to wait for the planets to be aligned properly with your bio-rythmns - they teach you that in all the MS courses!
    "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

  7. #17
    Join Date
    Sep 2002
    Posts
    411
    thanks all for this info, I have tried this too but how can I exit out of dos prompt once it's done the job, below is example:

    C:\DBA_ADMIN\STARTUP_DB\MISP>sqlplus -S /nolog @STARTUP_MISP.SQL
    SP2-0735: unknown SET option beginning "STOPONERRO..."
    Connected to an idle instance.
    ORACLE instance started.

    Total System Global Area 241158172 bytes
    Fixed Size 75804 bytes
    Variable Size 83718144 bytes
    Database Buffers 157286400 bytes
    Redo Buffers 77824 bytes
    Database mounted.
    Database opened.

    after the database open, the program still blink on DOS, what do I need to do for it to exit out of DOS automatically???

    Thanks

  8. #18
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    Mike put:
    EXIT in the sql to return to DOS.
    EXIT in the batch to shut down the DOS process.
    "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

  9. #19
    Join Date
    Sep 2002
    Posts
    411
    it's not working yet. Below is two scripts I tried to run

    SET ECHO ON
    SET TERMOUT ON
    SET FEEDBACK OFF
    SPOOL C:\DBA_ADMIN\SHUTDOWN_DB\MISP\LOG\SHUTORA_MISP.LOG;

    CONNECT INTERNAL/VMS700;

    SHUTDOWN IMMEDIATE;

    DISCONNECT;

    SPOOL OFF;


    and I save this scripts as shutora_misp.sql




    now I have this .bat file to run the above scripts

    CD C:\DBA_ADMIN\SHUTDOWN_DB\MISP\

    SET ORACLE_SID=MISP

    sqlplus -S /nolog @SHUTORA_MISP.SQL

    sqlplus -S /nolog exit;

    it's not working and it still hang

  10. #20
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    Add/change the two EXIT's:


    SET ECHO ON
    SET TERMOUT ON
    SET FEEDBACK OFF
    SPOOL C:\DBA_ADMIN\SHUTDOWN_DB\MISP\LOG\SHUTORA_MISP.LOG;

    CONNECT INTERNAL/VMS700;

    SHUTDOWN IMMEDIATE;

    DISCONNECT;

    SPOOL OFF;

    EXIT

    and I save this scripts as shutora_misp.sql




    now I have this .bat file to run the above scripts

    CD C:\DBA_ADMIN\SHUTDOWN_DB\MISP\

    SET ORACLE_SID=MISP

    sqlplus -S /nolog @SHUTORA_MISP.SQL

    EXIT




    If that still doesn't work, try removing the DISCONNECT from the sql - not sure how that will behave after the db is shutdown - EXIT will disconnect the session anyway.
    "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