概要
提示:这里可以添加技术概要
例如:
oracle在linux下重启,有多种方式可选择,正常需要关闭连接后在重启
重启流程
提示:这里可以添加技术整体架构
1.在linux下用su - oracle 才能进入命令执行窗口,如果是su oracle则不行。
2.执行查看数据库监听器的状况,snrctl statu
3.停止数据库监听器运行,lsnrctl stop
4.进入SQLPlus选择不同方式关闭数据库
5.启动,查看数据库监听器,lsnrctl start、lsnrctl status
6.启动Oracle数据库,sqlplus /nolog、conn /as sysdba、startup
执行过程
提示:这里可以添加技术细节
例如:
- 执行过程
-
[oracle@ServersA ~]$ lsnrctl start LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 26-DEC-2023 08:12:05 Copyright (c) 1991, 2009, Oracle. All rights reserved. TNS-01106: Listener using listener name LISTENER has already been started [oracle@ServersA ~]$ lsnrctl stop LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 26-DEC-2023 08:15:30 Copyright (c) 1991, 2009, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521))) The command completed successfully [oracle@ServersA ~]$ sqlplus /nolog SQL*Plus: Release 11.2.0.1.0 Production on Tue Dec 26 08:15:45 2023 Copyright (c) 1982, 2009, Oracle. All rights reserved. SQL> conn /as sysdba Connected. SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options [oracle@ServersA ~]$ lsnrctl start LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 26-DEC-2023 08:17:10 Copyright (c) 1991, 2009, Oracle. All rights reserved. Starting /data/oracle/product/11.2.0/db_1/bin/tnslsnr: please wait... TNSLSNR for Linux: Version 11.2.0.1.0 - Production System parameter file is /data/oracle/product/11.2.0/db_1/network/admin/listener.ora Log messages written to /data/oracle/diag/tnslsnr/ServersA/listener/alert/log.xml Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ServersA)(PORT=1521))) Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production Start Date 26-DEC-2023 08:17:10 Uptime 0 days 0 hr. 0 min. 0 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /data/oracle/product/11.2.0/db_1/network/admin/listener.ora Listener Log File /data/oracle/diag/tnslsnr/ServersA/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ServersA)(PORT=1521))) The listener supports no services The command completed successfully [oracle@ServersA ~]$ lsnrctl status LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 26-DEC-2023 08:17:19 Copyright (c) 1991, 2009, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production Start Date 26-DEC-2023 08:17:10 Uptime 0 days 0 hr. 0 min. 8 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /data/oracle/product/11.2.0/db_1/network/admin/listener.ora Listener Log File /data/oracle/diag/tnslsnr/ServersA/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ServersA)(PORT=1521))) The listener supports no services The command completed successfully [oracle@ServersA ~]$ sqlplus /nolog SQL*Plus: Release 11.2.0.1.0 Production on Tue Dec 26 08:17:30 2023 Copyright (c) 1982, 2009, Oracle. All rights reserved. SQL> conn /as sysdba Connected to an idle instance. SQL> startup ORACLE instance started. Total System Global Area 734892032 bytes Fixed Size 2216984 bytes Variable Size 562039784 bytes Database Buffers 163577856 bytes Redo Buffers 7057408 bytes Database mounted. Database opened. SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options [oracle@ServersA ~]$
Oracle不同关闭方式的区别
-
小结
提示:这里可以添加总结
例如:
提供先进的推理,复杂的指令,更多的创造力。