Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools
 

Topic: SQL*Plus and PL/SQL >> How to find the sql statements running in the DB is DDL or DML statement ?

Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property. You may review the entire Oracle Certification Program Candidate Agreement online Here.



  


 Title: How to find the sql statements running in the DB is DDL or DML statement ?
 KS  Posted: Jun 05, 2007 12:22:36 PM

 Total Post: 65
 Joined: Nov, 2006






 Hi,

My requirement is to find who are all executing the DDL or DML commands in the DB.So kindly tell me how can I find whether the statement running currently is DDL or DML?


Thanks in advance.

- Srini

 Nand
Posted: Jun 11, 2007 04:36:41 AM  

 Total Post: 22
 Joined: Jun, 2007






 
You can query v$sqltext and v$sql_plan joining on sql_id. v$sql_plan has operation, object_owner, obkect_name column. While the v$sqltext has sql_text column. Give your criteria and get the output.

Nand

 KS
Posted: Jun 14, 2007 11:26:41 AM  

 Total Post: 65
 Joined: Nov, 2006






 
Thanks for your reply.

I got it by joining the V$SQL and AUDIT_ACTIONS table.
The V$SQL table has a column named COMMAND_TYPE ,which we can join with AUDIT_ACTIONS table to get the desired output.

Thanks,
Sri.

 Time Zone: EDT

  




Forum Rules & Description


Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user




 








Get FREE Magazines

Top 10 Forum User

  Murtuja Khokhar857
  Mohammed Taj746
  positive fanatic483
  Jayanta Sur479
  Vigyan Kaushik386
  Gopu Gopi327
  Gitesh Trivedi322
  Vinoth Kumar264
  neeraj sharma258
  Ramesh Jois246






oracle Mag



  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor
Confio Software