Oracle DBA simple operation

Source: Internet
Author: User

 

-- SQL statements with many executions

Select SQL _text, executions from (

Select SQL _text, executions from v $ sqlarea order by executions desc

) Where rownum <81;

-- Read SQL statements with multiple hard disks

Select SQL _text, disk_reads from (

Select SQL _text, disk_reads from v $ sqlarea order by disk_reads desc

) Where rownum <21;

--. View All Users:

Select * from dba_users;

Select * from all_users;

Select * from user_users;

-- View system permissions of users or roles (system permissions assigned to users or roles ):

Select * from dba_sys_privs;

Select * from user_sys_privs;

 

-- View permissions of a role (only the roles owned by login users can be viewed)

Select * from role_sys_privs;

 

-- View user object permissions

Select * from dba_tab_privs;

Select * from all_tab_privs;

Select * from user_tab_privs;

 

-- View all roles

Select * from dba_roles;

 

-- View roles owned by a user or role

Select * from dba_role_privs;

Select * from user_role_privs;

 

-- View which users have sysdba or sysoper system permissions (the corresponding permissions are required for query)

Select * from V $ PWFILE_USERS

 

SELECT name, spare4 from sys. USER $ WHERE password is not null;

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.