Linux环境 Oracle 监听和服务 日常操作
生活随笔
收集整理的這篇文章主要介紹了
Linux环境 Oracle 监听和服务 日常操作
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
文章目錄
- 一、Oracle監(jiān)聽
- 1.1. 查看Oracle監(jiān)聽運(yùn)行狀態(tài)
- 1.2. 啟動(dòng)Oracle監(jiān)聽
- 1.3. 關(guān)閉監(jiān)聽器
- 二、Oracle 服務(wù)
- 2.1. 以SYS用戶身份登錄Oracle
- 2.2. 切換用戶至sys
- 2.3. 啟動(dòng)Oracle實(shí)例
- 2.4. 停止Oeacle實(shí)例運(yùn)行
一、Oracle監(jiān)聽
操作聲明:登錄服務(wù)器,切換到oracle用戶,或者以oracle用戶登錄
#切換oracle用戶
[root@localhost ~]$ su - oracle
密碼:
[oracle@localhost ~]$
1.1. 查看Oracle監(jiān)聽運(yùn)行狀態(tài)
[oracle@localhost ~]$ lsnrctl status從圖中可以看到oracle監(jiān)聽沒有運(yùn)行
1.2. 啟動(dòng)Oracle監(jiān)聽
[oracle@localhost ~]$ lsnrctl start
再次查看Oracle監(jiān)聽運(yùn)行狀態(tài)
從圖中可以看到oracle監(jiān)聽已經(jīng)運(yùn)行
1.3. 關(guān)閉監(jiān)聽器
二、Oracle 服務(wù)
2.1. 以SYS用戶身份登錄Oracle
[oracle@localhost ~]$ sqlplus /nologSQL*Plus: Release 11.2.0.4.0 Production on Sat May 16 15:43:46 2020Copyright (c) 1982, 2013, Oracle. All rights reserved.SQL> conn /as sysdba Connected to an idle instance.2.2. 切換用戶至sys
切換用戶:
CONN 用戶名/密碼 [AS SYSDBA],如果是sys用戶一定要寫上AS SYSDBA
2.3. 啟動(dòng)Oracle實(shí)例
SQL> startup ORACLE instance started.Total System Global Area 8551575552 bytes Fixed Size 2270360 bytes Variable Size 4244638568 bytes Database Buffers 4294967296 bytes Redo Buffers 9699328 bytes Database mounted. Database opened.2.4. 停止Oeacle實(shí)例運(yùn)行
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操作日志如下;
Last login: Sat Jun 20 18:03:14 2020 from 192.168.6.188 [root@sonar ~]# su - oracle ORACLE_BASE=/u01/oracle ORACLE_HOME=/u01/oracle/product/11.2.0/db_1 ORACLE_SID=sonar [oracle@sonar ~]$ lsnrctl statusLSNRCTL for Linux: Version 11.2.0.4.0 - Production on 20-JUN-2020 18:31:19Copyright (c) 1991, 2013, Oracle. All rights reserved.Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=sonar)(PORT=1521))) TNS-12541: TNS:no listenerTNS-12560: TNS:protocol adapter errorTNS-00511: No listenerLinux Error: 111: Connection refused Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521))) TNS-12541: TNS:no listenerTNS-12560: TNS:protocol adapter errorTNS-00511: No listenerLinux Error: 111: Connection refused [oracle@sonar ~]$ lsnrctl startLSNRCTL for Linux: Version 11.2.0.4.0 - Production on 20-JUN-2020 18:31:32Copyright (c) 1991, 2013, Oracle. All rights reserved.Starting /u01/oracle/product/11.2.0/db_1/bin/tnslsnr: please wait...TNSLSNR for Linux: Version 11.2.0.4.0 - Production System parameter file is /u01/oracle/product/11.2.0/db_1/network/admin/listener.ora Log messages written to /u01/oracle/diag/tnslsnr/sonar/listener/alert/log.xml Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=sonar)(PORT=1521))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=sonar)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production Start Date 20-JUN-2020 18:31:34 Uptime 0 days 0 hr. 0 min. 0 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/oracle/product/11.2.0/db_1/network/admin/listener.ora Listener Log File /u01/oracle/diag/tnslsnr/sonar/listener/alert/log.xml Listening Endpoints Summary...(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=sonar)(PORT=1521)))(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) The listener supports no services The command completed successfully [oracle@sonar ~]$ lsnrctl statusLSNRCTL for Linux: Version 11.2.0.4.0 - Production on 20-JUN-2020 18:31:47Copyright (c) 1991, 2013, Oracle. All rights reserved.Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=sonar)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production Start Date 20-JUN-2020 18:31:34 Uptime 0 days 0 hr. 0 min. 13 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/oracle/product/11.2.0/db_1/network/admin/listener.ora Listener Log File /u01/oracle/diag/tnslsnr/sonar/listener/alert/log.xml Listening Endpoints Summary...(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=sonar)(PORT=1521)))(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) The listener supports no services The command completed successfully [oracle@sonar ~]$ sqlplus /nologSQL*Plus: Release 11.2.0.4.0 Production on Sat Jun 20 18:32:56 2020Copyright (c) 1982, 2013, Oracle. All rights reserved.SQL> conn /as sysdba Connected to an idle instance. SQL> startup ORACLE instance started.Total System Global Area 8551575552 bytes Fixed Size 2270360 bytes Variable Size 4244638568 bytes Database Buffers 4294967296 bytes Redo Buffers 9699328 bytes Database mounted. Database opened. SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options [oracle@sonar ~]$總結(jié)
以上是生活随笔為你收集整理的Linux环境 Oracle 监听和服务 日常操作的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: TortoiseGit 将工作区变动文件
- 下一篇: linux 其他常用命令