Can you find out how many times a database has been restarted since its creation?
Well, the answer is YES!
Oracle has this view dba_hist_database_instance for getting these details:
Well, the answer is YES!
Oracle has this view dba_hist_database_instance for getting these details:
DBA_HIST_DATABASE_INSTANCE
DBA_HIST_DATABASE_INSTANCE
displays the databases and instances in the Workload Repository.Column | Datatype | NULL | Description |
---|---|---|---|
DBID | NUMBER | NOT NULL | Database ID |
INSTANCE_NUMBER | NUMBER | NOT NULL | Instance number |
STARTUP_TIME | TIMESTAMP(3) | NOT NULL | Startup time of the instance |
PARALLEL | VARCHAR2(3) | NOT NULL | Indicates whether the instance is running in an Oracle Real Application Clusters (Oracle RAC) environment (YES ) or not (NO ) |
VERSION | VARCHAR2(17) | NOT NULL | Database version |
DB_NAME | VARCHAR2(9) | Name of the database | |
INSTANCE_NAME | VARCHAR2(16) | Name of the instance | |
HOST_NAME | VARCHAR2(64) | Name of the host | |
LAST_ASH_SAMPLE_ID | NUMBER | NOT NULL | Last sample ID for the active session history |
SELECT STARTUP_TIME FROM dba_hist_database_instance ORDER BY startup_time DESC;
Hope this was helpful, have an Oracle day!
No comments:
Post a Comment