oracle - 数据库未启动,但使用 oracle 12 和 centos 监听器是
问题描述
我正在尝试在启动时配置数据库启动(带有 CentO 的 oracle 12)。我创建了一个这样的新服务:
# /etc/systemd/system/oracle-rdbms.service
# Invoking Oracle scripts to start/shutdown Instances defined in /etc/oratab
# and starts Listener
[Unit]
Description=Oracle Database(s) and Listener
Requires=network.target
[Service]
Type=forking
Restart=no
ExecStart=/u01/app/oracle/product/12.2.0/dbhome_1/bin/dbstart /u01/app/oracle/product/12.2.0/dbhome_1 &
ExecStop=/u01/app/oracle/product/12.2.0/dbhome_1/bin/dbshut /u01/app/oracle/product/12.2.0/dbhome_1 &
User=oracle
[Install]
WantedBy=multi-user.target
我看到监听器启动并运行:
lsnrctl status
LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 01-APR-2020 10:35:31
Copyright (c) 1991, 2016, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle19.dummy.es)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date 01-APR-2020 10:27:54
Uptime 0 days 0 hr. 7 min. 37 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/12.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/oracle19/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracle19.dummy.es)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully
但未安装数据库。我必须启动才能安装。我怎么能在引导数据库时挂载? - 编辑
我的 oratab
more /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:<N|Y>:
#
# 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.
#
#
controlm:/u01/app/oracle/product/12.2.0/dbhome_1:N
谢谢!
解决方案
推荐阅读
- php - 从 Cpanel 迁移到 Plesk 后,一些 php 代码无法正常工作
- vue.js - App Engine 的 Vue PWA 未在自定义域上更新
- android - 如何在 Kotlin SharedPreferences 中添加新对象
- php - 对于 5 岁以上的所有年龄段,我都得到了错误的结果。我不能使用 switch 语句
- python - 如何使用 python 从 spark 数据框中获取交叉表的行百分比?
- parameters - chectl server:deploy --platform minikube error required parameter body
- html - 反应式表单:在某些控件上用不同的功能替换回车键提交
- reactjs - 如何在 typescript 3 项目中使用 typescript 4 包?
- mysql - 连接两个 mySQL 表并使用唯一值进行汇总
- kubernetes - Kops 无法编辑节点实例类型