日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 运维知识 > linux >内容正文

linux

Linux环境 Oracle 监听和服务 日常操作

發(fā)布時(shí)間:2024/9/27 linux 32 豆豆
生活随笔 收集整理的這篇文章主要介紹了 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@localhost ~]$ lsnrctl status

從圖中可以看到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

sqlplus /nolog conn /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)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。