Linux下啟動/關閉Oracle


一、Linux下啟動Oracle

  Linux下啟動Oracle分為兩步:

  1)啟動監聽;

  2)啟動數據庫實例;

 

1.登錄服務器,切換到oracle用戶,或者以oracle用戶登錄

[admin@dataserver ~]$ su - oracle 密碼: [oracle@dataserver ~]$

2.打開監聽服務

[oracle@localhost ~]$ lsnrctl start

可以通過lsnrctl status命令查看Oracle監聽器運行狀況

[oracle@localhost ~]$ lsnrctl status

3.以SYS用戶身份登錄Oracle

復制代碼
[oracle@localhost ~]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.1.0 Production on Fri Dec 1 23:29:19 2017 Copyright (c) 1982, 2009, Oracle. All rights reserved. SQL> conn /as sysdba Connected to an idle instance.
復制代碼

切換用戶:

CONN 用戶名/密碼 [AS SYSDBA],如果是sys用戶一定要寫上AS SYSDBA

4.通過startup命令啟動實例

復制代碼
SQL> startup
ORACLE instance started.

Total System 
... ...
Database mounted. Database opened. SQL>
復制代碼

 

二、Linux下關閉Oracle

1.關閉數據庫實例

復制代碼
SQL> shutdown
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> quit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
復制代碼

2.關閉監聽器

[oracle@localhost ~]$ lsnrctl stop


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM