Oracle alarm logs, dynamic performance views, and data dictionaries

Source: Internet
Author: User

1. Check the alarm log

/u01/app/oracle/diag/rdbms/orcl/orcl/trace/alert_orcl.log


Real-time logs: Tail-f/u01/app/oracle/diag/rdbms/orcl/orcl/trace/alert_orcl.log


Trace File ADR


2. Dynamic performance view (v$) saved in memory

Information used to access the changing state of the instance memory structure (control file + instance)

Session data

Wait events

Memory Allocations

Running SQL

Undo Usage

Open cursors

Redo Log Usage

....


Different moments can be viewed differently in the dynamic performance view:

Startup Nomount Stage:

Select status from V$instance;

Select Paddr,port from V$session;



Startup Mount Stage:

Select Open_mode from V$database;

Select name from V$datafile;

Select member from V$logfile;

Select addr from V$lock;

Select Paddr,port from V$session;

SELECT * from V$SGA;

Select COUNT (*) from V$sql;



Startup phase:

SELECT * from V$PGA;

Select COUNT (*) from v$fixed_table where name like ' v$% ';//view how many tables the dynamic performance view has




3. Data dictionary exists in table

Table indexes views users schemals procedures ...

Dba_: Access to all objects

All_: All objects that the user has permission to view

User_: User-owned objects



Select COUNT (*) from Dba_tables;

Select COUNT (*) from All_tables;


Example:::

Alter user Scott account unlock identified by Tiger;


Sql> Conn Scott/tiger;

Connected.

Sql> select * from tab;


Tname tabtypeClusterid

------------------------------ ------- ----------

BONUS TABLE

DEPT TABLE

EMP TABLE

Salgrade TABLE


See what tables Scott users can see, how many tables are in total

Sql> Select COUNT (*) from All_tables;


COUNT (*)

----------

103


Sql> Select COUNT (*) from User_tables;


COUNT (*)

----------

4

See which tables Scott users have:

Sql> Select table_name from User_tables;


table_name

------------------------------

DEPT

Emp

BONUS

Salgrade


########

View All Users

Select Username,account_status from Dba_users;


See what data dictionary tables are available

Select table_name from dictionary;




This article is from the "Liang blog" blog, make sure to keep this source http://7038006.blog.51cto.com/7028006/1925191

Oracle alarm logs, dynamic performance views, and data dictionaries

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.