真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

ORACLE12C開機自動啟動監(jiān)聽、CDB、PDB-創(chuàng)新互聯(lián)

linux下數(shù)據(jù)庫實例監(jiān)聽開機自啟動設(shè)置
2018年8月1日 zhanky

創(chuàng)新互聯(lián)公司專注于郊區(qū)網(wǎng)站建設(shè)服務(wù)及定制,我們擁有豐富的企業(yè)做網(wǎng)站經(jīng)驗。 熱誠為您提供郊區(qū)營銷型網(wǎng)站建設(shè),郊區(qū)網(wǎng)站制作、郊區(qū)網(wǎng)頁設(shè)計、郊區(qū)網(wǎng)站官網(wǎng)定制、小程序開發(fā)服務(wù),打造郊區(qū)網(wǎng)絡(luò)公司原創(chuàng)品牌,更為您提供郊區(qū)網(wǎng)站排名全網(wǎng)營銷落地服務(wù)。

測試介紹
系統(tǒng)版本:Oracle linux 7.2 x64
數(shù)據(jù)庫版本:Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
實例名:orcl CDP:orcl PDB:orcl1、orcl2
ORACLE_HOME:/u01/app/oracle/product/12.2.0/db_1

一、設(shè)置監(jiān)聽和CDB開機自啟
通過使用rc.local開機自動運行腳本,調(diào)用Oracle自帶的dbstart和lsnrct啟動。但調(diào)用dbstart需要在oratab中允許
1、修改oratab

[root@zhanky ~]# vi /etc/oratab 
[root@zhanky ~]# cat /etc/oratab 
#
# This file is used by ORACLE utilities.  It is created by root.sh
# and updated by either Database Configuration Assistant while creating
# a database or ASM Configuration Assistant while creating ASM instance.

# A colon, ':', is used as the field terminator.  A new line terminates
# the entry.  Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
#   $ORACLE_SID:$ORACLE_HOME::
#
# The first and second fields are the system identifier and home
# directory of the database respectively.  The third field indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#

2、編輯rc.local
因為Oracle linux 7.2默認(rèn)rc.local是沒有執(zhí)行權(quán)限,需執(zhí)行chmod自己增加
dbstart默認(rèn)將oratab中參數(shù)為Y的所有庫啟動

[root@zhanky ~]# vi /etc/rc.d/rc.local 
[root@zhanky ~]# cat /etc/rc.d/rc.local 
!/bin/bash
THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES

It is highly advisable to create own systemd services or udev rules
to run scripts during boot instead of using this file.

In contrast to previous versions due to parallel execution during boot
this script will NOT be run after all other services.

Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure
that this script will be executed during boot.

touch /var/lock/subsys/local
##用oracle用戶登錄,運行l(wèi)snrctl start 腳本啟用監(jiān)聽。
su - oracle -c "/u01/app/oracle/product/12.2.0/db_1/bin/lsnrctl start"
##用oracle用戶登錄,運行dbstart啟動數(shù)據(jù)庫
su - oracle -c "/u01/app/oracle/product/12.2.0/db_1/bin/dbstart"
[root@zhanky ~]# chmod +x /etc/rc.d/rc.local

二、設(shè)置PDB自動啟動
通過觸發(fā)器來啟東PDB,下列觸發(fā)器中ALTER PLUGGABLE DATABASE ALL OPEN代表將所有PDB啟動,
如果只需

CREATE OR REPLACE TRIGGER open_pdbs
AFTER STARTUP ON DATABASE
BEGIN
EXECUTE IMMEDIATE 'ALTER PLUGGABLE DATABASE ALL OPEN';
END open_pdbs;
/

三、測試驗證,重啟數(shù)據(jù)庫服務(wù)器即可。

另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)cdcxhl.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國服務(wù)器、虛擬主機、免備案服務(wù)器”等云主機租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務(wù)可用性高、性價比高”等特點與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場景需求。


本文標(biāo)題:ORACLE12C開機自動啟動監(jiān)聽、CDB、PDB-創(chuàng)新互聯(lián)
分享網(wǎng)址:http://weahome.cn/article/dsdsjg.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部