Oracle PL/SQL/System Tables Views/V instance
Содержание
select Active_State from V$INSTANCE
SQL>
SQL>
SQL> select Active_State from V$INSTANCE;
ACTIVE_ST
---------
NORMAL
SQL>
SQL>
SQL>
SQL>
select Database_Status from V$INSTANCE
SQL> select Database_Status from V$INSTANCE;
DATABASE_STATUS
-----------------
ACTIVE
v$instance.instance_name
SQL>
SQL>
SQL> select c.value || "/" || d.instance_name ||
2 "_ora_" || a.spid || ".trc" trace
3 from v$process a, v$session b, v$parameter c, v$instance d
4 where a.addr = b.paddr
5 and b.audsid = userenv("sessionid")
6 and c.name = "user_dump_dest"
7 /
TRACE
--------------------------------------------------------------------------------
C:\ORACLEXE\APP\ORACLE\ADMIN\XE\UDUMP/xe_ora_264.trc
SQL>
SQL>
SQL>
V$INSTANCE view provides one row of statistics for each Oracle instance running against the database
SQL> select instance_name, host_name, version,
2 startup_time, round(sysdate-startup_time) "Days Up",
3 status from v$instance;
INSTANCE_NAME
----------------
HOST_NAME
----------------------------------------------------------------
VERSION STARTUP_T Days Up STATUS
----------------- --------- ---------- ------------
xe
UBC-1
10.2.0.1.0 26-OCT-09 0 OPEN
SQL>