Solaris下Oracle的基本操作

网络整理 - 06-30

   启动数据库监听

  su oracle――切换Oracle用户(如果使用su oracle 则启动时不运行profile用户环境配置文件)

  $ lsnrctl start――启动监听

   启动数据库

  $ sqlplus / as sysdba――用sys用户登陆sqlplus

  SQL*Plus: Release Production on Thu Oct ::

  Copyright (c) Oracle Corporation All rights reserved

  Connected to an idle instance

  SQL> startup――启动数据库

  ORACLE instance started

  Total System Global Area bytes

  Fixed Size bytes

  Variable Size bytes

  Database Buffers bytes

  Redo Buffers bytes

  Database mounted

  Database opened

  SQL> exit――退出sqlplus

  Disconnected from Oraclei Enterprise Edition Release bit Production

  With the Partitioning option

  JServer Release Production

  或者

  $dbstart

   查看数据库进程

  $ ps ef|grep ora_――查看oracle进程

  oracle :: : ora_smon_bxmis

  oracle :: pts/ : grep ora_

  oracle :: : ora_dbw_bxmis

  oracle :: : ora_reco_bxmis

  oracle :: : ora_ckpt_bxmis

  oracle :: : ora_pmon_bxmis

  oracle :: : ora_qmn_bxmis

  oracle :: : ora_lgwr_bxmis

  oracle :: : ora_cjq_bxmis

  $ ps ef|grep lsnr――查看oracle监听进程

   关闭数据库

  $ sqlplus / as sysdba

  SQL*Plus: Release Production on Thu Oct ::

  Copyright (c) Oracle Corporation All rights reserved

  Connected to:

  Oraclei Enterprise Edition Release bit Production

  With the Partitioning option

  JServer Release Production

  SQL> shutdown immediate――关闭数据库

  Database closed

  Database dismounted

  ORACLE instance shut down

  SQL> exit

  Disconnected from Oraclei Enterprise Edition Release bit Production

  With the Partitioning option

  JServer Release Production

  或者

  $dbshut

   停止数据库监听

  $ lsnrctl stop---停止监听