Sriram Sanka – My Experiences with Databases & More

Oracle-MySQL-SQL SERVER-Python-Azure-AWS-Oracle Cloud-GCP etc

  • Enter your email address to follow this blog and receive notifications of new posts by email.

  • Total Views

    • 588,546 hits
  • $riram $anka


    The experiences, Test cases, views, and opinions etc expressed in this website are my own and does not reflect the views or opinions of my employer. This site is independent of and does not represent Oracle Corporation in any way. Oracle does not officially sponsor, approve, or endorse this site or its content.Product and company names mentioned in this website may be the trademarks of their respective owners.

Archive for January, 2018

Oracle Internals – Memory structures (arrays) – Part 1

Posted by Sriram Sanka on January 19, 2018


 

Dynamic Performance Views

Oracle contains a set of underlying views that are maintained by the database server and accessible to the database administrator user SYS. These views are called dynamic performance views because they are continuously updated while a database is open and in use, and their contents relate primarily to performance.

Although these views appear to be regular database tables, they are not. These views provide data on internal disk structures and memory structures. You can select from these views, but you can never update or alter them.

Screen Shot 2018-01-19 at 10.50.09 AM

https://docs.oracle.com/cd/B28359_01/server.111/b28320/dynviews_1001.htm#i1398692

There are two types of views,  

  • V$ Views
  • GV$ Views

Almost For Every V$ View there is a GV$View which will hold the instance specific Information in a Multi Instance Environment like RAC.

Screen Shot 2018-01-19 at 10.33.49 AM

These Dynamic Views are owned by Sys User and These views are constructed based on the Oracle Internal Memory Structures (X$ Tables/Views). We cannot alter or Update on these views. These X$ structure Get Created when the Instance started and Will get destroyed when you shutdown the DB.  

V$FIXED_VIEW

V$FIXED_TABLE displays all dynamic performance tables, views, and derived tables in the database.

V$FIXED_VIEW_DEFINITION

This  View contains the definitions of all the fixed views (views beginning with V$). Use this table with caution. Oracle tries to keep the behavior of fixed views the same from release to release, but the definitions of the fixed views can change without notice.

As described in the Above Example, Dynamic Performance views are based on Internal Memory Structures X$.

The X$ tables/views  are platform-specific & the No of tables are keep on increasing By Oracle Version.The Oracle kernel consists of layers. The X$ table names contain an abbreviation for the particular kernel layer.

The No#  Of Views are dependent on Oracle version and the OS Specific.

Screen Shot 2018-01-19 at 11.18.14 AM

Screen Shot 2018-01-19 at 10.24.17 AM

These Views Get populated only when the Instance Started. These Views Contains information about all the parameters,performance etc info. As We all know Oracle has documented some of Dynamic Views (V$_ objects) which are in handy to get the info from your instance these Dynamic Views are Based on GV$_ VIEWS which includes the data for Multiple Instances.  GV$ are Designed from these Fixed Views. View Columns might be similar from version to version where as Underlying Fixed X$ objects might different.

Screen Shot 2018-01-19 at 10.56.14 AM

Why do we call them “Fixed”?

As mentioned, All these Objects are owned by SYS and DDL or DML Operations are not permitted/supported on these. Even if we try to perform, Operation will end up with error ORA-02030: can only select from fixed tables/views.

Screen Shot 2018-01-19 at 10.50.09 AM

These objects contain information about the current configuration of the instance, information about the sessions connected to the instance, and a goldmine of performance information.  

Using Views like (g) v$fixed_view_definition  one can get the Actual Creation script of these Fixed views which are harmful in case of replacing the Existing or Create New views, which will end up with Errors or incorrect data as These Views are for Oracle not for Others. DBA/Developers should not create Objects using actual “V$_ “, they need to use v$ Objects instead of v$_ or X$, as The Definition of the base view may change in OS/DB software versions.   

The X$ views are completely undocumented, and Oracle does not provide any assistance for deriving the meaning of the contents of the X$ structures. since V$ views are dynamic and consistency is not guaranteed, Oracle does not support joins or sorts of dynamic views.  

The X$ views are an Oracle internal interface not exposed for customer use; customers should not be using it unless directed to do so by the support.Customer use without support guidance is unsupported.

Posted in Uncategorized | Leave a Comment »

 
Tales From A Lazy Fat DBA

Its all about Databases & their performance, troubleshooting & much more .... ¯\_(ツ)_/¯

Thinking Out Loud

Michael T. Dinh, Oracle DBA

Notes On Oracle

by Mehmet Eser

Oracle Diagnostician

Performance troubleshooting as exact science

deveshdba

get sum oracle stuffs

Data Warehousing with Oracle

Dani Schnider's Blog

ORASteps

Oracle DBA's Daily Work

DBAspaceblog.com

Welcome everyone!! The idea of this blog is to help the DBA in their daily tasks. Enjoy.

Anand's Data Stories

Learn. Share. Repeat.

Tanel Poder's blog: Core IT for geeks and pros

Oracle Performance Tuning, Troubleshooting, Internals

Yet Another OCM

Journey as an Oracle Certified Master

DBAtricksWorld.com

Sharing Knowledge is ultimate key to Gaining knowledge...

Neil Chandler's DB Blog

A resource for Database Professionals

DBA Kevlar

Tips, tricks, (and maybe a few rants) so more DBA's become bulletproof!

OraExpert Academy

Consulting and Training