Various Data DIctionary VIews

After posting something here a few days back about the myriad views needing to be digested for the Fund.I Exam, I have just gleaned this lot from the Couchman book. No doubt some of the pros out there may well correct me, but this is simple what I have collected from the book, in the last 3 hours. Cheers.
Dictionary Views
Data Dictionary
Which users are in the database password file:
V$PWFILE_USERS
Where values set in the init.ora file can be viewed – all parameters:
V$PARAMETER
Script used to create the objects that comprise the data dictionary:
catalog.sql
To grant a special role to users so they can look at DBA views:
SELECT_CATALOG_ROLE
Information about all database objects in the database:
DBA_OBJECTS
Information about all tables in the database:
DBA_TABLES
Information about all indexes in the database:
DBA_INDEXES
Information about all views (including dictionary views) in the database:
DBA_VIEWS
Information about all sequences in the database:
DBA_SEQUENCES
Information about all users in the database:
DBA_USERS
Information about all constraints in the database:
DBA_CONSTRAINTS
Information about all table columns that have constraints on them:
DBA_CONS_COLUMNS
Information about all columns that have indexes on them in the database:
DBA_IND_COLUMNS
Information about all columns in all the tables in the database:
DBA_TAB_COLUMNS
Information about all the roles in the database:
DBA_ROLES
Information about all object privileges in the database:
DBA_TAB_PRIVS
Information about all system privileges granted to all users in the database:
DBA_SYS_PRIVS
Displays all PL/SQL source code in the database:
DBA_SOURCE
Information about all triggers in the database:
DBA_TRIGGERS
Information about object privileges granted to roles
ROLE_TAB_PRIVS
Information about system privileges granted to roles
ROLE_SYS_PRIVS
Information about roles granted to roles
ROLE_ROLE_PRIVS
Information about all tablespaces in the database:
DBA_TABLESPACES
Information about all profiles in the database:
DBA_PROFILES
For all parameters?
V$PARAMETER
General information about the database mounted to your instance:
V$DATABASE
Most information about the performance of the database is kept here:
V$SYSSTAT
Most information about the performance for individual user sessions is stored here:
V$SESSION , V$SESSTAT
Information about online redo logs (2)
V$LOG, V$LOGFILE
Information about datafiles
V$DATAFILE
Basic information about control files, and the two columns it has:
V$CONTROLFILE. STATUS / NAME
An object you can query to obtain a listing of all data dictionary objects (4)
CATALOG, CAT, DICTIONARY, DICT.
When the control file was created, Sequence Number, most recent SCN:
V$DATABASE
Information stored in different sections of the control file, Sequence Number:
V$CONTROLFILE_RECORD_SECTION
To see the names and locations of all control files in the db? (2)
V$PARAMETER. V$CONTROLFILE
Tablespace and Datafiles
Temporary Segments:
Name, tablespace location, and owner of temporary segments:
DBA_SEGMENTS
Size of temporary tablespaces, current number of extents allocated to sort segments, and sort segment high-water mark information. Space usage allocation for temporary segments:
V$SORT_SEGMENT
Types of sorts that are happening currently on the database
V$SORT_USAGE
To see the username corresponding with the session:
V$SESSION
Information about every datafile in the database associated with a temporary tablespace:
DBA_TEMP_FILES
Similar to DBA_TEMP_FILES, this performance view gives Information about every datafile in the database associated with a temporary tablespace:
V$TEMPFILE
Storage Structures
A summary view, contains all types of segments and their storage parameters, space utilization settings:
DBA_SEGMENTS
Tablespace quotas assigned to users:
DBA_TS_QUOTAS
Segment name, type, owner, total bytes of extent, name of tablespace storing the extent:
DBA_EXTENTS
The location and amount of free space by tablespace name:
DBA_FREE_SPACE
The location of free space in the tablespace that has been coalesced:
DBA_FREE_SPACE_COALESCED
Information about datafiles for every tablespace
DBA_DATAFILES
Performance view for information for datafiles for every tablespace
V$DATAFILE
To see the total amount of space allocated to a table?
DBA_EXTENTS
Table creation timestamp, information about the object ID:
DBA_OBJECTS
High water mark, all storage settings for a table, and statistics collected as part of the analyze (for row migration) operation on that table
DBA_TABLES
Information about every column in every table:
DBA_TAB_COLUMNS
To determine how many columns are marked unused for later removal?
DBA_UNUSED_COL_TABS
To find the number of deleted index entries ?
INDEX_STATS
To determine the columns on a table that have been indexed:
DBA_ID_COLUMNS
The dynamic view to show whether the index is being used in a meaningful way?
V$OBJECT_USAGE
To see whether a constraint exists on a particular column?
DBA_CONS_COLUMNS
To see the constraints associated with a particular table:
DBA_CONSTRAINTS
To find the username, ID number, (encrypted) password, default and temporary tablespace information, user profile of a user, password expiry date:
DBA_USERS
To all objects, which objects belong to which users, how many objects a user has created?
DBA_OBJECTS
Resource-usage parameters for a particular profile:
DBA_PROFILES
Identifies all resources in the database and their corresponding cost:
RESOURCE_COST
Identifies system resource limits for individual users:
USER_RESOURCE_LIMITS
Shows all system privileges:
DBA_SYS_PRIVS
Show all object privileges:
DBA_TAB_PRIVS
Shows all privileges in this session available to you as the current user:
SESSION_PRIVS
Views for audits currently taking place are created by this script:
cataudit.sql
a list of audit entries generated by the exists option of the audit command:
DBA_AUDIT_EXISTS
A list of audit entries generated for object audits:
DBA_AUDIT_OBJECT
A list of audit entries generated by session connects and disconnects:
DBA_AUDIT_SESSION
A list of audit entries generated by statement options of the audit command:
DBA_AUDIT_STATEMENT
A list of all entries in the AUD$ table collected by the audit command:
DBA_AUDIT_TRAIL
To determine the roles available in the database, the names of all the roles on the database and if a password is required to use each role:
DBA_ROLES
Names of all users and the roles granted to them:
DBA_ROLE_PRIVS
All the roles and the roles that are granted to them:
ROLE_ROLE_PRIVS
Which system privileges have been granted to a role:
DBA_SYS_PRIVS
All the system privileges granted only to roles:
ROLE_SYS_PRIVS
All the object privileges granted only to roles:
ROLE_TAB_PRIVS
All the roles available in the current session:
SESSION_ROLES
Which object privilege has been granted to a role:
DBA_TAB_PRIVS
To display the value of the NLS_CHARACTERSET parameter:
NLS_DATABASE_PARAMETERS
DA

