Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Win2K- How to start DB? thru Services or Sql*Plus?

Re: Win2K- How to start DB? thru Services or Sql*Plus?

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 11 Aug 2002 02:29:14 -0700
Message-ID: <92eeeff0.0208110129.5b7f9262@posting.google.com>


> However, if you want to make a cold backup, you need to make sure both
> the database and the service has been stopped, so you need oradim
>
> Sybrand Bakker, Senior Oracle DBA
>
>
> The only time you need to stop the service, and when a boring old sqlplus
> shutdown isn't good enough, is when you need to delete or move database
> files
>
> Regards
> HJR
>

Correction. You do not need to shutdown the service to do cold backup of the database or move datafiles. As far as Oracle internal processes are concerned, they don't care if they are shutdown from a service or svrmgrl/sqlplus or oradim. If the database is shutdown from svrmgrl or sqlplus without stopping the service afterwards, it is still a clean shutdown. This can be verified from datafile timestamps and alert log.

All Oracle service does is that it kicks off the oracle process and then uses oradim to startup the database or shut it down. If the ORA_<DBSID>_AUTOSTART entry in registry is set to "TRUE", then oradim is used to startup the database.... otherwise only oracle process is started which is then used by svrmgrl/sqlplus to connect and startup the database.

In fact, you don't even need to have the oracle service running to startup the database. *It is not recommended to use this method* because, beside being unsafe, you will not be able to log off the server as you are not using Oracle service to kick off the oracle process, however, you can successfully startup and shutdown a database like this. e.g. if db_sid is ORCL.

  1. Stop service OracleServiceORCL
  2. Open cmd prompt.
  3. Type this and enter. This will kick off the oracle process for ORCL. C:\> ORACLE_HOME\bin\oracle ORCL You will be prompted "Hit any key to exit server:" Don't hit any key and leave the command prompt running.
  4. Open another cmd prompt.
  5. C:\> set oracle_sid=ORCL
  6. C:\> ORACLE_HOME\bin\svrmgrl
  7. SVRMGR> connect internal/password
  8. SVRMGR> startup pfile=<Full path and name to pfile>

If you do not hit any key in first cmd prompt, database will keep running.
To shutdown the database, use svrmgrl/sqlplus to shutdown immediate and then hit any key in first cmd prompt.

IMO, safest way to startup or shutdown a database is thru svrmgrl or sqlplus.

//Rauf Sarwar Received on Sun Aug 11 2002 - 04:29:14 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US