1.简单SQL

  1. 确定数据库正常启动

    1.查看数据库状态

    SYS@orcl> select status from v$instance;

     

    STATUS

    ------------

    OPEN

    2.查看监听状态

  2. [oracle@yzjora11g:/home/oracle]$ lsnrctl -s status
  3. LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 20-JUL-2021 18:08:54
  4. Copyright (c) 1991, 2013, Oracle. All rights reserved.
  5. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=yzjora11g)(PORT=1521)))
  6. STATUS of the LISTENER
  7. ------------------------
  8. Alias LISTENER
  9. Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
  10. Start Date 20-JUL-2021 17:25:06
  11. Uptime 0 days 0 hr. 43 min. 48 sec
  12. Trace Level off
  13. Security ON: Local OS Authentication
  14. SNMP OFF
  15. Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
  16. Listener Log File /u01/app/oracle/diag/tnslsnr/yzjora11g/listener/alert/log.xml
  17. Listening Endpoints Summary...
  18. (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=yzjora11g)(PORT=1521)))
  19. (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  20. Services Summary...
  21. Service "orcl" has 2 instance(s).
  22. Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...
  23. Instance "orcl", status READY, has 1 handler(s) for this service...
  24. Service "orclXDB" has 1 instance(s).
  25. Instance "orcl", status READY, has 1 handler(s) for this service...
  26. 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

    1. [oracle@yzjora11g:/home/oracle]$ lsnrctl -s status
    2.  
    3. LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 20-JUL-2021 18:08:54
    4.  
    5. Copyright (c) 1991, 2013, Oracle. All rights reserved.
    6.  
    7. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=yzjora11g)(PORT=1521)))
    8. STATUS of the LISTENER
    9. ------------------------
    10. Alias LISTENER
    11. Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
    12. Start Date 20-JUL-2021 17:25:06
    13. Uptime 0 days 0 hr. 43 min. 48 sec
    14. Trace Level off
    15. Security ON: Local OS Authentication
    16. SNMP OFF
    17. Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
    18. Listener Log File /u01/app/oracle/diag/tnslsnr/yzjora11g/listener/alert/log.xml
    19. Listening Endpoints Summary...
    20.   (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=yzjora11g)(PORT=1521)))
    21.   (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
    22. Services Summary...
    23. Service "orcl" has 2 instance(s).
    24.   Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...
    25.   Instance "orcl", status READY, has 1 handler(s) for this service...
    26. Service "orclXDB" has 1 instance(s).
    27.   Instance "orcl", status READY, has 1 handler(s) for this service...
    28. The command completed successfully

1.简单SQL

上一篇:C++ 静态数据成员使用


下一篇:【转】C++容器类