程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> Oracle數據庫 >> Oracle數據庫基礎 >> Solaris下Oracle的基本操作

Solaris下Oracle的基本操作

編輯:Oracle數據庫基礎

1 啟動數據庫監聽

su -oracle——切換Oracle用戶(如果使用su Oracle ,則啟動時不運行.profile用戶環境配置文件)

$ lsnrctl start——啟動監聽

2 啟動數據庫

$ sqlplus "/ as sysdba"——用sys用戶登陸sqlplus

SQL*Plus: Release 9.2.0.5.0 - Production on Thu Oct 9 15:06:11 2003
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to an idle instance.

SQL> startup——啟動數據庫

Oracle instance started.
Total System Global Area 538412728 bytes
Fixed Size 743096 bytes
Variable Size 268435456 bytes
Database Buffers 268435456 bytes
Redo Buffers 798720 bytes
Database mounted.
Database opened.

SQL> exit——退出sqlplus

Disconnected from Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.5.0 - Production

或者

$dbstart

3 查看數據庫進程

$ 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 2003
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.5.0 - Production

SQL> shutdown immediate——關閉數據庫

Database closed.
Database dismounted.
Oracle instance shut down.

SQL> exit

Disconnected from Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.5.0 - Production

或者

$dbshut

5 停止數據庫監聽

$ lsnrctl stop---停止監聽

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved