Home » SQL & PL/SQL » SQL & PL/SQL » Stored Procedures
Stored Procedures [message #10399] Tue, 20 January 2004 23:13 Go to next message
Werner
Messages: 11
Registered: November 1999
Junior Member
Is there a possibility to get an overview about all timescheduled Procedures within a ORACLE 7.3.2.3.10. DB? Thank you very much in advance.

 

Regards

 

Werner 
Re: Stored Procedures [message #10407 is a reply to message #10399] Wed, 21 January 2004 06:08 Go to previous messageGo to next message
Thiru
Messages: 1089
Registered: May 2002
Senior Member
By 'timescheduled Procedures' you mean jobs scheduled within the database ? ( if yes, you could have a look at dba_jobs/All_jobs).

-Thiru
Re: Stored Procedures [message #10432 is a reply to message #10407] Wed, 21 January 2004 22:16 Go to previous messageGo to next message
Werner
Messages: 11
Registered: November 1999
Junior Member
Thiru,

Thanky you for your reply. What I am looking for is a possibility to show all timescheduled Procedures, similar as for triggers. Select * from user_triggers.

Regards

Werner
Re: Stored Procedures [message #10435 is a reply to message #10432] Thu, 22 January 2004 01:09 Go to previous messageGo to next message
Barbara Boehmer
Messages: 9090
Registered: November 2002
Location: California, USA
Senior Member
-- To get the source code of the procedures:
SELECT * FROM user_source WHERE type = 'PROCEDURE';

-- To get the scheduling of the procedures:
SELECT * FROM user_jobs;
Re: Stored Procedures [message #10439 is a reply to message #10435] Thu, 22 January 2004 04:50 Go to previous messageGo to next message
Werner
Messages: 11
Registered: November 1999
Junior Member
Thanks a lot Barbara.

Regards

Werner
Re: Stored Procedures [message #10445 is a reply to message #10432] Thu, 22 January 2004 13:53 Go to previous messageGo to next message
Thiru
Messages: 1089
Registered: May 2002
Senior Member
Werner,
I still dont get what you mean by timescheduled Procedures. If you want to get a list of all procedures you can
select object_name from user_objects where object_type='PROCEDURE';

Use ALL_OBJECTS/DBA_OBJECTS as appropriate. If you want to list the jobs you scheduled ,query USER_JOBS/ALL_JOBS/DBA_JOBS as appropriate.

If you are looking to get the source code of the procedures,then you could query USER_SOURCE/ALL_SOURCE/
DBA_SOURCE or SYS.SOURCE$ as appropriate.

HTH
Thiru
Re: Stored Procedures [message #10472 is a reply to message #10445] Sun, 25 January 2004 22:45 Go to previous messageGo to next message
Werner
Messages: 11
Registered: November 1999
Junior Member
Thiru,

Thank you for your answer. I am able to see all procedures. When I am listing the Job overview, no Job is queued. But I can see that during the day the procedures are being executed. But I dont know how the procedures are launched.

Best Regards

Werner
Re: Stored Procedures [message #10491 is a reply to message #10472] Mon, 26 January 2004 10:01 Go to previous message
Thiru
Messages: 1089
Registered: May 2002
Senior Member
Hi,
How do you know that the procedures are being executed ?

If on Unix, check cronjobs to see if they are being called periodically. If on Windows, at jobs ?

If you want to find out when and who called this procedure,you can AUDIT the execution of the procedures , like this

SQL> audit execute procedure ;        

Audit succeeded.

SQL> connect thiru/****
Connected.
SQL> execute test_proc;

PL/SQL procedure successfully completed.

SQL> select OS_USERNAME,USERNAME,OWNER,OBJ_NAME,ACTION_NAME,timestamp from user_audit_trail;

OS_USERNAME
--------------------------------------------------------------------------------
USERNAME                       OWNER
------------------------------ ------------------------------
OBJ_NAME
--------------------------------------------------------------------------------
ACTION_NAME                 TIMESTAMP
--------------------------- ---------
oracle
THIRU                          THIRU
TEST_PROC
EXECUTE PROCEDURE           26-JAN-04

-- You will need to have AUDIT_TRAIL=DB or TRUE 
Previous Topic: trigger and sum
Next Topic: Create a function that works out the amount of weekdays.
Goto Forum:
  


Current Time: Thu Apr 25 08:32:54 CDT 2024