How to find last executed query on database and or schema.
hi,
how to find last executed query on database and or schema.
yours sincerely
Sessionwise if you wanna see means use v$session.. Because it will show execution time also so you can analyze it easily and get sql based on SID and serial number ..
Try :
select * from v$session;
Regards..
Similar Messages
-
How to find last executed query
Hello,
I want to find the last executed query in the Oracle database.
Can anybody help me, how can I find last fired query.
I am using following query for it, but it gives me the same query as in the result.
SELECT SQL_TEXT FROM V$SQL
WHERE ADDRESS = (SELECT SQL_ADDRESS
FROM V$SESSION
WHERE AUDSID = USERENV('SESSIONID'))
Please help me.Thanks.Hi,
select sa.sql_text,ss.username
from v$session ss, v$sqlarea sa
where sa.hash_value = ss.prev_hash_value
SQL> /
SQL_TEXT
USERNAME
DELETE FROM T
HR
GRANT SELECT ON T TO
HR
SELECT COUNT(*) FROM HR.T
SCOTT
SQL_TEXT
USERNAME
select sa.sql_text,ss.username from v$session ss, v$sqlarea sa where sa.hash_val
ue = ss.prev_hash_value
SYSregards
Taj
Message was edited by:
Mohammad Taj -
How to find java is installed in database and how to install it if its not there
HI,
I want to use sqlj in my work, but I m not sure that Aurora
JVM is installed in the database while creating it.
So how can I find abt it. if its not installed which packages
should I run to install it in the current database.Hi,
Dont know how to check if it is present but there should be a
script called initjvm to install the java stuff.
Roger. -
How to find the last execute query
Hi, Is there a way to find the last executed query of report?
Thanks
Aali
Edited by: aali on 22-Feb-2010 06:39Hi,
if you hold the necessary privileges, you might find the SQL in the shared pool:
select last_active_time, parse_calls, disk_reads, buffer_gets, cpu_time, end_of_fetch_count, executions, plsql_exec_time, sql_text
from V$SQLSTATS
where sql_text like '% some distinctive string %'
order by last_active_time desc;if you insert some meaningful string in form of comment inside the query itself, say /* report #1 on page 3 */
you may be able to track it down more easily.
select last_active_time, parse_calls, disk_reads, buffer_gets, cpu_time, end_of_fetch_count, executions, plsql_exec_time, sql_text
from V$SQLSTATS
where sql_text like '% report #1 on page 3 %'
order by last_active_time desc;Bye
Flavio
http://oraclequirks.blogspot.com -
How to find last accessed/updated tables and the query text?
I am using :
Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production
With the Partitioning option
JServer Release 8.1.7.4.0 - Production
How to find last accessed/updated tables and the query text?
Regards
LEE1212Check DBA_TBALES view there you find one date column that indicate last update
One option is as follows:
(1) Turn the auditing on: AUDIT_TRAIL = true in init.ora
(2) Restart the instance if its running.
(3) Audit the table:
AUDIT INSERT,SELECT,DELETE,UPDATE on TableName
by ACCESS WHENEVER SUCCESSFUL
(4) Get the desired information using :
SELECT OBJ_NAME,ACTION_NAME ,to_char(timestamp,'dd/mm/yyyy , HH:MM:SS')
from sys.dba_audit_object.
Cheer,
Virag Sharma
http://virag.sharma.googlepages.com/
http://viragsharma.blogspot.com/
Message was edited by:
virag_sh -
How to find top utilized query for last two months in oem
how to find top utilized query for last two months in oracle enterprise manager?
Can you mark the thread as Helpful and once marked the information can be reviewed by other customer for similar queries
Regards
Krishnan -
How to find, the growth of the database since last month?????
How to find the growth of the database since last month
my db name is orcl
There are multiple operations perfomed in my database.......I want to find,
how much my database is increased with the last month......
Thanks in advance.......Define what you mean by growth?
More datafiles
More tablespaces
More table rows
More objects
More operating system space used
In what version to four decimal places?
On what operating system? -
How to find the size of a database?
I'm not an oracle dba but a report developer. I'd like to find out the size of my database.
Is this possible using simple query?francislazaro wrote:
I'm not an oracle dba but a report developer. I'd like to find out the size of my database.
Is this possible using simple query?There are many threads related to the same topic,
http://forums.oracle.com/forums/search.jspa?threadID=&q=How+to+find+the+size+of+a+database&objID=f61&dateRange=all&userID=&numResults=15&rankBy=10001
HTH
Aman.... -
ADF: How to find out which query has taken what time?
Hi,
I have an ADF application which has many SQL queried running on each button click/page load, so how to find out which query is taking what amount of time? So that i can identify the long running queries and modify them to improve the application performance.
Thanks in advance.Hi,
As suggested by Timo,you need to start tracing on oracle.jbo package for getting the SQL queries.But I think the second option suggested by him would be better.You will have to override executeQueryForCollection method in VO Impl class .Pseudo code would be
@Override
Take start time
super.executeQueryForCollection
Take end time -
How to find out the query is accessing the DB tables or not
Hi Gurus ,
How to find out the query is accessing the DB tables or not.
Where exactly we will find this information in SAP BW.
I know that this information we can find in ST03. But where exactly we will find the query information along with DB information?Lakshmi
Activate BI Technical Content for Query analysis and run query against that.
Hope this helps
Thanks
sat -
How to find out Locks on the database objects
how to find out Locks on the database objects
The following notes should be helpful:
Note: 200590.1 - bde_session_locks.sql - Locks for given Session ID
https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=200590.1
Note: 1039273.6 - SCRIPT: VIEWING LOCKS ON OBJECTS HELD BY SPECIFIC USER
https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=1039273.6
You can also search Metalink, there are many notes/scripts published there which would be also helpful. -
How to find last DML operation in oracle ADF
how to find last DML operation in oracle ADF
Please help me
Thanks
DambyIn the base EntityIml class, just override doDML() method as I said.
(see http://docs.oracle.com/cd/E16162_01/web.1112/e16182/appendix_mostcommon.htm
"Methods for Creating Your Own Layer of Framework Base Classes")
So, put a some flag in the session.
You should not call doDML() method in backing bean, it will be called by framework.
In the backing bean, you only have to get that information from the session, as follows:
String last_dml_op = (String)ADFContext.getCurrent().getSessionScope().get("last_dml_op");And voila... -
How to find out sender query by using receiver query in RRI
Hi,
I have do some assignment settings .I know receiver query name ,but i don't know sender query name .
please suggest me how to find out sender query name .
is there any table /t-code ?
Thanks,
EDK.....Hello,
If the receiver query is web report, then goto table RSBBSQUERY and in RONAM field put the web report name.
You will get the sender query UID in the field ELTUID.
Now take this UID and goto table RSRREPDIR and put this UID in COMPUID and you will get the query name.
If the reciever query is bex query then get the UUID as above from RSRREPDIR by providin the tech name and then go to table RSBBSQUERY to get the UID of the sender query.
Regards
Shashank -
How to find last inserted record in the table.
Version: Oracle 10g
I have a table called "Manufacture" and 3 columns as mfno,itemname,quantity.
How to find last inserted record in the table "Manufacture".
As i come to know that Rowid is not result perfect results. Please provide your inputs.user13416294 wrote:
Version: Oracle 10gThat is not a version. That is a product name. A version is 10.1.0.2 or 10.2.0.4, etc.
I have a table called "Manufacture" and 3 columns as mfno,itemname,quantity.
How to find last inserted record in the table "Manufacture".Not possible as your data model does not cater for it. That simple.
If there is a need to determine some order or associate some time to an entity, then that should be part of the data model - and a relationship, or one or more attributes are needed to represent that information. Thus your data model in this case is unable to meet your requirements.
If the requirements are valid, fix the data model. In other words - your question has nothing to do with Oracle and nothing to do with rowid, rowscn or other pseudo columns in Oracle. It is a pure data modeling issue. Nothing more. -
Triggers : How to find if my query is triggering any Update or not?
hi all,
how to find if the query I am running is triggering any Update trigger?
Thanks,Hi,
but if fine grained auditing is implemented in the DB, (DBMS_FGA) then creation of Update Trigger on SELECTs is a possibility. Which Version are you using??
But how to check if any trigger is defined on all of the objects involved in the query?Using All_Triggers, User_Triggers.
Regards.
Maybe you are looking for
-
Exchange Server 2013 64bit with SP1 Standard - Readiness Checks/Prerequisite Analysis
I'm trying to install Exchange 2013 with SP1 on Windows Server 2012 R2 Standard, at the Readiness Checks setup, I get 25 errors. Before the Readiness Checks setup, I had selected 'Automatically install Windows Server roles and features that are requi
-
I can't remember my password to my itunes or app account or the security questions,
I can't remember my password to my itunes or app account or the security questions,
-
Basic terms in SAP Business workflow
What are the basic terms in SAP Business workflow and also I would like to know their meanings.Please help me out with this.
-
I'm unable to delete a folder on my OS X 10.6.8 iMac...
I have a folder on my startup drive that will not delete. I can issue the command "rm -rf dir_7171197" as root, and the prompt comes back with no errors, but the folder is still there. My question is, what are the reasons a file is not able to be de
-
Language install and Support Packages
We have installed some new languages in our system and are now re-applying the support packages as required. In SMLT when re-importing the support packages, a pop-up box with the option to 'Overwrite' or 'Do Not Overwrite' repaired texts comes up. W