Query the views v$database and v$thread.

    V$DATABASE gives DB_NAME
    V$THREAD gives ORACLE_SID

If ORACLE_SID = DB_SID and db_name = DBNAME:

To find the current value of ORACLE_SID:

    SVRMGR> select instance from v$thread;

    INSTANCE
    ----------------
    DB_SID

To find the current value of DB_NAME:

    SVRMGR> select name from v$database;

    NAME
    ---------
    DBNAME

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-04
  • 2022-02-26
  • 2021-09-17
  • 2021-07-22
  • 2021-08-28
  • 2021-08-11
猜你喜欢
  • 2021-05-04
  • 2022-12-23
  • 2022-12-23
  • 2021-10-27
  • 2022-12-23
  • 2021-07-01
  • 2021-09-13
相关资源
相似解决方案