Database Startup | |||||||
What do they do? |
| ||||||
Startup | STARTUP [FORCE][RESTRICT][NOMOUNT][MIGRATE][QUIET] [PFILE=] [MOUNT [EXCLUSIVE] x | OPEN ] | ||||||
SQL> STARTUP | |||||||
Startup Force | SQL> STARTUP FORCE | ||||||
Startup Nomount | SQL> STARTUP NOMOUNT | ||||||
Startup Mount | SQL> STARTUP MOUNT | ||||||
Startup Mount Exclusive | Deprecated .. now use STARTUP MOUNT | ||||||
Startup Open | SQL> STARTUP OPEN | ||||||
Startup Migrate | SQL> STARTUP MIGRATE | ||||||
Startup Restricted | SQL> STARTUP RESTRICT | ||||||
Startup | STARTUP [PFILE=]{UPGRADE | DOWNGRADE} [QUIET] | ||||||
SQL> STARTUP UPGRADE | |||||||
Alter Database | |||||||
Alter Database Mount | SQL> ALTER DATABASE MOUNT | ||||||
Alter Database Open | SQL> ALTER DATABASE OPEN | ||||||
Database Shutdown | |||||||
Shutdown | SHUTDOWN | ||||||
SQL> SHUTDOWN | |||||||
Shutdown Normal | SQL> SHUTDOWN NORMAL | ||||||
Shutdown Transactional | SQL> SHUTDOWN TRANSACTIONAL | ||||||
Shutdown Immediate | SQL> SHUTDOWN IMMEDIATE | ||||||
Shutdown Abort | SQL> SHUTDOWN ABORT | ||||||
Oracle Supplied Startup & Shutdown Scripts | |||||||
Startup | dbstart | ||||||
Shutdown | dbshut | ||||||
System Hangs On Shutdown | |||||||
Solution #1 | SQL> alter system checkpoint; SQL> shutdown abort SQL> startup restrict SQL> shutdown immediate | ||||||
Oracle Services On Windows | |||||||
Startup | net start OracleService | ||||||
c:winntsystem32 net start oracleserviceorabase | |||||||
Shutdown | net stop OracleService | ||||||
c:winntsystem32 net stop oracleserviceorabase | |||||||
Help | net | ||||||
c:winntsystem32 net help helpmsg c:winntsystem32net1063 | |||||||
Oracle Services On Windows With Oradim | |||||||
Start Oracle Service | oradim -STARTUP [-SID | -ASMSID [-SYSPWD ] [STARTTYPE [-PFILE | -SPFILE] | ||||||
$ORACLE_HOMEbinoradim -STARTUP -SID orabase -STARTTYPE tstc -SPFILE | |||||||
Stop Oracle Service | oradim -SHUTDOWN [-SID | -ASMSID [-SYSPWD ] [-SHUTTYPE [-SHUTMODE | ||||||
$ORACLE_HOMEbinoradim -SHUTDOWN -SID orabase -SHUTMODE abort | |||||||
Stopping Processes | |||||||
When stop doesn't stop | alter database close may fail for many reasons. Among them job queue processes, dbms_job, and advanced queueing. SQL> ALTER DATABASE CLOSE; alter database close * ERROR at line 1: ORA-01093: ALTER DATABASE CLOSE only permitted with no sessions connected col username format a20 col schemaname format a20 col osuser format a20 SELECT username, schemaname, osuser, status FROM gv$session; ALTER SYSTEM SET job_queue_processes = 0 SCOPE=MEMORY; ALTER SYSTEM SET aq_tm_processes=0 SCOPE=MEMORY; ALTER DATABASE CLOSE; | ||||||
Force log files to be archived in preparation for media recovery | startup mount exclusive; alter database orabase archivelog; alter system archive log start; alter database open; | ||||||
When testing startup scripts be sure you are mimicking the environment under which the script will actually run | For example: sh -x /etc/init.d/oracle start |
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/236283/viewspace-1008277/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/236283/viewspace-1008277/