Oracle View object Information

Source: Internet
Author: User

1. View information for all objects under a user:

SELECT owner, object_type, status, COUNT (*where owner='xxx'  2
View Code

2. View the number of table rows (multiple tables) (the table must be analyzed first):

1 Select 'Analyze Table'|| table_name| |'compute statistics;'  fromUser_tables;2 3 SelectTable_name,num_rows fromDba_tableswhereOwner='webagent'ORDER BY1;4 5 SelectCOUNT (*) fromwithdrawal_org;
View Code

3. View the size of the table space:

SELECT T.tablespace_name, round (SUM (Bytes/(1024x768*0=
View Code

4. View the usage of the tablespace:

SELECT tablespace_name, SUM (bytes)/(1024x768
View Code
 - "  "" "= = C.tablespace_ Name
View Code

5. View the table space physical file name and size:

/(1024x768 *1024x7680) total_space from Dba_data_files ORDER by Tablespace_name;
View Code

6. Check the SQL that is being executed and the SQL that was executed:

A. Querying the SQL that is being executed

Select A.username, A.sid,b.sql_text, B.sql_fulltext    from  where a.sql_address = b.address;
View Code

B. Querying for SQL executed over a specified time

Select B.sql_text,b.first_load_time,b.sql_fulltext    from V$sqlarea b where ' 2009-10-15/09:24:47 ' and        ' 2009-10-15/09:24:47 '
View Code

7. Recycle Bin:

1 drop table T1 purge; 2 purge recyclebin;
View Code

8. Monitor Oracle's Wait events:

Select Event, SUM (Decode (wait_time,0,0,1))"Prev", SUM (Decode (wait_time,0,1,0))"Curr", COUNT (*)"Tot"   fromv$session_wait Group byEventOrder by4;
View Code

9. Object information in the statistics mode:

A. Viewing object information for the current schema

Select  from User_objects Group by Object_type;
View Code

View object information for the specified schema under B.sys user

Select  from where tablespace_name='tsp_webagent'  GROUP by Segment_type;
View Code

Oracle View object Information

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.