RE: How to find the last execution time of a Procedure.
Thanks John and everyone for their suggestions. Best Regards, Prasad John Kanagaraj [EMAIL PROTECTED]To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED] ds.com cc: Sent by: Subject: RE: How to find the last execution time of a Procedure. [EMAIL PROTECTED] .com 01/23/2004 06:59 PM Please respond to ORACLE-L Raj, I am no X$ expert either, but X$KGLOB is exposed to us lowly DBAs as V$DB_OBJECT_CACHE and KGLHDEXC is actually the EXECUTIONS column. Prasada, you can check V$DB_OBJECT_CACHE for TYPE in ('PACKAGE','PACKAGE BODY') and KEPT = 'NO' and keep pinning these using DBMS_POOL.KEEP via a scheduled job. After a while, all those used packages will not only become KEPT (and provide some side benefit of reducing reloads), you will not have to store them back into the database... The KEPT = NO will avoid having to revisit/manipulate those objects that were previously pinned. Of course, this assumes that there is adeqauet Shared pool space and the Db is not restarted in-between :) YMMV! John Kanagaraj DB Soft Inc Phone: 408-970-7002 (W) Grace - Getting something we do NOT deserve Mercy - NOT getting something we DO deserve Click on 'http://www.needhim.org' for Grace and Mercy that is freely available! ** The opinions and facts contained in this message are entirely mine and do not reflect those of my employer or customers ** -Original Message- From: Jamadagni, Rajendra [mailto:[EMAIL PROTECTED] Sent: Thursday, January 22, 2004 11:00 AM To: Multiple recipients of list ORACLE-L Subject: RE: How to find the last execution time of a Procedure. But you better check with experts as my knowledge of x$ is feather-weight ... also there is a column on x$kglob called kglhdexc ... to me it seems the execution count (I feel like Mr. Monk already). so if execution count is 0 then you can say that it actually got executed. But if this doesn't work, in the next CTOUG meeting, I'll try to hide away from you. YMMV Raj --- - Rajendra dot Jamadagni at nospamespn dot com All Views expressed in this email are strictly personal. QOTD: Any clod can have facts, having an opinion is an art ! -Original Message- [mailto:[EMAIL PROTECTED] Sent: Thursday, January 22, 2004 1:24 PM To: Multiple recipients of list ORACLE-L Thanks for input Raj. I was also thinking on the same lines (Querying v$views periodically and store it in some metadata table) if there is no easier way to figure out from DBA_ views. As far as changing the production code, as you know, It has to go thru the dev/test databases first and then go thru the release process to implement into the production. It is painful process. I will use x$kglob instead of changing production code and all that release stuff. Thanks for your help, Raj. Best Regards, Prasad 860 843 8377 *** *** This e-mail message is confidential, intended only for the named recipient(s) above and may contain information that is privileged, attorney work product or exempt from disclosure under applicable law. If you have received this
RE: How to find the last execution time of a Procedure.
Not sure if that is what you want... and not sure if this will really work, just a quick thought... Invalidate the procedure, so next time it will be used, it will be recompiled, and then you can see at LAST_DDL_TIME in ALL_OBJECTS to find out when it was used first after invalidating. Regards Naveen -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, January 23, 2004 1:54 AM To: Multiple recipients of list ORACLE-L Subject: RE: How to find the last execution time of a Procedure. Thanks Raj. I have confidence on you and hope we will meet in next CTOUG meeting. Best Regards, Prasad 860 843 8377 Jamadagni, Rajendra To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED] Rajendra.Jamadagncc: [EMAIL PROTECTED] Subject: RE: How to find the last execution time of a Procedure. Sent by: [EMAIL PROTECTED] com 01/22/2004 01:59 PM Please respond to ORACLE-L But you better check with experts as my knowledge of x$ is feather-weight .. also there is a column on x$kglob called kglhdexc ... to me it seems the execution count (I feel like Mr. Monk already). so if execution count is 0 then you can say that it actually got executed. But if this doesn't work, in the next CTOUG meeting, I'll try to hide away from you. YMMV Raj -- -- Rajendra dot Jamadagni at nospamespn dot com All Views expressed in this email are strictly personal. QOTD: Any clod can have facts, having an opinion is an art ! -Original Message- [mailto:[EMAIL PROTECTED] Sent: Thursday, January 22, 2004 1:24 PM To: Multiple recipients of list ORACLE-L Thanks for input Raj. I was also thinking on the same lines (Querying v$views periodically and store it in some metadata table) if there is no easier way to figure out from DBA_ views. As far as changing the production code, as you know, It has to go thru the dev/test databases first and then go thru the release process to implement into the production. It is painful process. I will use x$kglob instead of changing production code and all that release stuff. Thanks for your help, Raj. Best Regards, Prasad 860 843 8377 ** This e-mail message is confidential, intended only for the named recipient(s) above and may contain information that is privileged, attorney work product or exempt from disclosure under applicable law. If you have received this message in error, or are not the named recipient(s), please immediately notify corporate MIS at (860) 766-2000 and delete this e-mail message from your computer, Thank you. ** 4 -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Jamadagni, Rajendra INET:
RE: How to find the last execution time of a Procedure.
We for one don't like ANYTHING invalid in production database ... either it is valid or it gets dropped. Raj -Original Message- Sent: Friday, January 23, 2004 2:24 AM To: Multiple recipients of list ORACLE-L Not sure if that is what you want... and not sure if this will really work, just a quick thought... Invalidate the procedure, so next time it will be used, it will be recompiled, and then you can see at LAST_DDL_TIME in ALL_OBJECTS to find out when it was used first after invalidating. Regards Naveen ** This e-mail message is confidential, intended only for the named recipient(s) above and may contain information that is privileged, attorney work product or exempt from disclosure under applicable law. If you have received this message in error, or are not the named recipient(s), please immediately notify corporate MIS at (860) 766-2000 and delete this e-mail message from your computer, Thank you. **4 -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Jamadagni, Rajendra INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
RE: How to find the last execution time of a Procedure.
Thanks for your input, Naveen. But, It is hard to do that since everything is under Production Support Team control. Best Regards, Prasad Naveen, Nahata (IE10) To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED] [EMAIL PROTECTED]cc: eywell.com Subject: RE: How to find the last execution time of a Procedure. Sent by: [EMAIL PROTECTED] com 01/23/2004 02:24 AM Please respond to ORACLE-L Not sure if that is what you want... and not sure if this will really work, just a quick thought... Invalidate the procedure, so next time it will be used, it will be recompiled, and then you can see at LAST_DDL_TIME in ALL_OBJECTS to find out when it was used first after invalidating. Regards Naveen -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, January 23, 2004 1:54 AM To: Multiple recipients of list ORACLE-L Subject: RE: How to find the last execution time of a Procedure. Thanks Raj. I have confidence on you and hope we will meet in next CTOUG meeting. Best Regards, Prasad 860 843 8377 Jamadagni, Rajendra To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED] Rajendra.Jamadagncc: [EMAIL PROTECTED] Subject: RE: How to find the last execution time of a Procedure. Sent by: [EMAIL PROTECTED] com 01/22/2004 01:59 PM Please respond to ORACLE-L But you better check with experts as my knowledge of x$ is feather-weight .. also there is a column on x$kglob called kglhdexc ... to me it seems the execution count (I feel like Mr. Monk already). so if execution count is 0 then you can say that it actually got executed. But if this doesn't work, in the next CTOUG meeting, I'll try to hide away from you. YMMV Raj -- -- Rajendra dot Jamadagni at nospamespn dot com All Views expressed in this email are strictly personal. QOTD: Any clod can have facts, having an opinion is an art ! -Original Message- [mailto:[EMAIL PROTECTED] Sent: Thursday, January 22, 2004 1:24 PM To: Multiple recipients of list ORACLE-L Thanks for input Raj. I was also thinking on the same lines (Querying v$views periodically and store it in some metadata table) if there is no easier way to figure out from DBA_ views. As far as changing the production code, as you know, It has to go thru the dev/test databases first and then go thru the release process to implement into the production. It is painful process. I will use x$kglob instead of changing production code and all that release stuff. Thanks for your help, Raj. Best Regards, Prasad 860 843 8377 **
RE: How to find the last execution time of a Procedure.
Raj, I am no X$ expert either, but X$KGLOB is exposed to us lowly DBAs as V$DB_OBJECT_CACHE and KGLHDEXC is actually the EXECUTIONS column. Prasada, you can check V$DB_OBJECT_CACHE for TYPE in ('PACKAGE','PACKAGE BODY') and KEPT = 'NO' and keep pinning these using DBMS_POOL.KEEP via a scheduled job. After a while, all those used packages will not only become KEPT (and provide some side benefit of reducing reloads), you will not have to store them back into the database... The KEPT = NO will avoid having to revisit/manipulate those objects that were previously pinned. Of course, this assumes that there is adeqauet Shared pool space and the Db is not restarted in-between :) YMMV! John Kanagaraj DB Soft Inc Phone: 408-970-7002 (W) Grace - Getting something we do NOT deserve Mercy - NOT getting something we DO deserve Click on 'http://www.needhim.org' for Grace and Mercy that is freely available! ** The opinions and facts contained in this message are entirely mine and do not reflect those of my employer or customers ** -Original Message- From: Jamadagni, Rajendra [mailto:[EMAIL PROTECTED] Sent: Thursday, January 22, 2004 11:00 AM To: Multiple recipients of list ORACLE-L Subject: RE: How to find the last execution time of a Procedure. But you better check with experts as my knowledge of x$ is feather-weight ... also there is a column on x$kglob called kglhdexc ... to me it seems the execution count (I feel like Mr. Monk already). so if execution count is 0 then you can say that it actually got executed. But if this doesn't work, in the next CTOUG meeting, I'll try to hide away from you. YMMV Raj --- - Rajendra dot Jamadagni at nospamespn dot com All Views expressed in this email are strictly personal. QOTD: Any clod can have facts, having an opinion is an art ! -Original Message- [mailto:[EMAIL PROTECTED] Sent: Thursday, January 22, 2004 1:24 PM To: Multiple recipients of list ORACLE-L Thanks for input Raj. I was also thinking on the same lines (Querying v$views periodically and store it in some metadata table) if there is no easier way to figure out from DBA_ views. As far as changing the production code, as you know, It has to go thru the dev/test databases first and then go thru the release process to implement into the production. It is painful process. I will use x$kglob instead of changing production code and all that release stuff. Thanks for your help, Raj. Best Regards, Prasad 860 843 8377 *** *** This e-mail message is confidential, intended only for the named recipient(s) above and may contain information that is privileged, attorney work product or exempt from disclosure under applicable law. If you have received this message in error, or are not the named recipient(s), please immediately notify corporate MIS at (860) 766-2000 and delete this e-mail message from your computer, Thank you. *** ***4 -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Jamadagni, Rajendra INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: John Kanagaraj INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
RE: How to find the last execution time of a Procedure.
Life is much easier, just use audit execute on proc name No need for the x$tables :) Regards, Waleed -Original Message- [mailto:[EMAIL PROTECTED] Sent: Thursday, January 22, 2004 11:19 AM To: Multiple recipients of list ORACLE-L Hi All, Is there anyway to find out from data dictionary views when was a database procedure/function last executed. Would like know the solution for 8i and 9i databases. We have some older code in the databases and do not know if any application is using it or not. I appreciate your help. Thanks Best Regards, Prasad * PRIVILEGED AND CONFIDENTIAL: This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies. * -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Khedr, Waleed INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
RE: How to find the last execution time of a Procedure.
not easily, but you could probably scan through x$kglob (frequently) and see if the name exists ... if it is, it means it was loaded for execution. Another solution might be to modify old code and have them add a row in a separate table using autonomous transaction to indicate they got executed. Then wait for couple of months and it will give you some good idea. Of course people who know more than I do will have better solutions. Raj Rajendra dot Jamadagni at nospamespn dot com All Views expressed in this email are strictly personal. QOTD: Any clod can have facts, having an opinion is an art ! -Original Message- [mailto:[EMAIL PROTECTED] Sent: Thursday, January 22, 2004 11:19 AM To: Multiple recipients of list ORACLE-L Hi All, Is there anyway to find out from data dictionary views when was a database procedure/function last executed. Would like know the solution for 8i and 9i databases. We have some older code in the databases and do not know if any application is using it or not. I appreciate your help. Thanks Best Regards, Prasad -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Jamadagni, Rajendra INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
RE: How to find the last execution time of a Procedure.
Thanks for input Raj. I was also thinking on the same lines (Querying v$views periodically and store it in some metadata table) if there is no easier way to figure out from DBA_ views. As far as changing the production code, as you know, It has to go thru the dev/test databases first and then go thru the release process to implement into the production. It is painful process. I will use x$kglob instead of changing production code and all that release stuff. Thanks for your help, Raj. Best Regards, Prasad 860 843 8377 Jamadagni, Rajendra To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED] Rajendra.Jamadagncc: [EMAIL PROTECTED] Subject: RE: How to find the last execution time of a Procedure. Sent by: [EMAIL PROTECTED] com 01/22/2004 11:39 AM Please respond to ORACLE-L not easily, but you could probably scan through x$kglob (frequently) and see if the name exists ... if it is, it means it was loaded for execution. Another solution might be to modify old code and have them add a row in a separate table using autonomous transaction to indicate they got executed. Then wait for couple of months and it will give you some good idea. Of course people who know more than I do will have better solutions. Raj Rajendra dot Jamadagni at nospamespn dot com All Views expressed in this email are strictly personal. QOTD: Any clod can have facts, having an opinion is an art ! -Original Message- [mailto:[EMAIL PROTECTED] Sent: Thursday, January 22, 2004 11:19 AM To: Multiple recipients of list ORACLE-L Hi All, Is there anyway to find out from data dictionary views when was a database procedure/function last executed. Would like know the solution for 8i and 9i databases. We have some older code in the databases and do not know if any application is using it or not. I appreciate your help. Thanks Best Regards, Prasad -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Jamadagni, Rajendra INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). * PRIVILEGED AND CONFIDENTIAL: This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify
RE: How to find the last execution time of a Procedure.
But you better check with experts as my knowledge of x$ is feather-weight ... also there is a column on x$kglob called kglhdexc ... to me it seems the execution count (I feel like Mr. Monk already). so if execution count is 0 then you can say that it actually got executed. But if this doesn't work, in the next CTOUG meeting, I'll try to hide away from you. YMMV Raj Rajendra dot Jamadagni at nospamespn dot com All Views expressed in this email are strictly personal. QOTD: Any clod can have facts, having an opinion is an art ! -Original Message- [mailto:[EMAIL PROTECTED] Sent: Thursday, January 22, 2004 1:24 PM To: Multiple recipients of list ORACLE-L Thanks for input Raj. I was also thinking on the same lines (Querying v$views periodically and store it in some metadata table) if there is no easier way to figure out from DBA_ views. As far as changing the production code, as you know, It has to go thru the dev/test databases first and then go thru the release process to implement into the production. It is painful process. I will use x$kglob instead of changing production code and all that release stuff. Thanks for your help, Raj. Best Regards, Prasad 860 843 8377 ** This e-mail message is confidential, intended only for the named recipient(s) above and may contain information that is privileged, attorney work product or exempt from disclosure under applicable law. If you have received this message in error, or are not the named recipient(s), please immediately notify corporate MIS at (860) 766-2000 and delete this e-mail message from your computer, Thank you. **4 -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Jamadagni, Rajendra INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
RE: How to find the last execution time of a Procedure.
Thanks Raj. I have confidence on you and hope we will meet in next CTOUG meeting. Best Regards, Prasad 860 843 8377 Jamadagni, Rajendra To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED] Rajendra.Jamadagncc: [EMAIL PROTECTED] Subject: RE: How to find the last execution time of a Procedure. Sent by: [EMAIL PROTECTED] com 01/22/2004 01:59 PM Please respond to ORACLE-L But you better check with experts as my knowledge of x$ is feather-weight .. also there is a column on x$kglob called kglhdexc ... to me it seems the execution count (I feel like Mr. Monk already). so if execution count is 0 then you can say that it actually got executed. But if this doesn't work, in the next CTOUG meeting, I'll try to hide away from you. YMMV Raj Rajendra dot Jamadagni at nospamespn dot com All Views expressed in this email are strictly personal. QOTD: Any clod can have facts, having an opinion is an art ! -Original Message- [mailto:[EMAIL PROTECTED] Sent: Thursday, January 22, 2004 1:24 PM To: Multiple recipients of list ORACLE-L Thanks for input Raj. I was also thinking on the same lines (Querying v$views periodically and store it in some metadata table) if there is no easier way to figure out from DBA_ views. As far as changing the production code, as you know, It has to go thru the dev/test databases first and then go thru the release process to implement into the production. It is painful process. I will use x$kglob instead of changing production code and all that release stuff. Thanks for your help, Raj. Best Regards, Prasad 860 843 8377 ** This e-mail message is confidential, intended only for the named recipient(s) above and may contain information that is privileged, attorney work product or exempt from disclosure under applicable law. If you have received this message in error, or are not the named recipient(s), please immediately notify corporate MIS at (860) 766-2000 and delete this e-mail message from your computer, Thank you. **4 -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Jamadagni, Rajendra INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). * PRIVILEGED AND CONFIDENTIAL: This communication, including