Common Oracle DBA Statement 1

Source: Internet
Author: User
1. Check the table space name and size. Select T. tablespace_name, round (sum (Bytes/(1024*1024), 0) ts_sizefrom dba_tablespaces T, dba_data_files dwhere T. tablespace_name = D. tablespace_namegroup by T. tablespace_name; 2. view the names and sizes of physical tablespace files select tablespace_name, file_id, file_name, round (Bytes/(1024*1024), 0) total_spacefrom dba_data_filesorder by tablespace_name; 3. Check the rollback segment name and size. Select segment_name, tablespace_name, R. status, (initial_ext Ent/1024) initialextent, (next_extent/1024) nextextent, max_extents, V. curext curextentfrom dba_rollback_segs R, V $ rollstat vwhere R. segment_id = v. USN (+) order by segment_name; 4. view the control file select name from V $ controlfile; 5. view the log file select Member from V $ logfile; select * from V $ logfile; 6. View table space usage select sum (bytes)/(1024*1024) as free_space, tablespace_namefrom dba_free_spacegroup by tablespace_name; '7. view the select owner, object_type, status, count (*) Count # From all_objects group by owner, object_type, status; 8. view the database version select version from product_component_versionwhere substr (product,) = 'oracle '; 9. view the database creation date and archiving method select created, log_mode, log_mode from V $ database; 10. Capture SQL column username format a12column opname format a16column progress format A8 select username, Sid, opname, round (SOFAR * 100/totalwork, 0) | '%' as progress, time_remaining, SQL _textfrom v $ session_longops, V $ sqlwhere time_remaining <> 0and SQL _address = Addressand SQL _hash_value = hash_value

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.