Linux_CentOS_7.9_Oracle11gr2 configuration database and monitoring service self-starting multi-scheme practical operation simple record

Foreword: As an operation and maintenance guarantee, it is impossible to accurately predict the sudden stage of hardware downtime, and its production data is generated in real time. The importance and necessity of DBA database services and related Listeners are highlighted. Here is a configuration record of the virtual machine test for your reference.

Implementation method one:

环境变量值::$ORACLE_HOME= /data/oracle/product/11.2.0/db_1/
1. After installing the Oracle database: Complete the configuration and execute dbstart and dbshut
[root@orcl3 ~]# su - oracle
[oracle@orcl3 ~]$ dbstart
ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener
Usage: /data/oracle/product/11.2.0/db_1/bin/dbstart ORACLE_HOME

Insert image description here
Reason for the error: There is a problem with the settings of ORACLE_HOME_LISTNER in the dbstart and dbshut script files.

[oracle@orcl3 ~]$ vim /data/oracle/product/11.2.0/db_1/bin/dbstart
[oracle@orcl3 ~]$ vim /data/oracle/product/11.2.0/db_1/bin/dbshut 

Open the two files separately and find the following lines and modify them:

ORACLE_HOME_LISTNER=$1
修改为:
ORACLE_HOME_LISTNER=$ORACLE_HOME

Insert image description here

2. Automatically start Oracle monitoring and instances when Linux starts
1. Modify the /etc/oratab file
[root@orcl3 data]# vim /etc/oratab
找到:   orcl:/data/oracle/product/11.2.0/db_1/:N   
修改为: orcl:/data/oracle/product/11.2.0/db_1/:Y

Insert image description here
#--------------------------#
If there is no /etc/oratab file, you need to perform the following steps (if any, you can skip this directly Steps)
Execute the following script under Root to generate the /etc/oratab file

[root@orcl3 ~]# /data/oracle/product/11.2.0/db_1/root.sh 
[root@orcl3 ~]# /data/oraInventory/orainstRoot.sh
[root@orcl3 ~]# /data/oracle/product/11.2.0/db_1/root.sh 
Performing root user operation for Oracle 11g 
The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /data/oracle/product/11.2.0/db_1
Enter the full pathname of the local bin directory: [/usr/local/bin]: 
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.

Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions 

Guess you like

Origin blog.csdn.net/lookboydfw/article/details/135383310