-
确定数据库正常启动
1.查看数据库状态
SYS@orcl> select status from v$instance;
STATUS
------------
OPEN
2.查看监听状态
- [oracle@yzjora11g:/home/oracle]$ lsnrctl -s status
- LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 20-JUL-2021 18:08:54
- Copyright (c) 1991, 2013, Oracle. All rights reserved.
- Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=yzjora11g)(PORT=1521)))
- STATUS of the LISTENER
- ------------------------
- Alias LISTENER
- Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
- Start Date 20-JUL-2021 17:25:06
- Uptime 0 days 0 hr. 43 min. 48 sec
- Trace Level off
- Security ON: Local OS Authentication
- SNMP OFF
- Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
- Listener Log File /u01/app/oracle/diag/tnslsnr/yzjora11g/listener/alert/log.xml
- Listening Endpoints Summary...
- (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=yzjora11g)(PORT=1521)))
- (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
- Services Summary...
- Service "orcl" has 2 instance(s).
- Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...
- Instance "orcl", status READY, has 1 handler(s) for this service...
- Service "orclXDB" has 1 instance(s).
- Instance "orcl", status READY, has 1 handler(s) for this service...
-
The command completed successfully确定数据库实例名
[oracle@yzjora11g:/home/oracle]$ ps -ef | grep ora_ | head -2 | cut -d ‘_‘ -f3 | uniq
Orcl
[oracle@yzjora11g:/home/oracle]$ sqlplus -s / as sysdba
select instance_name from v$instance;
INSTANCE_NAME
----------------
orcl
- [oracle@yzjora11g:/home/oracle]$ lsnrctl -s status
- LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 20-JUL-2021 18:08:54
- Copyright (c) 1991, 2013, Oracle. All rights reserved.
- Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=yzjora11g)(PORT=1521)))
- STATUS of the LISTENER
- ------------------------
- Alias LISTENER
- Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
- Start Date 20-JUL-2021 17:25:06
- Uptime 0 days 0 hr. 43 min. 48 sec
- Trace Level off
- Security ON: Local OS Authentication
- SNMP OFF
- Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
- Listener Log File /u01/app/oracle/diag/tnslsnr/yzjora11g/listener/alert/log.xml
- Listening Endpoints Summary...
- (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=yzjora11g)(PORT=1521)))
- (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
- Services Summary...
- Service "orcl" has 2 instance(s).
- Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...
- Instance "orcl", status READY, has 1 handler(s) for this service...
- Service "orclXDB" has 1 instance(s).
- Instance "orcl", status READY, has 1 handler(s) for this service...
- The command completed successfully
相关文章
- 12-31SQL在数据处理过程中,遇到除数为0该怎么办?
- 12-31SQL语句将两个select语句查询结果合并一个
- 12-31.NET Core Session的简单使用
- 12-31从"UDF不应有状态" 切入来剖析Flink SQL代码生成
- 12-31CefSharp的简单应用,制作自动学习视频软件(基于Chromium)
- 12-31高德地图简单使用
- 12-31json格式化与cefsharp简单使用
- 12-31JS代码简单一段即可破解QQ空间删除说说
- 12-31SQL 无法解决 EQUAL TO 运算中 "CHINESE_PRC_CI_AS" 和 "CHINESE_PRC_90_CI_AI" 之间的排序规则冲突
- 12-31sql中,In和where的区别