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

Thread: batch file-startup skips

  1. #1
    Join Date
    Jan 2007
    Posts
    231

    batch file-startup skips

    hi all,

    In personal pc i have written a batch file as

    sqlplus /nolog @c:\start

    in start file i have written as

    conn / as sysdba
    startup pfile='e:\oracle\admin\prod\pfile\initprod.ora'
    cl scr
    prompt Welcome

    if i run that batch file it connects to sqlplus waits for a while and the displays
    Welcome message without starting up database,but if i run that start file it works properly.please guide..,

  2. #2
    Join Date
    Dec 2002
    Location
    Bangalore ( India )
    Posts
    2,434
    use something like this..

    sqlplus /nolog
    @c:\start
    funky...

    "I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."

    "Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"

  3. #3
    Join Date
    Jan 2007
    Posts
    231
    no.., it doesn't helps me.

    thnx for ur reply

  4. #4
    Join Date
    Dec 2002
    Location
    Bangalore ( India )
    Posts
    2,434
    put some de-bugging messages...
    funky...

    "I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."

    "Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"

  5. #5
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    You don't have to re-invent the wheel...

    Code:
    @echo off
    rem -----------------------------------------------------------------------
    rem Filename:   DBStart.bat
    rem Purpose:    Start an Oracle database
    rem Date:       05-Mar-2002
    rem Author:     Frank Naude, Oracle FAQ
    rem -----------------------------------------------------------------------
    
    rem -- Set Database SID --
    set ORACLE_SID=sgnt
    
    rem  -- Create SQL Script to START the DB --
    echo set echo on                  > %0.tmp
    echo connect sys/orcl as sysdba; >> %0.tmp
    echo startup force;              >> %0.tmp
    echo exit;                       >> %0.tmp
    
    rem -- Do the Startup --
    sqlplus /nolog @%0.tmp
    
    rem -- Cleanup --
    del %0.tmp
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  6. #6
    Join Date
    Jan 2007
    Posts
    231
    Pavb thanks for the help,

    I have used Startup force command,now it works properly.

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