What is the LAST_ACTIVE_TIME column in the view v$ sql
HelloI use the Oracle 10.2.0.3 version.
I have a doubt in v$ sql.
What is the meaning of the LAST_ACTIVE_TIME column in the view v$ sql?
I assume that this is the last time when this SQL has been executed in the database. M I right?
According to the docs of Oracle, its definition is as below.
LAST ACTIVE_TIME - time in which the query plan was last active. _
Thanks in advance.
Best regards
oratest
Please also refer to the following link;
http://dbaspot.com/forums/Oracle-tools/5153-how-get-SQL-commands-executed-Oracle-database-certain-period.html
+"+
+ If you look at gv$ sql, you'll see a column named LAST_ACTIVE_TIME. +
+ Which will give you the last performed time. +
+--+
+ Daniel Morgan +.
+"+
Hope that helps.
Ogan
Tags: Database
Similar Questions
-
Create the view using SQL DEVELOPER
I'm new to this forum :)
11 GR 2, WIN2008 R2
SQL Developer Version 3.2.09
I am creating the data below view (view existing)
Table: Dovmarker
I try to describe the table and my goal :),MARKERBOREHOLE UWI MARKERSURFACE Z WELLXXX 65372643AAAA Cw -982,985619574516 WELLXXX 65372643AAAA Cn -1891,47401803955 WELLXXX 65372643AAAA J -674,989528816517 WELLXXX 65372643AAAA K3 20,00165000429 WELLXXX 65372643AAAA Tr 125,000317308153 WELLXXX 65372643AAAA K1 -658,989731894024 WELLXXX 65372643AAAA Q 149,999999999549 WELLYYY 56618334AAAA Jkm -715,071442105268 WELLYYY 56618334AAAA K3 36,9013966413975 WELLYYY 56618334AAAA J2 -976,056079257549 WELLYYY 56618334AAAA Tr 106,900507694299
each line describes wells, uwi(uniqe identifier), z (deppth), high (surface marker)
I try to merge all lines with the same MARKERBOREHOLE/UWI and MARKERSURFACE contact coresponding Z (ascending) as MARKERSURFACE = Z.
If it is posibble to reduce the number of decimals to 2.
My idea to solve the problem:
example: ' | ' is the delimiter
or better (not enough knowledge ;))WELLXXX Q=149,999999999549 | Tr=125,000317308153 | K3=20,00165000429 | K1=-658,989731894024 | J =-674,989528816517 | Cw=-982,985619574516 | Cn=-1891,47401803955 WELLYYY Tr=106,900507694299 | K3=36,9013966413975 | Jkm=-715,071442105268 | J2=-976,056079257549
Number of markersurface is different for each wellWELLXXX Q=149,999999999549 Tr=125,000317308153 K3=20,00165000429 K1=-658,989731894024 J =-674,989528816517 Cw=-982,985619574516 Cn=-1891,47401803955 WELLYYY Tr=106,900507694299 K3=36,9013966413975 Jkm=-715,071442105268 J2=-976,056079257549
I try to do it by the listagg function, but I have failled
result:select markerborehole, listagg(z, ' | ') within group (order by z) as new1 from dovmarker group by markerborehole;
When I tried to create new view in sql developer I occurred error;WELLZZZ -2575,95869465411 | -1891,47401803955 | -982,985619574516 | -674,989528816517 | -658,989731894024 | WELLRRR -2376,96975480605 | -2376,96975480605 | -2308,97180590009 | -2308,97180590009 | -2206,47428534641 | -2206,47428534641 | -2163,97522524171
Can you help me with this?Error(s) parsing SQL: unexpected token near *!* in the following: select markerborehole, listagg(z, ' | ') within *!*group (order by z) as new1 unexpected token near *!* in the following: select markerborehole, listagg(z, ' | ') within group *!*(order by z) as new1 missing expression near *!* in the following: select markerborehole, listagg(z, ' | ') within group (*!*order by z) as new1
Concerning
Jaroslaw961148 wrote:
I missed xWell Yes, my apologies, I has not changed all that.
It's a simple way to format the Z value to 2 decimal places?
Yes. It depends on if you want to use rounded, floor, ceiling, truncate or if you like a string always have 2 decimal places etc.
Make your choice and customize according to your needs...SQL> ed Wrote file afiedt.buf 1 with t as (select 'WELLXXX' as MARKERBOREHOLE, '65372643AAAA' as UWI, 'Cw' as MARKERSURFACE, -982.985619574516 as Z from dual union all 2 select 'WELLXXX', '65372643AAAA', 'Cn', -1891.47401803955 from dual union all 3 select 'WELLXXX', '65372643AAAA', 'J', -674.989528816517 from dual union all 4 select 'WELLXXX', '65372643AAAA', 'K3', 20.00165000429 from dual union all 5 select 'WELLXXX', '65372643AAAA', 'Tr', 125.000317308153 from dual union all 6 select 'WELLXXX', '65372643AAAA', 'K1', -658.989731894024 from dual union all 7 select 'WELLXXX', '65372643AAAA', 'Q', 149.999999999549 from dual union all 8 select 'WELLYYY', '56618334AAAA', 'Jkm', -715.071442105268 from dual union all 9 select 'WELLYYY', '56618334AAAA', 'K3', 36.9013966413975 from dual union all 10 select 'WELLYYY', '56618334AAAA', 'J2', -976.056079257549 from dual union all 11 select 'WELLYYY', '56618334AAAA', 'Tr', 106.900507694299 from dual) 12 -- 13 -- END OF TEST DATA - IGNORE ABOVE WITH CLAUSE 14 -- 15 select z 16 ,round(z,2) as round_z_2 17 ,floor(z*100)/100 as floor_z_2 18 ,ceil(z*100)/100 as ceil_z_2 19 ,trunc(z,2) as trunc_z_2 20 ,to_char(round(z,2),'fm9990.00') as string_z_2 21* from t SQL> / Z ROUND_Z_2 FLOOR_Z_2 CEIL_Z_2 TRUNC_Z_2 STRING_Z ------------------- ---------- ---------- ---------- ---------- -------- -982.9856195745160 -982.99 -982.99 -982.98 -982.98 -982.99 -1891.4740180395500 -1891.47 -1891.48 -1891.47 -1891.47 -1891.47 -674.9895288165170 -674.99 -674.99 -674.98 -674.98 -674.99 20.0016500042900 20 20 20.01 20 20.00 125.0003173081530 125 125 125.01 125 125.00 -658.9897318940240 -658.99 -658.99 -658.98 -658.98 -658.99 149.9999999995490 150 149.99 150 149.99 150.00 -715.0714421052680 -715.07 -715.08 -715.07 -715.07 -715.07 36.9013966413975 36.9 36.9 36.91 36.9 36.90 -976.0560792575490 -976.06 -976.06 -976.05 -976.05 -976.06 106.9005076942990 106.9 106.9 106.91 106.9 106.90 11 rows selected.
with above code I try to create a new view in SQL Developer, but I have error:
Error(s) parsing SQL: Unexpected token near *!* in the following: select markerborehole, listagg(z,chr(10)) within *!*group(order by rn) as z Unexpected token near *!* in the following: select markerborehole, listagg(z,chr(10)) within group*!*(order by rn) as z Missing expression near *!* in the following: select markerborehole, listagg(z,chr(10)) within group(*!*order by rn) as z
What are all the {noformat}! * * {noformat} in the code? Delete them.
Edit: or maybe your version of SQL Developer is not up-to-date and does not know the new LISTAGG function in 11g?
Published by: BluShadow on 26-Sep-2012 09:41
-
What is the version of SQL Server Express embedded used?
To the best of my knowledge, we are using vCenter Server 5.0 U1.
Build number is 623373 in help | Everything.
What is the version of the SQL Server Express included/embedded - 2008?
How to know and check?
I need to know specifically which version of SQL Server Express Management Studio install on our vCenter server so I can start to run maintenance such as backups that truncates logs, and also to allow for more storage Journal, we get the error 9002 with the journal storage.
Thank you, Tom
vCenter Server 5.0 uses Microsoft SQL Server 2008 R2 Express as the Group datasbase.
See for example http://kb.vmware.com/kb/2003790
André
-
How to say don't not to load the image up to what in the view... ?
I'm looking for info on how to tell a browser not not to load an image until it scrolls in the display window. More more sites do, and I thought it was a browser feature at first. But then noticed he did not do it for my own Web site.
He never has anything that I was sweating a lot, so I've never taken worth looking inside, but now the level of curiosity is high enough to ask here.
Thank you!
You can try the infinite scroliing mechanism - IE: load a page only when users scroll in it
Discover: orial http://www.responsivewebmobile.com/posts/view/2013/07/09/19/Responsive_Infinite_Scroll_Tur
-
Hi all
I expect advice about the best way to solve the following (without use of subqueries and decode etc.):
We have a person table that includes the nationality column... we want to identify the top 5 (County) nationalities and the remaining sum is considered to be "the other". We would then use this result to create a pie for the organization chart.
Thanks in advance for your time.
Kind regards
YahyaOr for example
SQL> select object_type, sum (cnt) cnt from (select case when rownum <= 5 then object_type else 'OTHER' end object_type, cnt from ( select count ( * ) cnt, object_type from all_objects group by object_type order by count ( * ) desc)) group by object_type order by 2 desc / OBJECT_TYPE CNT ------------------- ---------- SYNONYM 26932 JAVA CLASS 22203 OTHER 10357 VIEW 5064 INDEX 4826 TABLE 3232 6 rows selected.
Published by: michaels2 on July 1st, 2009 19:49
-
Need to know the definition of the view by SQL MORE
Hello
I have a VW_XXX vision, I want to know which table has created this view. But to do not only SQL PLUS any tool.
Please let me know how cani see full of reviews by SQLPLUS definitio.
Regs,
BrijYes, it will work for 9i and 10g. Just run the commands, and you will get the output.
These are not "dangerous orders!
Concerning
Girish SharmaPublished by: Girish Sharma on December 26, 2011 17:19
To resolve these issues Oracle9i introduced the DBMS_METADATA package which can be used to retrieve the object in the form of DDL or XML definitions. There are several ways to use the API, but I suspect that most of the people will use the following functions.
Source: http://www.oracle-base.com/articles/9i/MetadataAPI.php
Published by: Girish Sharma on December 26, 2011 17:36
And here's the link to the doc:
http://docs.Oracle.com/CD/A91202_01/901_doc/AppDev.901/a89852/d_meta11.htm#1024701 -
Hello
I have to build an application using LabWindows 2010 and SQL Toolkit 2.2. Is there any function or dll or api availble so that I do not want to link in the ODBC Control Panel.?
Concerning
Umer
-
Why identical child_number with many lines in the view v$ sql?
Here's the context:
Check the version number of the child cursor
SQL > select sql_id, version_count from v$ sqlarea where sql_id = "8bsppxkpc1dm1";
SQL_ID VERSION_COUNT
------------- -------------
8bsppxkpc1dm1 8
count the number of the child cursor
SQL > select count (distinct (child_number)) of v$ sql where sql_id = "8bsppxkpc1dm1";
COUNT (DISTINCT (CHILD_NUMBER))
-----------------------------
100
So here's surprise
SQL > select child_number, ADDRESS, executions, HASH_VALUE, buffer_gets, IS_BIND_SENSITIVE BS, IS_BIND_AWARE BA, IS_SHAREABLE SH, PLAN_HASH_VALUE from v$ sql where sql_id = '8bsppxkpc1dm1' and child_number = 1;
CHILD_NUMBER ADDRESS HASH_VALUE EXECUTIONS, BUFFER_GETS B B S PLAN_HASH_VALUE
------------ ---------------- ---------- ---------- ----------- - - - ---------------
1 000000193D1A9C98 2864756321 12 50 N N O 2488057010
1 000000193EC8F9D8 2864756321 12 50 N N O 2488057010
1 000000193F8606B8 2864756321 12 50 N N O 2488057010
1 000000193BDA63E0 2864756321 12 50 N N O 2488057010
1 000000193E447070 2864756321 12 50 N N O 2488057010
1 000000193C73E228 2864756321 12 50 N N O 2488057010
1 000000193CADFC88 2864756321 12 50 N N O 2488057010
1 000000193D 719248 2864756321 12 50 N N O 2488057010
1 000000193CB60EB8 2864756321 12 50 N N O 2488057010
1 000000193C987EA0 2864756321 12 50 N N O 2488057010
1 000000193CC92C70 2864756321 12 50 N N O 2488057010
1 000000193F041828 2864756321 12 50 N N O 2488057010
1 000000193B9CC3F0 2864756321 12 50 N N O 2488057010
1 000000193DB9A728 2864756321 12 50 N N O 2488057010
1 000000193DB86730 2864756321 12 50 N N O 2488057010
1 000000193C 760430 2864756321 12 50 N N O 2488057010
1 000000193C2B7870 2864756321 12 50 N N O 2488057010
1 000000193BEA0870 2864756321 12 50 N N O 2488057010
1 000000193F6E15F0 2864756321 12 50 N N O 2488057010
1 000000193B7B40A8 2864756321 12 50 N N O 2488057010
1 000000193E7CEAE8 2864756321 12 50 N N O 2488057010
1 000000193EE5E4B8 2864756321 12 50 N N O 2488057010
1 000000193EB2AB10 2864756321 12 50 N N O 2488057010
1 000000193B7E5278 2864756321 12 50 N N O 2488057010
1 000000193F453C80 2864756321 12 50 N N O 2488057010
1 000000193C06B740 2864756321 12 50 N N O 2488057010
1 000000193F2E61F0 2864756321 12 50 N N O 2488057010
1 000000193D940B58 2864756321 12 50 N N O 2488057010
1 000000193F951230 2864756321 12 50 N N O 2488057010
1 000000193BB57F90 2864756321 12 50 N N O 2488057010
1 000000193E0ACAA0 2864756321 12 50 N N O 2488057010
1 000000193D4EF468 2864756321 12 50 N N O 2488057010
1 000000193CFBADE8 2864756321 12 50 N N O 2488057010
1 000000193C525A20 2864756321 12 50 N N O 2488057010
1 000000193CDF3870 2864756321 12 50 N N O 2488057010
1 000000193CC8CC90 2864756321 12 50 N N O 2488057010
1 000000193E980F48 2864756321 12 50 N N O 2488057010
1 000000193DB0AE30 2864756321 12 50 N N O 2488057010
1 000000193C6AB5F8 2864756321 12 50 N N O 2488057010
1 000000193DC0F668 2864756321 12 50 N N O 2488057010
1 000000193C4E7670 2864756321 12 50 N N O 2488057010
1 000000193EB0CFF8 2864756321 12 50 N N O 2488057010
1 000000193F2A8040 2864756321 12 50 N N O 2488057010
1 000000193CCEC4B0 2864756321 12 50 N N O 2488057010
1 000000193D3CF560 2864756321 12 50 N N O 2488057010
1 000000193E26D378 2864756321 12 50 N N O 2488057010
1 000000193ED7CA08 2864756321 12 50 N N O 2488057010
1 000000193F816C18 2864756321 12 50 N N O 2488057010
1 000000193D8CA200 2864756321 12 50 N N O 2488057010
1 000000193D64D598 2864756321 12 50 N N O 2488057010
1 000000193B342A28 2864756321 12 50 N N O 2488057010
1 000000193D07A3C8 2864756321 12 50 N N O 2488057010
1 000000193C62C9B8 2864756321 12 50 N N O 2488057010
1 000000193EA33998 2864756321 12 50 N N O 2488057010
1 000000193EE6D1C8 2864756321 12 50 N N O 2488057010
1 000000193E6A64C0 2864756321 12 50 N N O 2488057010
1 000000193F8AF110 2864756321 12 50 N N O 2488057010
1 000000193D244CD0 2864756321 12 50 N N O 2488057010
1 000000193D7CB448 2864756321 12 50 N N O 2488057010
1 000000193D156D20 2864756321 12 50 N N O 2488057010
1 000000193D 432120 2864756321 12 50 N N O 2488057010
1 000000193D 649738 2864756321 12 50 N N O 2488057010
62 selected lines.
Why so many cursor of child with the same number of children?
Maybe you see a similar effect like the one mentioned by Timur Akhmadeev in his blog: http://timurakhmadeev.wordpress.com/2012/03/19/obsolete-cursors/.
-
What are the versions of SQL Server supported with Appvolumes 2.9?
According to the release notes: only SQL Server 2008 and SQL Server 2012 are supported: App Volumes 2.9 Release Notes
According to the user's Guide: SQL Server 2008 R2 SP1, SP1 of SQL Server 2012 and 2014 of SQL Server are supported: https://www.vmware.com/pdf/app-volumes-29-users-guide.pdf
My customer wants to switch to SQL Server 2014? Is this supported? Is this work?
Hello
Thank you for discovering the incompatibility.
Versions SQL mentioned in the release note is correct and the user's guide is incorrect. Server SQL 2014 is not yet supported.
-
How to find the views created on a table... ?
Hi all
I have a table name, EMP. I want to know what are the views created on this table. Is there any SQL query is there for this or any other
How to find.
Thanks in advance.
PALYou can use ALL_DEPENDENCIES to this:
SQL> create view emp_v as select * from emp; View created. SQL> select name 2 , referenced_name 3 , referenced_type 4 from all_dependencies 5 where name = 'EMP_V'; NAME REFERENCED_NAME REFERENCED_TYPE ------------------------------ ---------------------------------------------------------------- ---- EMP_V EMP TABLE 1 row selected. SQL> select name 2 , referenced_name 3 , referenced_type 4 from all_dependencies 5 where referenced_name = 'EMP'; NAME REFERENCED_NAME REFERENCED_TYPE ------------------------------ ---------------------------------------------------------------- ---- EMP_V EMP TABLE EMP_TRG EMP TABLE 2 rows selected. SQL>
Remember it's important if you limit the NAME or REFERENCED_NAME.
http://download.Oracle.com/docs/CD/B19306_01/server.102/b14237/statviews_1041.htm#sthref935Edit
Ah, Gave!
If you don't want to teach him something and become independent?Now you made me feel guilty ;) (don't know what that Johan position initially, but anyway...)
I blame my currently terribly slow connection for this...Anyway, OP, always start a quick search of the documentation first.
Chances are that you will find you your answer.
Houses:
http://www.Oracle.com/pls/db102/homepage
http://www.Oracle.com/pls/db112/homepagePublished by: hoek on 15 October 2010 14:53
-
What is the best way to change a column type in the materialized view?
Hello my dear friends,.
I want to change a column type in a materialized view. VARCHAR2 NUMBER, so what do you recommend? What is the best way to do it?
Thank you
You can not change the data type of the column while there are data in the MV, so you might as well give up and recreate the MV with a TO_CHAR() around the column in question in the application of MV to get the data exactly as you want (be sure to include an appropriate format mask). That said, I'm fighting to think reasonable grounds to make such a change.
-
What is the best way to view an interactive report with 20 columns
Hello
I have an interactive report, given the number of columns (about 20).
What is the best way to view this report... by default to scroll horizontally to see all the columns.
I want to avoid horizontal scrolling.
Thank you
DeepakHello Deepak,
You mean apart using a smaller font size or a larger screen?
You can think to combine / wrapping columns (so more data in a column).
Or hide some less important data and show only on request.Greetings,
Roel
http://roelhartman.blogspot.com/
You can reward this response in marking it as useful or Correct ;-) -
What is the title of the NOTE column in Windows Explorer?
What is the title of the NOTE column in Windows Explorer?
Am using Vista Home Premium, I understand that there are 6 models folder in Vista Type; photography and videos and music details templates have the column nominal position, (1) what is it for, (2) can I use it for photos of rates or documents, if so how?Hi 5466,
Thanks for your replies.
Vista has characteristics of property for files in folders that you might be able to carry out some sort of system that allows you to know your staff for the file that you place in the folder.
There isn't a download from Microsoft which has the attribute that you speak of to allow the classification of Word documents. Information online about this process does not specifically address the attribute you have written in to place the dimension on the record.
Here is a possible work around you
When you view them documents in the folder, they are placed, check Details of the menu view is marked.
Then in the file that is created, right click and select Properties, in the TAG field type a general comment as '5 stars' or one who would submit to you the rating desired - in this field of the Details tab of the properties as Judd had suggested in a previous post. You can use this field to record the files you have chosen personally.
Of course it's all a work around, but please let us know if this helps you.
Kind regards
Debbie
Microsoft Answers Support Engineer
Visit our Microsoft answers feedback Forum and let us know what you think. -
change the type of a column in a view column
Hi all
I have a visibility.
CREATE or REPLACE FORCE VIEW veh (wine,
last_nm,
first_nm,
city_nm,
model_yr,
veh_indctr
)
AS
SELECT vs.vin, p.last_nm, p.first_nm, p.city_nm, vs.model_yr,
(CASE
WHEN vs. TYPE IN ('TEST', 'RECYCLE')
THEN 'Y '.
ANOTHER "N".
Veh_indctr END)
VEHICLE vs, person p
WHERE vs.vin = p.vin;
Here veh_indctr is not any table, so I want to set the data type for this column.
Type column must be VARCHAR2 (1)
How can we do that... Please advise on this
Thanks in advance
Published by: user1692585 on April 15, 2013 06:19What is the current of this column data type when you create the view...
In any case, you could use CAST
cast ( CASE WHEN vs.TYPE IN ('TEST', 'RECYCLE') THEN 'Y' ELSE 'N' END as varchar2(1) ) veh_indctr
-
previous reference column in the definition of the view without has
Hello
is there a way to refer to a previous column in a view defined without to recalculate the value? In my opinion looks like this:
CREATE OR REPLACE FORCE VIEWS E3_STATISTIK_GESPRENDE_Z
(E3_ES_EINSATZ_ID
GESPRENDE_WEITERLEITEN
GESPRENDE_WEITERLEITEN_POS
) AS
SELECT G.E3_ES_EINSATZ_ID
((SELECT ELDISOWNER BEFORDERUNG. (E3_STATISTIK_WEITERLEITEN WHERE E3_ES_EINSATZ_ID = G.E3_ES_EINSATZ_ID)-G.GESPRAECHSENDE)
, (CASE GESPRENDE_WEITERLEITEN > 0 THEN GESPRENDE_WEITERLEITEN END to ANOTHER NULL)
OF 3_STATISTIK_GESPRAECHSENDE G
/
But it does not compile.
I have to make sure if the operation less produces a negative value or 0, it is processed as it would be NULL. But I don't want to double - select the value, so I thought that I could reference it in a later column definition-, but it gives compile error.
How 'remove' negative values without double select it in a CASE statement?
Thanks in advance for the help.
Kind regards
MonikaAliases do not work in parallel. What you need to do is put her select an alias in an internal query that you can then reference in an outer query
create or replace force view e3_statistik_gesprende_z as select e3_es_einsatz_id , gesprende_weiterleiten , (case gesprende_weiterleiten > 0 then gesprende_weiterleiten else null end) as gesprende_weiterleiten_pos from ( select g.e3_es_einsatz_id , ((select weiterleitung from eldisowner.e3_statistik_weiterleiten where e3_es_einsatz_id = g.e3_es_einsatz_id) - g.gespraechsende) as gesprende_weiterleiten from 3_statistik_gespraechsende g ) /
Warning: untested code, but at least the media are all in pairs!
Cheers, APC
Published by: APC on October 17, 2012 13:28
Hmmm, snap! blink of an eye! But as said the Groom, what we tell you three times is true.
Maybe you are looking for
-
Hi all Currently have my iTunes media stored on a drive connected by USB to an Airport Extreme. The disk regularly sleeps and is not connected by finder and iTunes regularly forget the iTunes media folder location. There is also the need to open the
-
How will I know if my mini ipod 4th generation is in charge? The blinking not solid.
How will I know if my Mini Ipod 4th generation is in charge. I plugged it in - the blinking not solid.
-
The upgrade of the power supply for HP Pavilion M7570N
The reason I'm on this forum is when I called hp support and gave me a stupid answer of not being able to change the PSU because of software... Well well, the reason why I'm spending power supply is because I bought a new video card and he needs abou
-
problems after downloading windows xp service pack 3
I recently downloaded service pack 3 on my advent T12. It seemed to download very well and when it restarts automatically he started very well too, but when I tried to restart it then the log on screen did not appear; It started to load as usual and
-
Don't get any sound on my external speakers. It tells me that I have "no audio device".