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

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

Linux启动多个Oracle实例

發布時間:2025/3/21 linux 51 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Linux启动多个Oracle实例 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

概述

Centos6.5 有兩個數據庫實例 orcl1 和 orcl2

需要都起來

關鍵:操作每個數據庫實例之前設置ORACLE_SID變量
export ORACLE_SID=數據庫實例

啟動orcl1

使用oracle用戶登錄主機

[root@entel2 ~]# su - oracle oracle@entel2:[/oracle]$export ORACLE_SID=orcl1 oracle@entel2:[/oracle]$sqlplus sys/system as sysdbaSQL*Plus: Release 11.2.0.4.0 Production on Wed Sep 28 07:23:47 2016Copyright (c) 1982, 2013, Oracle. All rights reserved.Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL>startup

無誤即可。

啟動orcl2

使用oracle用戶登錄主機

[root@entel2 ~]# su - oracle oracle@entel2:[/oracle]$export ORACLE_SID=orcl2 oracle@entel2:[/oracle]$sqlplus sys/system as sysdbaSQL*Plus: Release 11.2.0.4.0 Production on Wed Sep 28 07:23:47 2016Copyright (c) 1982, 2013, Oracle. All rights reserved.Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> startup ORACLE instance started.Total System Global Area 801701888 bytes Fixed Size 2232640 bytes Variable Size 318770880 bytes Database Buffers 473956352 bytes Redo Buffers 6742016 bytes Database mounted. Database opened.

Database opened.


監聽啟動

切到oracle用戶

[root@entel2 ~]# su - oracle

查看監聽狀態

oracle@entel2:[/oracle]$lsnrctl statusLSNRCTL for Linux: Version 11.2.0.4.0 - Production on 28-SEP-2016 07:25:02Copyright (c) 1991, 2013, Oracle. All rights reserved.Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.45.7.198)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production Start Date 28-SEP-2016 06:06:16 Uptime 0 days 1 hr. 18 min. 46 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /oracle/product/112/network/admin/listener.ora Listener Log File /oracle/diag/tnslsnr/entel2/listener/alert/log.xml Listening Endpoints Summary...(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.45.7.198)(PORT=1521)))(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.123.1)(PORT=1521))) Services Summary... Service "orcl1" has 2 instance(s).Instance "orcl1", status UNKNOWN, has 1 handler(s) for this service...Instance "orcl1", status READY, has 1 handler(s) for this service... Service "orcl2" has 2 instance(s).Instance "orcl2", status UNKNOWN, has 1 handler(s) for this service...Instance "orcl2", status READY, has 1 handler(s) for this service... The command completed successfully

啟動/停止

lsnrctl start/stop

監聽 UNKNOWN狀態解釋

實例狀態為UNKNOWN值時表明此服務是靜態注冊的設置。這時監聽器用來表明它不知道關于該實例的任何信息,只有當客戶發出連接請求時,它才檢查該實例是否存在。

動態注冊的數據庫通過狀態信息中的狀態READY或狀態BLOCKED(對于一個備用數據庫)來指明。不管關閉何時數據庫,動態注冊的數據庫都會動態地從 監聽器注銷,而與之相關的信息將從狀態列表中消失。這樣,不管數據庫是在運行還是已經關閉,監聽器總是知道它的狀態。該信息將被用于連接請求的回退(fallback)和負載平衡。

既然有動態監聽為什么還要靜態監聽呢?原因如下:
  1.監聽器不是最早啟動,oracle實例先啟動
  2.監聽器重啟
  3.oracle實例沒有open

更加詳細的解釋請看Dave的博文 Oracle Listener 動態注冊 與 靜態注冊

總結

以上是生活随笔為你收集整理的Linux启动多个Oracle实例的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。