Log Wait In Shutting Down The database

Hi Exports,
We have a production server. It contain its some of its datafile a cluster disk on windows server 2008. Yesterday Suddenly one of the cluster disk offline due to some network issue. And i found the following error on my alert log.
Mon Mar 18 19:59:27 2013
KCF: write/open error block=0xd13a6 online=1
file=22 M:\LEGACY_ORADATA\LEGACY.DBF
error=27070 txt: 'OSD-04016: Error queuing an asynchronous I/O request.
O/S-Error: (OS 19) The media is write protected.'
Mon Mar 18 19:59:27 2013
Automatic datafile offline due to write error on
file 22: M:\LEGACY_ORADATA\LEGACY.DBF
Mon Mar 18 19:59:28 2013
KCF: write/open error block=0xd3c10 online=1
file=22 M:\LEGACY_ORADATA\LEGACY.DBF
error=27070 txt: 'OSD-04016: Error queuing an asynchronous I/O request.
O/S-Error: (OS 19) The media is write protected.'
Mon Mar 18 19:59:28 2013
Automatic datafile offline due to write error on
file 22: M:\LEGACY_ORADATA\LEGACY.DBF
Mon Mar 18 21:49:34 2013
MMNL absent for 1204 secs; Foregrounds taking over
Mon Mar 18 22:00:05 2013
Errors in file d:\oracle\product\10.2.0\admin\legacy\bdump\legacy_j000_13148.trc:
ORA-12012: error on auto execute of job 8950
ORA-01115: IO error reading block from file ORA-01115: IO error reading block from file 5 (block # 106)
ORA-01110: data file 5: 'M:\LEGACY_ORADATA\OLD_TRANSACTION.DBF'
ORA-27091: unable to queue I/O
ORA-27070: async read/write failed
OSD-04006: ReadFile() failure, unable to read from file
O/S-Error: (OS 21) The device is not ready.
ORA-06512: at "SYS.PRVT_ADVISOR", line 1624
ORA-06512: at "SYS.DBMS_ADVISOR", line 186
ORA-06512: at "SYS.DBMS_SPACE", line 1500
ORA-06512: at "SYS.DBMS_SPACE", line 1566
(block # )
After that cluster disk available i am getting the same error. when i am trying to recover the datafile then i got the the
ORA-00283: recovery session canceled due to errors
ORA-01124: cannot recover data file 22 - file is in use or recovery
ORA-01110: data file 22
So check the database open_mode and it shows READ WRITE.
so i fire shut Immediate command. Now it take very long time to to shut down. Please suggest some solution as it is a prodtction database.
Thanks in advance...
Asit K. Mohanty

Hi,
What is the status of the files mentioned in the alert log? In the alert log, I see only 2 data files in the error messages you pasted, are all other data files safe and on some other disks which did not fail?
select name,status from v$datafile;During shutdown, what are the messages in alert log file?
Salman

Similar Messages

  • Shutting down the database in Windows...

    I just read that shutting down the database by directly stopping the Oracle Service (instead of using the shutdown command from sqlplus) will abruptly stop your database, and the database will have to perform an instance recovery upon restarting.
    This hasn't been my experience at all. I was under the impression shutting down the service was equal to a shutdown immediate.
    Any comments?

    They will perform the same operation. You can do a test and prove it to your colleague.
    With each method you'll notice:
    Completed: alter database close normalin the alert log and you shouldn't see any "crash recovery" messages in the alert log when you restart the database. However, if you manually do a shutdown abort, you may notice a message as
    Shutting down instance (abort)and the following messages when you restart the database:
    ALTER DATABASE OPEN
    Wed Aug 02 17:25:02 2006
    Beginning crash recovery of 1 threads
    Wed Aug 02 17:25:03 2006
    Started redo scan
    Wed Aug 02 17:25:03 2006
    Completed redo scan
    1094 redo blocks read, 111 data blocks need recovery
    Wed Aug 02 17:25:03 2006
    Started recovery at
    Thread 1: logseq 1, block 4472, scn 0.0
    Wed Aug 02 17:25:04 2006
    Recovery of Online Redo Log: Thread 1 Group 3 Seq 1 Reading mem 0
      Mem# 0 errs 0: E:\ORACLE\ORADATA\ORCL9\REDO03.LOG
    Wed Aug 02 17:25:04 2006
    Completed redo application
    Wed Aug 02 17:25:04 2006
    Ended recovery at
    Thread 1: logseq 1, block 5566, scn 0.2611108
    111 data blocks read, 111 data blocks written, 1094 redo blocks read
    Crash recovery completed successfully

  • Shutting down the database getting error.

    Hi,
    while i am shutting down the database, i am getting below error message.
    SQL> shutdown immediate;
    ORA-01116: error in opening database file 170
    ORA-01110: data file 170: '/x01/CQ_Request/ORADATA_FILE/otlmedium_data08.dbf'
    ORA-27041: unable to open file
    SVR4 Error: 2: No such file or directory
    Additional information: 3
    and also i know otlmedium_data08.dbf file is not exist in that location. So could anyone help me on this how can i overcome this error and shutdown the database.

    I don't understand how you got in this situation but maybe it is necessary to make something like:
    ALTER DATABASE RENAME FILE '/x01/CQ_Request/ORADATA_FILE/otlmedium_data08.dbf' TO '/<path where the file really is>/otlmedium_data08.dbf';

  • Changing archive log mode without shutting down database

    Hi all,
    Is there any way to set the database to archive log mode before shutting down the database and when the database shuts and starts, the database should be automatically in archive log mode?
    because we can not shutdown the database in weekdays and we have system reboot on weekend and we are not here on that day. So is there a way to set the database in archive log at the memory level so that when the database reboots, it should automatically start in archive log mode.
    my environment is windows server 2008 R2 with oracle 11.2.0.3
    Thanks in advance.
    Edited by: 931643 on Dec 5, 2012 10:37 AM

    931643 wrote:
    thank you for the reply Max Seleznev,
    First I thought of writing script in order to include in that process. But we can not run any commands in the sqlplus using the windows jobs. for eg:
    you can write a batch file as below:
    cd \
    sqlplus / as sysdba
    select name,open_mode from v$database;
    when you run this, it will open until sqlplus prompt but then will not execute the query.
    What did you expect? Well, actually, I know what you expected. But think about it for a second. You have a batch file with the mentioned three lines. How does that batch file get processed .. what is happening when it is being processed?
    It is not being processed by sqlplus, it is being processed by the windows command processor. Just like the cmd.exe. Each line is read by the command processor and executed accordingly. So ....
    cd \the command processor calls 'cd' , and passes the value '\' to do with as it sees fit. 'cd' then changes the current directory of the session to whatever is indicated by the passed parameter. in this case, that value is '\' , so the resulting current directory is the base (root, in *nix terms) of the current drive.  When 'cd' has finished, it returns control to the command processor, who then reads the next line ....
    sqlplus / as sysdbathe command processor calls sqlplus.exe and passes it the command line parms '/ as sysdba' to do with as it (sqlplus) sees fit. sqlplus does whatever it does with what it has been given In this case it tries to connect to whatever local database is indicated by the value of ORACLE_SID, then waits for more input. Whenever sqlplus exits (how does it know to exit?) it returns control to the command processor, who then reads the next line ....
    select name,open_mode from v$database;The command processor will read this line and attempt to find an executable file named 'select' and pass it the rest of the command line 'name,open_mode from v$database;'
    Hmm, what do you suppose will happen with that operation?
    that is the reason I am figuring out whether there is an alternate way.yes but you have to use the proper technique. And since you are building this into a production stop/start without testing the actual stop/start commands ... what do you suppose will be the outcome if something goes wrong?
    After hours and weekend work is one reason DBA's make more money than developers.
    >
    Thanks

  • TNS-12638 when shutting down the server

    Everytime when we shut down the database server (Win2K, Ora 9.2.0.1.0) we
    get the following entries in the log files:
    ora.log:
    Fatal NI connect error 12638, connecting to:
    (DESCRIPTION=(ADDRESS=(PROTOCOL=BEQ)(PROGRAM=oracle)(ARGV0=oracletest2)(ARGS='(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))'))(CONNECT_DATA=(SID=test2)(CID=(PROGRAM=c:\oracle\ora92\bin\ORACLE.EXE)(HOST=CAESAR)(USER=SYSTEM))))
    VERSION INFORMATION:
    TNS for 32-bit Windows: Version 9.2.0.1.0 - Production
    Oracle Bequeath NT Protocol Adapter for 32-bit Everytime when we shut down the database server (Win 2k) we receive the following entry in the file ora.log:
    Windows: Version 9.2.0.1.0 - Production
    Time: 19-MÃ??R-2003 18:58:00
    Tracing not turned on.
    Tns error struct:
    nr err code: 0
    ns main err code: 12638
    TNS-12638: Abrufen der ID-Daten nicht erfolgreich
    ns secondary err code: 0
    nt main err code: 0
    nt secondary err code: 0
    nt OS err code: 0
    sqlnet.log
    Fatal NI connect error 12638 ns secondary err code: 0
    N=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
    Fatal NI connect error 12638, connecting to:
    (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
    VERSION INFORMATION:
    nt main err code: 0
    Version 9.2.0.1.0 - Production
    Oracle Bequeath NT Protocol Adapter for 32-bit Windows: Version 9.2.0.1.0 - Production
    VERSION INFORMATION:
    TNS for 32-bit Windows: Version 9.2.0.1.0 - Production
    Oracle Bequeath NT Protocol Adapter for 32-bit Windows: Version 9.2.0.1.0 - Production
    Time: 19-MÃ??R-2003 18:58:00
    Time: 19-MÃ??R-2003 18:58:00
    Tracing not turned on Tracing not turned on.
    Tns error struct:
    nr err code: 0
    ns main err code: 12638
    TNS-12638: Abrufen der ID-Daten nicht erfolgreich
    ns secondary err code: 0
    nt main err code: 0
    nt secondary err code: 0
    nt OS err code: 0
    Tns error struct:
    nr err code: 0
    ns main err code: 12638
    TNS-12638: Abrufen der ID-Daten nicht erfolgreich
    ns secondary err code: 0
    nt main err code: 0
    nt secondary err code: 0
    nt OS err code: 0
    We use SQLNET.AUTHENTICATION_SERVICES= (NTS).
    We get the error only when we shut down the server. The database was created with the database configuration assistant. Thanks

    check the file sqlnet.ora (ORACLE_HOME\NETWORK\ADMIN)where the database is installed for an entry like SQLNET.AUTHENTICATION_SERVICES= (NTS). If so, disable it.
    -PK

  • Creating Template in DBCA shuts down existing database

    Found a feature in the Database Configuration Assistant under Manage Templates. It allows you to create a template of an existing database including the structure, meaning datafiles. I thought this would be great to create a test database on a different server.
    When I went to create the template, it did not warn me that it would shut down the database I was creating the template of. Not thinking it would need to, still don't understand why it would need to, I proceeded on my merry way until I was informed my production database was down. A quick review of the alert log showed the alter database shutdown command.
    So a warning to others not to do this, and a reminder to self to never trust an application to perform the way you think it should, but test, test, test before trying on production.
    I would love to hear if this is a bug or a undocumented feature of this utility. I also would like to know why it had to shut the database down.
    Thanks.

    There is a documented BUG 4393252 on 9i 9.2.0.6.0 which may relate to your problem.
    It indicates that DBCA issues a Shutdown Immediate without warning when you choose to create a Template "From an existing database (structure as well as data)".
    Have a look at it.

  • Satellite L300 PSLB8A doesn't reconnect to net after log off or shut down

    My son has the L300 which connects to the net via wireless to the router in another room.
    When he logs out or shuts down, the next time he starts up he loses connectivity.
    I am been able to get him reconnected by logging into the router and reconfirming the setting but this is tedious and quite often does not work.
    His laptop often shows that he is connected but slow. I cannot find any sensible solution to all this.
    It is not a problem with the signal as I have placed the laptop right next to the router but still get the same problem.
    Any clues help you can give will be greatly appreciated

    Hi
    Did you try a new Wlan driver?
    You should definitely update the driver
    I have no idea what WLan card you have but this Toshiba WLan driver page provides all possible WLan drivers for Atheros and Intel cards
    http://aps2.toshiba-tro.de/wlan/
    You can also try to update the BIOS is one is available
    Just one hint: my notebook has Atheros WLan card and Im using the Atheros WLan configuration tool in order to establish the connection
    It connects my notebook automatically to Wlan

  • Cloning without shutting down the db

    Hi,
    Can you please suggest how to clone apps and db without shutting down the database? Apps is just copying the files, is there a recommended way to do the db cloning without shutting down the db.
    Updating the instance details:
    db - 10.2.0.4 on RHEL
    apps - 11.5.10.2
    -Jek
    Edited by: 890397 on Feb 2, 2012 5:31 AM

    You can find all the steps in the documentation (using RMAN or Hot backup).
    Cloning Oracle Application 11i /R12 with Rapid Clone - Database (9i/10g/11g) Using Hot Backup on Open Database [ID 760772.1]
    Cloning Oracle Applications Release 11i with Rapid Clone [ID 230672.1]
    Rapid Clone Documentation Resources For Release 11i and 12 [ID 799735.1]
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Rapid+AND+Clone+AND+Documentation&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Rapid+AND+Clone+AND+RMAN&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

  • The restart, log off, and shut down icons have quit responding​.

    I have a HP desktoop computer model sw5705f. It is not allowing me to restart, log off ,or shut down by clicking on them proper icon.  The only way I can shut down is to manually turn off the tower. What could have happened and how do I solve the3m problem?

     How long (days) have you hade this problem? Have you tried a restore point prior to that date?
    Is your computer part of an network with Group Policies? It's either Yes or No. You would know if it's your system.
    I am a volunteer. I am not an HP employee.
    To say THANK YOU, press the "thumbs up symbol" to render a KUDO. Please click Accept as Solution, if your problem is solved. You can render both Solution and KUDO.
    The Law of Effect states that positive reinforcement increases the probability of a behavior being repeated. (B.F.Skinner). You toss me KUDO and/or Solution, and I perform better.
    (2) HP DV7t i7 3160QM 2.3Ghz 8GB
    HP m9200t E8400,Win7 Pro 32 bit. 4GB RAM, ASUS 550Ti 2GB, Rosewill 630W. 1T HD SATA 3Gb/s
    Custom Asus P8P67, I7-2600k, 16GB RAM, WIN7 Pro 64bit, EVGA GTX660 2GB, 750W OCZ, 1T HD SATA 6Gb/s
    Custom Asus P8Z77, I7-3770k, 16GB RAM, WIN7 Pro 64bit, EVGA GTX670 2GB, 750W OCZ, 1T HD SATA 6Gb/s
    Both Customs use Rosewill Blackhawk case.
    Printer -- HP OfficeJet Pro 8600 Plus

  • How do I shut down Microsoft Database Daemon SyncServicesAgent - Installer wants it shut down in order to proceed with the installation of Microsoft MAC Office 2011.   I cannot find the offending application anywhere.   Why this stupid obstacle?

    How do I shut down Microsoft Database Daemon SyncServicesAgent - Installer wants it shut down in order to proceed with the installation of Microsoft MAC Office 2011.

    open activity monitor (applications>utilities) and quit all the ms office files running in there

  • Database doesn't shutdown during shutting down the server

    Dear Friends ,
    I have to use the following dcript to use Auto startup and shutdown my Oracle Database in RHEL 4 .
    step 1:
    #!/bin/bash
    # chkconfig: 345 99 10
    # description: Oracle auto start-stop script.
    # Set ORACLE_HOME to be equivalent to the $ORACLE_HOME
    # from which you wish to execute dbstart and dbshut;
    # Set ORACLE_OWNER to the user id of the owner of the
    # Oracle database in ORACLE_HOME.
    ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
    ORACLE_OWNER=oracle
    if [ ! -f $ORACLE_HOME/bin/dbstart ]
    then
    echo "Oracle startup: cannot start"
    exit
    fi
    case "$1" in
    'start')
    # Start the Oracle databases:
    # The following command assumes that the oracle login
    # will not prompt the user for any values
    su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/lsnrctl start"
    su - $ORACLE_OWNER -c $ORACLE_HOME/bin/dbstart
    'stop')
    # Stop the Oracle databases:
    # The following command assumes that the oracle login
    # will not prompt the user for any values
    su - $ORACLE_OWNER -c $ORACLE_HOME/bin/dbshut
    su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/lsnrctl stop"
    esac
    step 2:
    cat /etc/inittab
    *:/u01/app/oracle/product/10.2.0/db_1:N
    orcl:/u01/app/oracle/product/10.2.0/db_1:Y
    step 3:
    Keep "dbora" in following path :
    /etc/rc.d/rc3.d/dbora
    /etc/rc.d/rc5.d/dbora
    /etc/rc.d/init.d/dbora
    And also ,
    chmod 750 /etc/init.d/dbora
    chkconfig --level 345 dbora on
    Now ,The script works fine and ORacle Database and Listener service starts automatically during startup the server .But during shutdown the server, I cannot understand or can't recognize that the Oracle Database & listener service are shutdown auto . I think it does not work properly..... So i need to know that Oracle Database & listener service are stop automatically during shutting down the server . Using the above scripts , How can I do it ? Is there any wrong then plz advice me .......Thx ...

    step 3:
    Keep "dbora" in following path :
    /etc/rc.d/rc3.d/dbora
    /etc/rc.d/rc5.d/dbora
    /etc/rc.d/init.d/dbora
    And also ,
    chmod 750 /etc/init.d/dbora
    chkconfig --level 345 dbora on
    Check following links are there
    # ln -s /etc/init.d/dbora /etc/rc.d/rc3.d/K01dbora
    # ln -s /etc/init.d/dbora /etc/rc.d/rc3.d/S99dbora
    # ln -s /etc/init.d/dbora /etc/rc.d/rc5.d/K01dbora
    # ln -s /etc/init.d/dbora /etc/rc.d/rc5.d/S99dbora
    Script/link start with "K" , is responsible for shutdown database.
    Check following Oracle Documentation link , it explain all in details
    Starting and Stopping Oracle Software
    - Virag Sharma
    http://viragsharma.blogspot.com
    http://virag.sharma.googlepages.com

  • I can't log out or shut down my iMac as it says the mail is not working, I can't log out or shut down my iMac as it says the mail is not working

    I can't log out or shut down my mac as the mail isn't working. I can't open the mail and when I try to shut down so that I can open the computer again, it says I cannot log out as the application mail cancelled the logout.

    This worked for me too, by the way, for anyone wondering if it does.

  • Question about shutting down the middle tier while leaving the DB up

    Hi,
    We just successfully upgraded 11.5.10.2 from running on 9.2.0.8 SOLARIS SPARC 32-bit to 11.2.0.1 SOLARIS SPARC 64-bit.
    I am in the process of rewriting the backup scripts. We used to do a once-a-week backup (zip) of the middle tier directories,
    after shutting down EVERYTHING cold (MT first, then DB listener, the DB). Our DB consultant likes hot-only backups of the
    DB so we are going to keep the DB running all the time and always do hot backups from the DB, but keep MT cold backup.
    We want to keep our MT cold backup so we retain our downtime window that users expect (Saturday night - Sun morning).
    So my question is ---- is there any issue with shutting down the entire MT- only (adstpall.sh) -- but leaving the DB up?
    When I do a adstrtal (via my script) the next morning--- everything should just start fine with no DB bonce having been done, right?
    In the past, once I have the MT down, wait 5 min, kill any stray FND processes, I usually go on to bounce the database
    "for good measure". I am 99% sure that I don't have to do this... and that there is no harm in "not" doing this, just need
    some confirmation.
    MH
    One more piece of information - Our concurrent managers shut down cleanly almost all of the time without putting jobs on hold.
    We don't have many users (< 60) and while we do have autoinvoice that runs every 5 min, I haven't had to do a big bounce
    with cmclean.sql very often-- only about once or twice a year when users lock each others tables and the cleanest fix is to bounce
    everything --very rarely.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Hi,
    So my question is ---- is there any issue with shutting down the entire MT- only (adstpall.sh) -- but leaving the DB up? There should be no issues.
    When I do a adstrtal (via my script) the next morning--- everything should just start fine with no DB bonce having been done, right?Correct.
    In the past, once I have the MT down, wait 5 min, kill any stray FND processes, I usually go on to bounce the database
    "for good measure". I am 99% sure that I don't have to do this... and that there is no harm in "not" doing this, just need
    some confirmation.You still need to wait for sometime for the CM to shutdown, that's all.
    One more piece of information - Our concurrent managers shut down cleanly almost all of the time without putting jobs on hold.
    We don't have many users (< 60) and while we do have autoinvoice that runs every 5 min, I haven't had to do a big bounce
    with cmclean.sql very often-- only about once or twice a year when users lock each others tables and the cleanest fix is to bounce
    everything --very rarely.You should be OK with your approach.
    Thanks,
    Hussein

  • Shut down the concurrent managers to terminate the process  ORA-01000

    Dear All,
    Error As Follows
    Shut down the concurrent managers to terminate the process or use port-specific operating system commands to terminate the process.
    Job number is: 638
    Job number is: 639
    01-FEB-2013 10:46:36 - ORACLE error 1000 in get_status
    The SQL statement being executed at the time of the error was: &SQLSTMT and wJob number is: 642
    The call to function PingProcess in cartridge AQCART has failed.
    Routine FNDSM cannot terminate the concurrent process with concurrent process ID &CPID and
    operating system process ID 7537140
    The SQL statement being executed at the time of the error was: &SQLSTMT and was executed from the file &ERRFILE.
    01-FEB-2013 10:44:34 - ORACLE error 1000 in get_status
    Cause: get_status failed due to ORA-01000: maximum open cursors exceeded.
    Again after some time i used to get this error
    Cause: get_status failed due to ORA-01000: maximum open cursors exceeded.
    The SQL statement being executed at the time of the error was: &SQLSTMT and was executed from the file &ERRFILE.
    01-FEB-2013 11:12:15 - ORACLE error 1000 in get_status
    Cause: get_status failed due to ORA-01000: maximum open cursors exceeded.
    The SQL statement being executed at the time of the error was: &SQLSTMT and was executed from the file &ERRFILE.
    The call to function PingProcess in cartridge AQCART has failed.
    Job number is: 651
    Suggestions are welcome
    Regards
    Surinder Singh
    Edited by: Surinder Singh on Feb 1, 2013 11:16 AM

    Surinder Singh wrote:
    Database Version - Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    Application Version - 11.5.10.2
    Current Open cursors value
    SUM(A.VALUE) NAME
    28396 opened cursors current
    Regards
    Surinder SinghThis value is high.
    Please run AutoConfig and make sure it completes successfully.
    Can you find any errors in the database log file?
    Thanks,
    Hussein

  • Finder will not let me log out or shut down. just updated to Lion 10.7.5 Says programs still running

    I have just updated my Macbook(late 2009) to Lion OS X 10.7.5 and when I go to logout or shut down the Finder icon starts jumping. I click on it and a popup window says, "The Finder can't quit because some operations are still in progress"  - "You can cancel or stop the operations, and then try again". I go to the Dock and everything is closed. Wait! I go to Mac App Store and iTunes Stores. I log out of both of them. I try to log out and shut gown again and Finder still won't let me. Same message.
    Is anyone else out there experiencing this. Can anyone help me? What is still running? How to find out what is still running? I dreaded this ever since the announcement of ML.

    Do a PRAM reset.
    Shut down the computer.
    Locate the following keys on the keyboard: Command (⌘), Option, P, and R. You will need to hold these keys down simultaneously in step 4.
    Turn on the computer.
    Immediately press and hold the Command-Option-P-R keys. You must press this key combination before the gray screen appears.Continue holding the keys down until the computer restarts, and you hear the startup sound for the second time.
    Release the keys.

Maybe you are looking for