In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly describes how to automatically start the database, the text is very detailed, has a certain reference value, interested friends must read!
Automatic restart, grid support required
Automatic management of resources
[oracle@edsir1p8-+ASM ~]$ crs_stat -tName Type Target State Host ------------------------------------------------------------ora.DATA.dg ora.... up.type ONLINE ONLINE edsir1p8 ora.asm ora.asm.type ONLINE ONLINE edsir1p8 ora.cssd ora.cssd.type ONLINE ONLINE edsir1p8 ora.diskmon ora.... on.type ONLINE ONLINE edsir1p8
There are usually 2 ways to automatically start a database
1.
[oracle@edsir1p8-+ASM ~]$ tail -3 /etc/oratabPROD4:/u01/app/oracle/product/11.2.0/db_1:NEMREP:/u01/app/oracle/product/11.2.0/db_1:N+ASM:/u01/app/oracle/product/11.2.0/grid:N--This method is usually not easy to use
2.crs_stat
This is a resource table that allows databases and monitors to register in this table.
[oracle@edsir1p8-+ASM ~]$ srvctl add database -d PROD4 -o /u01/app/oracle/product/11.2.0/db_1[oracle@edsir1p8-+ASM ~]$ srvctl config database --See which databases are registered
Close monitoring, register
[oracle@edsir1p8-+ASM ~]$ srvctl add listener -l listener -p 1521 -o /u01/app/oracle/product/11.2.0/db_1PRCN-2061 : Failed to add listener ora.LISTENER.lsnrPRCN-2065 : Port(s) 1521 are not available on the nodes givenPRCN-2035 : Port 1521 is not available on node(s) or virtual host(s): edsir1p8.us.oracle.com
- Turn off the monitor.
[oracle@edsir1p8-+ASM ~]$ lsnrctl stop[oracle@edsir1p8-+ASM ~]$ srvctl add listener -l listener -p 1521 -o /u01/app/oracle/product/11.2.0/db_1[oracle@edsir1p8-+ASM ~]$ srvctl config listener --Check if listening registration succeeds [oracle@edsir1p8-+ASM ~]$ crs_stat -tName Type Target State Host ------------------------------------------------------------ora.DATA.dg ora.... up.type ONLINE ONLINE edsir1p8 ora.... ER.lsnr ora.... er.type OFFLINE OFFLINE ora.asm ora.asm.type ONLINE ONLINE edsir1p8 ora.cssd ora.cssd.type ONLINE ONLINE edsir1p8 ora.diskmon ora.... on.type ONLINE ONLINE edsir1p8 ora.prod4.db ora.... se.type OFFLINE OFFLINE
=============================================================
--Restart the server and see the effect
oracle@edsir1p8- ~]$ ps -ef | grep smonoracle 5387 5106 0 09:25 pts/2 00:00:00 grep smon --No instance started [oracle@edsir1p8- ~]$ lsnrctl status-bash: lsnrctl: command not found --No Oracle environment variables [oracle@edsir1p8- ~]$ . oraenvORACLE_SID = [oracle] ? +ASMThe Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/grid is /u01/app/oracle[oracle@edsir1p8-+ASM ~]$ lsnrctl statusLSNRCTL for Linux: Version 11.2.0.1.0 - Production on 22-JUN-2017 09:25:58Copyright (c) 1991, 2009, Oracle. All rights reserved.Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))TNS-12541: TNS:no listener TNS-12560: TNS:protocol adapter error TNS-00511: No listener Linux Error: 111: Connection refused --Listen not started [oracle@edsir1p8-+ASM ~]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on Thu Jun 22 09:28:48 2017Copyright (c) 1982, 2009, Oracle. All rights reserved.Connected to an idle instance.SQL> quitDisconnected[oracle@edsir1p8-+ASM ~]$ srvctl start database -d PROD4PRCD-1027 : Failed to retrieve database PROD4PRCR-1070 : Failed to check if resource ora.prod4.db is registeredCannot communicate with crsd[oracle@edsir1p8-+ASM ~]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on Thu Jun 22 09:30:20 2017Copyright (c) 1982, 2009, Oracle. All rights reserved.Connected to an idle instance.SQL> startupORA-01078: failure in processing system parametersORA-29701: unable to connect to Cluster Synchronization ServiceSQL> quitDisconnected[oracle@edsir1p8-+ASM ~]$ crsctl start hasCRS-4123: Oracle High Availability Services has been started. [oracle@edsir1p8-+ASM ~]$ crs_stat -tName Type Target State Host ------------------------------------------------------------ora.DATA.dg ora.... up.type ONLINE OFFLINE ora.... ER.lsnr ora.... er.type ONLINE ONLINE edsir1p8 ora.asm ora.asm.type ONLINE OFFLINE ora.cssd ora.cssd.type ONLINE OFFLINE ora.diskmon ora.... on.type ONLINE ONLINE edsir1p8 ora.prod4.db ora.... se.type OFFLINE OFFLINE[oracle@edsir1p8-+ASM ~]$ crsctl enable hasCRS-4622: Oracle High Availability Services autostart is enabled.-- It must be bootstrapped. Only when it is bootstrapped can it be bootstrapped. The resources registered in it can be bootstrapped.
Restart the server and see the effect.
===========================================================
--Cluster management method opens database
[oracle@edsir1p8-+ASM ~]$ srvctl start database -d PROD4--do the opposite srvctl remove database -d PROD4 ---remove database srvctl remove listener -l listener ---If the registration error can be used to delete the above is "how to automatically start the database" all the content of this article, thank you for reading! Hope to share the content to help everyone, more relevant knowledge, welcome to pay attention to the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.