Last active
August 29, 2015 14:02
-
-
Save mujahidk/226195b85be7690b2c43 to your computer and use it in GitHub Desktop.
Oracle day2day db information queries
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- db version and other information | |
SELECT * FROM V$VERSION; | |
SELECT * FROM PRODUCT_COMPONENT_VERSION; | |
SELECT SYS_CONTEXT('USERENV','SERVICE_NAME') FROM DUAL; | |
SELECT * FROM GLOBAL_NAME; | |
-- database instance, host name, version, status, startup time etc. | |
SELECT * FROM V$INSTANCE; | |
SELECT * FROM V$PARAMETER; | |
SELECT * FROM V$SESSION; | |
-- get the list of sql statements executed & executing*. | |
SELECT * FROM V$SQL ORDER BY LAST_LOAD_TIME DESC; | |
-- Database time zone and system date | |
SELECT DBTIMEZONE, SYSDATE FROM DUAL; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment