ORACLE 12C 开机自动启动监听、CDB、PDB
发表于:2025-11-12 作者:千家信息网编辑
千家信息网最后更新 2025年11月12日,linux下数据库实例监听开机自启动设置2018年8月1日 zhanky测试介绍系统版本:Oracle linux 7.2 x64数据库版本:Oracle Database 12c Enterpris
千家信息网最后更新 2025年11月12日ORACLE 12C 开机自动启动监听、CDB、PDB
linux下数据库实例监听开机自启动设置
2018年8月1日 zhanky
测试介绍
系统版本:Oracle linux 7.2 x64
数据库版本: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
一、设置监听和CDB开机自启
通过使用rc.local开机自动运行脚本,调用Oracle自带的dbstart和lsnrct启动。但调用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默认rc.local是没有执行权限,需执行chmod自己增加
dbstart默认将oratab中参数为Y的所有库启动
[root@zhanky ~]# vi /etc/rc.d/rc.local [root@zhanky ~]# cat /etc/rc.d/rc.local !/bin/bashTHIS FILE IS ADDED FOR COMPATIBILITY PURPOSESIt is highly advisable to create own systemd services or udev rulesto run scripts during boot instead of using this file.In contrast to previous versions due to parallel execution during bootthis script will NOT be run after all other services.Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensurethat this script will be executed during boot.touch /var/lock/subsys/local##用oracle用户登录,运行lsnrctl start 脚本启用监听。su - oracle -c "/u01/app/oracle/product/12.2.0/db_1/bin/lsnrctl start"##用oracle用户登录,运行dbstart启动数据库su - oracle -c "/u01/app/oracle/product/12.2.0/db_1/bin/dbstart"[root@zhanky ~]# chmod +x /etc/rc.d/rc.local二、设置PDB自动启动
通过触发器来启东PDB,下列触发器中ALTER PLUGGABLE DATABASE ALL OPEN代表将所有PDB启动,
如果只需
CREATE OR REPLACE TRIGGER open_pdbsAFTER STARTUP ON DATABASEBEGINEXECUTE IMMEDIATE 'ALTER PLUGGABLE DATABASE ALL OPEN';END open_pdbs;/三、测试验证,重启数据库服务器即可。
数据
数据库
监听
运行
实例
版本
用户
脚本
触发器
测试
登录
代表
参数
只需
服务器
权限
系统
启东
中允
服务
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
七一网络安全会议
磊科无线网络安全设置
魔兽世界广东哪个服务器最多
网络安全标志的图片
抗ddos攻击服务器
直播软件开发哪家有实力
进一步深化网络安全管理
ftp服务器自定义端口
服务器维护和管理
网络安全高危端口含义
服务器打开登录器没反应怎么回事
审计网络安全和信息化建设意见
网络安全行业的规划
南京道道道网络技术公司
湖南众帮互联网科技有限公司
java 做数据库归档
做菜和软件开发
深渊数据库怎么看
fm数据库开多大
服务器映射到外网安全问题
数据库原理与应用教学
数据库查询选取产品查询
服务器可以随时更换地址吗
学生会网络技术部申请书
服务器跨国如何解决速度
渝中软件开发价格
松江区网络技术批发价
网络技术实务第三章
计算机网络技术专业通信方向
服务器 图片 ppt