Solaris 下的 oracle 的基本操作。
2024-08-29 13:28:55
供稿:網友
 
一、啟動、關閉數據庫1、啟動數據庫監聽su - oracle---切換oracle用戶(如果使用su oracle ,則啟動時不運行.profile用戶環境配置文件)$ lsnrctl start---啟動監聽2、啟動數據庫$ sqlplus "/ as sysdba"---用sys用戶登陸sqlplussql*plus: release 9.2.0.5.0 - production on thu oct 9 15:06:11 2003copyright (c) 1982, 2002, oracle corporation. all rights reserved.connected to an idle instance.sql> startup---啟動數據庫oracle instance started.total system global area 538412728 bytesfixed size 743096 bytesvariable size 268435456 bytesdatabase buffers 268435456 bytesredo buffers 798720 bytesdatabase mounted.database opened.sql> exit---退出sqlplusdisconnected from oracle9i enterprise edition release 9.2.0.5.0 - 64bit productionwith the partitioning optionjserver release 9.2.0.5.0 - production或者$dbstart3、查看數據庫進程$ ps -ef|grep ora_---查看oracle進程oracle 688322 1 0 15:06:20 - 0:00 ora_smon_bxmis oracle 696534 704704 0 15:06:35 pts/4 0:00 grep ora_ oracle 729224 1 0 15:06:20 - 0:00 ora_dbw0_bxmis oracle 745618 1 0 15:06:20 - 0:00 ora_reco_bxmis oracle 770216 1 0 15:06:20 - 0:00 ora_ckpt_bxmis oracle 778394 1 0 15:06:20 - 0:00 ora_pmon_bxmis oracle 843876 1 0 15:06:20 - 0:00 ora_qmn0_bxmis oracle 901342 1 0 15:06:20 - 0:00 ora_lgwr_bxmis oracle 925704 1 0 15:06:20 - 0:00 ora_cjq0_bxmis $ ps -ef|grep lsnr---查看oracle監聽進程4、關閉數據庫$ sqlplus "/ as sysdba"sql*plus: release 9.2.0.5.0 - production on thu oct 9 15:07:04 2003copyright (c) 1982, 2002, oracle corporation. all rights reserved.connected to:oracle9i enterprise edition release 9.2.0.5.0 - 64bit productionwith the partitioning optionjserver release 9.2.0.5.0 - productionsql> shutdown immediate---關閉數據庫database closed.database dismounted.oracle instance shut down.sql> exitdisconnected from oracle9i enterprise edition release 9.2.0.5.0 - 64bit productionwith the partitioning optionjserver release 9.2.0.5.0 - production或者$dbshut5、停止數據庫監聽$ lsnrctl stop---停止監聽