1、 Oracle 19c rpm安装后配置的示例数据库是容器数据库,大部分系统中使用的还是以前的非容器数据库。在安装完rpm包后,可以使用dbca根据自己的需要创建数据库了,创建之前,先删除已经创建的示例数据库
./oracledb_ORCLCDB-19c delete
2、编辑一个dbca.rsp文件,用来生成数据库实例(文件目录在/home/oracle下)
##############################################################################
## ##
## DBCA response file ##
## ------------------ ##
## Copyright(c) Oracle Corporation 1998,2019. All rights reserved. ##
## ##
## Specify values for the variables listed below to customize ##
## your installation. ##
## ##
## Each variable is associated with a comment. The comment ##
## can help to populate the variables with the appropriate ##
## values. ##
## ##
## IMPORTANT NOTE: This file contains plain text passwords and ##
## should be secured to have read permission only by oracle user ##
## or db administrator who owns this installation. ##
##############################################################################
#-------------------------------------------------------------------------------
# Do not change the following system generated value.
#-------------------------------------------------------------------------------
responseFileVersion=/oracle/assistants/rspfmt_dbca_response_schema_v19.0.0
#-----------------------------------------------------------------------------
# Name : gdbName
# Datatype : String
# Description : Global database name of the database
# Valid values : <db_name>.<db_domain> - when database domain isn't NULL
# <db_name> - when database domain is NULL
# Default value : None
# Mandatory : Yes
#-----------------------------------------------------------------------------
gdbName=ORCLDB
templateName=/opt/oracle/product/19c/dbhome_1/assistants/dbca/templates/General_Purpose.dbc
sysPassword=system123
systemPassword=system123
datafileDestination=
characterSet=UTF8
3、使用dbca创建数据库
dbca -silent -createDatabase -responseFile /home/oracle/dbca.rsp
4、修改oracle环境变量
export ORACLE_PFILE=/opt/oracle/product/19c/dbhome_1/dbs/initORCLDB.ora
export ORACLE_SID=ORCLDB
5、执行source .bash_profile
6、编辑一个initORCL.ora的配置文件(可以从别的地方复制一个,也可以按这个写一个initORCL.ora的文件)
7、修改监听配置文件
把这个目录下的监听文件移动到上一级admin目录下
然后编辑监听文件(在文本最下方添加)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.3.51)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_NAME = ORCLDB)
(SID_NAME = ORCLDB)
(ORACLE_HOME = /opt/oracle/product/19c/dbhome_1)
)
)
8、启动监听
lsnrctl status 查询监听状态
lsnrctl start 启动监听
lsnrctl stop 关闭监听
9、 进入数据库
sqlplus / as sysdba
10、启动数据库实例
startup 启动数据库
shutdown immediate 关闭数据库标签:容器,数据库,####,SID,oracle,监听,dbca From: https://www.cnblogs.com/zongyvshu/p/17928126.html