Go Back  IT Forums > Software > Oracle
User Name
Password
Reply
 
Thread Tools Search this Thread Display Modes

How to get SQL commands executed on Oracle database in certain period?
  #1
Old 10-05-2006, 03:47 AM
qazmlp
Junior Member


qazmlp is offline
qazmlp's Info
Join Date: Aug 2004
Posts: 10
Default How to get SQL commands executed on Oracle database in certain period?

Is it possible to get the SQL commands executed on a Oracle database
from a certain time?

We have a system connected with Server-1 and Server-2. Server-1 uses
Oracle RDBMS and Server-2 uses some other database for Data storage.
In regular intervals, the application running on the System should
fetch all the SQL commands executed on Server-1 from the last interval,
convert if required and then apply these changes on the Server-2. I
cannot use redo logs, as I have to apply the changes on a non-Oracle
database. For this reason, I would like to know how exactly I can get
the SQL commands executed on a Oracle database from a certain time(or
in certain time period).

Reply With Quote
How to get SQL commands executed on Oracle database in certainperiod?
  #2
Old 10-05-2006, 08:06 AM
DA Morgan
Junior Member


DA Morgan is offline
DA Morgan's Info
Join Date: May 2005
Posts: 474
Default How to get SQL commands executed on Oracle database in certainperiod?

qazmlp1209@rediffmail.com wrote:
Quote:
Is it possible to get the SQL commands executed on a Oracle database from a certain time? We have a system connected with Server-1 and Server-2. Server-1 uses Oracle RDBMS and Server-2 uses some other database for Data storage. In regular intervals, the application running on the System should fetch all the SQL commands executed on Server-1 from the last interval, convert if required and then apply these changes on the Server-2. I cannot use redo logs, as I have to apply the changes on a non-Oracle database. For this reason, I would like to know how exactly I can get the SQL commands executed on a Oracle database from a certain time(or in certain time period).


If you look at gv$sql you will see a column named LAST_ACTIVE_TIME.
That will give you the last time executed. The command, itself, can
be found in the SQL_FULLTEXT column.

As you didn't supply version or other related information this may,
or may not, work for you.
--
Daniel Morgan
Puget Sound Oracle Users Group
Reply With Quote
How to get SQL commands executed on Oracle database in certain period?
  #3
Old 10-06-2006, 02:59 AM
qazmlp
Junior Member


qazmlp is offline
qazmlp's Info
Join Date: Aug 2004
Posts: 10
Default How to get SQL commands executed on Oracle database in certain period?


DA Morgan wrote:
Quote:
If you look at gv$sql you will see a column named LAST_ACTIVE_TIME. That will give you the last time executed. The command, itself, can be found in the SQL_FULLTEXT column. As you didn't supply version or other related information this may, or may not, work for you.


Thanks, it helped!

I use the following Oracle version:
Oracle Database 10g Enterprise Edition Release 10.1.0.4.0 - 64bi

I used the following command to check the SQL commands executed in the
Oracle Database:
SQL> select SQL_FULLTEXT, LAST_LOAD_TIME from gv$sql where
LAST_LOAD_TIME is not null order by LAST_LOAD_TIME ASC;

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump



Powered by: vBulletin Version 3.0.7
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Style Design by vBStyles.com


Top Contact Us - IT Forums - Archive - MyLounge Top
MyLounge.com Site Map
Forum: Cars, Cell Phone, Database, Games, Home Improvement, IT, Music, School, Sports, Web Design, Web Server, Weight Loss

The MyLounge.com forum is intended for informational use only and should not be relied upon and is not a substitute for any advice. The information contained on MyLounge.com are opinions and suggestions of members and is not a representation of the opinions of MyLounge.com. MyLounge.com does not warrant or vouch for the accuracy, completeness or usefulness of any postings or the qualifications of any person responding. Please consult a expert or seek the services of an attorney in your area for more accuracy on your specific situation. Please note that our forums also serve as mirrors to Usenet newsgroups. Many posts you see on our forums are made by newsgroup users who may not be members of MyLounge.com Term of Service