View SQL statement history performed by Oracle users

Source: Internet
Author: User

SELECT * FROM V$sqlarea t ORDER by t.last_active_time DESC

Note: Some related statements, such as executing this statement, must have DBA authority although this statement is common but useful when needed to detect a person executing a SQL statement in a timely manner

-------Oracle View the SQL that has been executed these are the---------that exist in the shared pool >
SELECT * FROM V$sqlarea t ORDER by t.last_active_time DESC

-----------View Oracle Session----------------------------

SELECT * FROM V$session t ORDER by t.last_active_time DESC

-------------View permissions roles for Oracle------------------------------>
SELECT * from Dba_role_privs; Roles granted to users and other roles
SELECT * from Dba_sys_privs; Granting system permissions to users and other roles
SELECT * from Dba_tab_privs; All authorizations for objects in the database
SELECT * from User_role_privs; View the role of the current user

View SQL statement history performed by Oracle users

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.