Sunday, June 21, 2020

Database Monitoring

Database Monitoring 


Database and Instance Last start time:

SELECT to_char(startup_time,'DD-MON-YYYY HH24:MI:SS') "DB Startup Time"
FROM   sys.v_$instance;
SELECT SYSDATE-logon_time "Days", (SYSDATE-logon_time)*24 "Hours"
from  sys.v_$session where  sid=1;

Track Database Version:

SELECT * from v$version;

Track Database Name and ID information:

select dbid, name from v$database;

Track Database Global Name information:

select * from global_name;

Track Database Instance name:

SELECT INSTANCE_NAME FROM V$INSTANCE;‎

Track Database Host Details:

SELECT UTL_INADDR.GET_HOST_ADDRESS, UTL_INADDR.GET_HOST_NAME FROM DUAL;

Display information about database services:

select name,  network_name from  dba_services order by name;

Track Database Present Status:

SELECT created, RESETLOGS_TIME, Log_mode FROM V$DATABASE;

DB Character Set Information:

select * from nls_database_parameters;

Track Database default information:

select username, profile, default_tablespace, temporary_tablespace from dba_users;

No comments:

Post a Comment