You can also find a lot of stuff by doing:
SELECT *
FROM dictionary;

Similar Messages

  • Can we determine path of my INIT.ORA file from data dictionary views.

    Hello Guru’s
    I am new to oracle, My question is for the sake of my knowledge: I work on oracle 10G.
    Is there any data dictionary view from where I can get the path of my INIT.ORA file.
    Regards,

    NewDay wrote:
    Hello Guru’s
    I am new to oracle, My question is for the sake of my knowledge: I work on oracle 10G.
    Is there any data dictionary view from where I can get the path of my INIT.ORA file.
    AFAIK , its no. You can check the path from the show parameter command like following,
    SQL> show parameter spfile
    NAME                                 TYPE
    VALUE
    spfile                               string
    /u01/app/oracle/product/10.2.0
    /db_1/dbs/spfileorcl.ora
    SQL>HTH
    Aman....

  • In which Data Dictionary View I can find ...

    Hello,
    I will do a Overview over all of our Full Backups.
    I am searching in the Data Dictionary Views but I colud not found the right information.
    I could find a nice overview over the last redo log archive etc but no overview over the full backups?!
    In which view I can find these informtaion?
    Thanks in advance!

    Check Summary of RMAN Recovery Catalog Views for the data dictionary views for RMAN.

  • Result_cache and data dictionary views

    Hi,
    Are there any special considerations when caching the results of a function which uses data dictionary views to determine it's results?
    This question has popped because I have a such a result_cached function for which the result_cache objects are not getting invalidated even when the underlying data dictionary views have changed and the function gives 'stale' values in it's output. Adding the relies_on clause has not helped either.
    Here is what I am trying to do:
    The function accepts table name as its input and tries to determine all the child tables using the sys.dba_constraints view. The results are returned in a pl/sql table and are cached so that the subsequent calls to this function use the result_cache.
    Everything works fine for the parent/child tables which have been created before the creation of this function. All the results are correct.
    The problem starts when a new child table is added to an existing parent table.
    The v$result_cache_objects view shows the result of this function as 'Published' and the output of the function does not show the newly created child table.
    Same is the case when an existing child table is deleted; the function continues to return it in the output as it is pulled from the result_cache.
    Oracle version:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE 11.2.0.1.0 Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production

    >
    Restrictions on Result-Cached Functions*
    To be result-cached, a function must meet all of these criteria:
    * It is not defined in a module that has invoker's rights or in an anonymous block.
    * It is not a pipelined table function.
    * It does not reference dictionary tables, temporary tables, sequences, or nondeterministic SQL functions.
    For more information, see Oracle Database Performance Tuning Guide.
    * It has no OUT or IN OUT parameters.
    * No IN parameter has one of these types:
    o BLOB
    o CLOB
    o NCLOB
    o REF CURSOR
    o Collection
    o Object
    o Record
    * The return type is none of these:
    o BLOB
    o CLOB
    o NCLOB
    o REF CURSOR
    o Object
    o Record or PL/SQL collection that contains an unsupported return type
    It is recommended that a result-cached function also meet these criteria:
    * It has no side effects.
    For information about side effects, see "Subprogram Side Effects".
    * It does not depend on session-specific settings.
    For more information, see "Making Result-Cached Functions Handle Session-Specific Settings".
    * It does not depend on session-specific application contexts.
    >
    http://download.oracle.com/docs/cd/E11882_01/appdev.112/e17126/subprograms.htm#LNPLS698

  • Reporting on Data Dictionary Views

    We are in the process of documenting our database, and it seems like there should be an easy way of doing so, given all the information provided in the data dictionary views. I haven't used Oracle Reports yet, and I was wondering if it will create reports based on these tables/views. I tried Crystal, and it does not see these views. I assume I could write a SQL statement with formatting to create a text report, but I would rather use the Reports tool. Will this work? Is there another tool/better way to document the relationships, constraints, etc., etc., of the database?

    Oracle Designer - This is the best tool to use for your requirements. impact analysis reports, db design, reverse engineering and uml modelling etc... all in one tool.
    Regards
    Simon.

  • Data dictionary views

    Hi,
    What are the the views in the data dictionary that store the user packages (spec, body, function list and parameters etc) ?
    TIA.
    Stephan

    You could always DESCRIBE (or DESC) the package, function, or procedure to get the overview
    SQL> desc pkg_test
    PROCEDURE READ_FILE
    PROCEDURE WRITE_FILE
    Argument Name                  Type                    In/Out Default?
    P_PKG                          VARCHAR2                IN

  • Data Dictionary View for Procedure Text

    Hi,
    Is there a data-dictionary where I can see the body of procedures. In fact, I received a request from a collegue to give him the procedure name which access a table "table_1".
    So, my idea is to write a query as follows:
    SELECT <procedure_name> FROM <data_dictionary> WHERE <text> LIKE '%table_1%'.
    Thanks in advance.

    You can try with DBA_SOURCE or USER_SOURCE.
    i.e.
    SELECT NAME FROM DBA_SOURCE
    WHERE OWNER='<OWNER NAME>'
    AND TYPE='PROCEDURE'
    AND TEXT LIKE '%table_1%';
    Regards,
    Sabdar Syed.

  • Can not select from data dictionary view from a procedure

    Hi,
    I wonder, which privilege is missing here:
    my schema has this roles and privs:
    GRANT CONNECT, RESOURCE TO cb ;
    GRANT CREATE SESSION TO cb ;
    GRANT SELECT_CATALOG_ROLE TO cb ;
    GRANT CREATE SYNONYM TO CB;
    GRANT CREATE VIEW TO CB;
    I create a procedure:
    create or replace procedure dd_test as
    begin
         dbms_output.enable(2000000);
         for r in (select table_name from sys.dba_tab_partitions     where owner = 'CB') loop
                   dbms_output.put_line(r.table_name);
         end loop;
    end;
    sho err
    4/38 PL/SQL: ORA-00942: table or view does not exist
    When I run the core statement form sql prompt, it works !
    so what privilege is missing here ???
    thanks for any hint, Lao De

    Hi,
    thanks for that reply, after doing that I can not select this DD-view from sql-prompt anymore (which I don't wonder ;-). Can you tell me, what idea you had behind that test ?
    I found another instance, where the procedure works and I will compare those privileges, but it's hard to sort out that complex structure of nested roles and sys_privs.
    How ever, I will update here, when I found the missing privilege.
    regards LaoDe

  • Query to obtain tables in SH schema using data-dictionary views/tables.

    Hi,
    I have just installed Oracle 10g Database. Logged on to SQL Plus by scott (changed the password as prompted).
    I want to see the tables in SH schema (which comes by default with Oracle 10g database).
    The problem, I am facing is:
    I can see the schema name: SH in the result of the below query:
    SELECT * FROM ALL_USERS
    but, nothing is returned in the result of the below query:
    SQL> SELECT OWNER FROM ALL_TABLES WHERE OWNER='SH';
    Result: no rows selected.
    Why is this happening?
    What will be the correct query to obtain tables present in SH schema ?
    Thanks in Advance & Regards,
    Deeba

    conn /as sysdba
    SQL> select table_name from dba_tables where owner='SH';
    I think the user SCOTT have no privilege to see SH schema tables through all_tables view.
    Thanks

  • Data Dictionary.. Help Please

    I have to create this query for my college course. I need help. I have half of the query, I think. Need another join clause in the from statement for the views, not sure what to do. Any help will be appreciated! Thank you!
    Create and execute a single query of the Oracle data dictionary to display all foreign key constraints in the HR schema. Note that foreign key constraints are constraint type 'R'. For each constraint list the constraint type, constraint name, the referencing table name, the referencing column position(s), the referencing column name(s), the referenced constraint name (i.e. the other table's primary key constraint name), the referenced table, and the referenced column(s). Sort your results by constraint name, table_name, and position.
    HINTS: You will need two different data dictionary views for this query. One of the views will need to be mentioned twice in the FROM clause, and therefore you will need two different aliases. With this arrangement you will also need two join conditions.
    This is what i have so far...
    SELECT uc.constraint_type, uc.constraint_name, uc.table_name, r_constraint_name,
    ucc.table_name, ucc.position, ucc.column_name, ucc.constraint_name
    FROM user_constraints uc JOIN user_cons_columns ucc
    ON uc.table_name= ucc.table_name
    AND uc.constraint_name= ucc.constraint_name
    WHERE constraint_type= 'R'
    AND r_constraint_name IN
    (SELECT constraint_name
    FROM all_constraints
    WHERE constraint_type
    IN ('P','U')
    AND table_name= 'hr')
    ORDER BY uc.constraint_name, ucc.table_name,ucc.position;

    Ok, you have the correct two dictionary views (assuming you are logged in as HR), now you need to figure out which one is needed twice. As a hint, you have the required join columns for the doubled dictionary view in the single use dictionary view.
    A couple of comments on the code you have posted so far.
    The predicate:
    r_constraint_name IN (SELECT constraint_name
                          FROM all_constraints
                          WHERE constraint_type IN ('P','U') AND
                                table_name= 'hr')is unnecessary since by definition, if the constraint type is R, then the r_constraint_column will point to a P (primary key) or U (unique key) constraint.
    By default, all objects in Oracle are stored in the dictionary views in upper case, so when you query a value you need to use upper case for the literal.
    Again, assuming that you are logged in as HR, then the user_xxx views will only show objects that belong to the HR schema, so there is no need to qualify anything with an owner.
    When you are posting code on this site type {noformat}{noformat} before and after your code sample, this will preserve the formatting of your code so it will be more readable.  If you want to see an example of this, click reply to this post and then click the quote button in the reply pane and you will see how I kept the formatting in the snippet above.
    John                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to see tablespace size in data dictionary

    How can I see the tablespace size, and used tablespace size in data dictionary view?
    it is not in dba_tablespaces, and v$tablespace
    Thanks.

    I like this little piece of code of mine:
    SQL> SELECT
      2          TABLESPACE_NAME,
      3          RPAD(RPAD('|',100-PCT_FREE,'X'),100) || '|' USED
      4  FROM (SELECT TABLESPACE_NAME,
      5    100 -
      6      ROUND(100 -(SUM(BYTES)/1024/1024/1024)*100/
      7                  (SELECT SUM(BYTES)/1024/1024/1024
      8                   FROM DBA_DATA_FILES DF
      9                   WHERE DF.TABLESPACE_NAME=FS.TABLESPACE_NAME),2
    10            ) PCT_FREE,
    11    ROUND(SUM(BYTES)/1024/1024/1024,2) GIBFREE
    12  FROM DBA_FREE_SPACE FS
    13  GROUP BY TABLESPACE_NAME) TABLESPACE_SPACE
    14* ORDER BY TABLESPACE_NAME;
    TABLESPACE_NAME                USED
    ARCHDATA                       |XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX      |
    DATBIGGX                       |XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX                  |
    DATGX                          |XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX                                                      |
    DATLOWGX                       |XXXXXXXXXXXXXXXXXXXXXX                                                                             |
    IDXBIGGX                       |XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX                 |
    IDXLGX                         |XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX                |
    IDXGX                          |XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX          |
    LOGMNRTS                       |XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX                                           |
    SYSTEM                         |XXXXXXXXXXXXXXXX                                                                                   |
    TOOLS                          |XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX                                                   |
    UNDOGX                         |XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX                                         |Yoann.

  • Role for system data dictionary read-only access

    [NOTE: this is for 9i]
    What grants must a role have to have read-only access to
    the system data dictionary tables (e.g.: ALL_SOURCE,
    ALL_OBJECTS, ...)?
    Or, is there somewhere in the docs that talks about this
    kind of role?
    Thanks in advance,
    Robert

    Well, the answer to your explicit question would be that it would need SELECT on each of the data dictionary views that do not have SELECT granted to PUBLIC. To find out what those are, you could do:
    SELECT table_name, privilege
    FROM dba_tab_privs
    WHERE grantee = 'SELECT_CATALOG_ROLE'however, it would probably be easier just to grant it SELECT_CATALOG_ROLE :-)
    John

  • Table or view does not exist - Data Dictionary Import Wizard(Data Modeler)

    Hi All,
    In Data Modeler, Data Dictionary Import Wizard, I'm able to connect to database.But while going to the second stage (Select Schema/Database), I'm getting an error "ORA-00942: table or view does not exist".
    I am able to select the table with select * from all_tables and I can open many tables as well.
    Could anyone tell me, whether I'm missing any privilege, that causing this error.
    Thanks in advance for you support.
    Thanks.

    Hi,
    Thanks for your response, sorry for my late reply as I was away from my place.
    Yes, it is showing "Connection established successfully".
    log file as below-
    2012-08-02 10:37:26,471 [main] INFO ApplicationView - Oracle SQL Developer Data Modeler 3.1.1.703
    2012-08-02 10:39:42,889 [AWT-EventQueue-0] ERROR AbstractDBMExtractionWizardImpl - java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist
    Pls see oracle version details-
    Oracle Database 11g Enterprise Edition
    11.1.0.6.0
    64bit Production
    Thanks again and waiting for reply.

  • Difference between data dictionary and data base

    Hi,
    Please give me clear view on data dictionary and data base.
    Thanks
    margani

    Hi Margini,
    Please check the forms u can find the lot of answers
    Here is a link
    http://www.sapdb.info/abap-data-dictionary/
    What is a data dictionary?
    Data Dictionary is a central source of data in a data management system.  Its main function is to support the creation and management of data definitions.  It has details about
    ·            what data is contained?
    ·            What are the attributes of the data?
    ·            What is the relationship existing between the various data elements?
    Best regards,
    raam

  • H2 devide implicit and explicit created indexes by dictionary views?

    For migrating amounts of data it is useful to drop and recreate indexes and referencing constaints. A implicit created index by defining a primary/unique key constraint will be dropped implicitly by dropping the before mentioned constraint. Creating such a constraint after creating an equivalent index with the constraint name will result in an other behaviour. The explicit created index will not be dropped by dropping the referencing primary/unique key constraint.
    So far so good and well known. The question is: Which dictionary view columns will show me the difference between implicit and explict created indexes if I try to dynamically drop and recreate indexes and unique / primary key constraints?

    Oracle Version is always helpful in answering questions, but for 9i you can find the system generated by:
    dba_indexes.generated = 'Y'
    or
    'SYS_' naming convention for system generated indexes
    or
    dba_constraints.constraint_name = dba_constraints.index_name
    Hope this helps - JTommaney

Maybe you are looking for

  • SALE ORDER PRICING

    Hi gurus,               I  was created one sale order.While i want to give the Taxes mandatory.ie vat -4% 12.5%etc... and cst percentage give  to mandatory. is it possible? Regards, T.Murugu

  • Is there an App to Manually, Fully Pin-Lock Screen?

    I always carry my phone in my pocket and the default drag-to-unlock screen isn't cutting it (answering calls in my pocket, unlocking itself). However, I don't want to always have to enter a pin to unlock my phone, only when I'm going to be biking wit

  • Error 500--Internal Server Error in OBIEE 11g?

    Hi Expert, I am using Obiee 11.1.1.7.0  without patch and mozilla firefox 37.0.2 When i am trying to open http:machinename:9704/analytics, I am getting error like below Error 500--Internal Server Error From RFC 2068 Hypertext Transfer Protocol -- HTT

  • How can I back up a Macbook Pro with Bootcamp

    Ok, so I have a 13" Macbook Pro (non-Retina) that's about 5 months old. There's loose wiring in the display, causing strange symptoms with my screen. There also seems to be something stuck in the fan, as it rattles around really loudly from inside th

  • Planned depreciation not distributed in each month

    Hello, I noticed that for some assets, in AW01N the amount of planned depreciation is not distributed for each month. For example: The Planned Depreciation for 2011 is 250000. And the system shows for period 1 (january) 250000 and for all the other p