0

I use the visual editor to create schduler chains in sqldeveloper3.2. But faced with a problem - can not get the SQL code of the chain, namely the sequence of requests create_chain, define_chain_step, define_chain_rule (from DBMS_SCHEDULER package).

In addition a number of properties have created steps and rules can not be changed like a program_name and so on.

mad
  • 902
  • 1
  • 7
  • 10

1 Answers1

0

DBMS_Metadata can be used to pull the definitions.

When I last tried this in 10.2.0.4 it did not pull the scheduler rules -- I pulled them by just reading the relevant system tables using SQL.

select 'exec DBMS_SCHEDULER.DEFINE_CHAIN_RULE('''||chain_name||''','''||condition||''','''||action||''','''||rule_name||''','''||comments||''');'
from user_scheduler_chain_rules
where chain_name = 'EXPORT';

I always found it more robust to completely drop and redefine a schedule rather than modify them in place. Some notes here: http://oraclesponge.wordpress.com/category/oracle/dbms_scheduler/

David Aldridge
  • 51,479
  • 8
  • 68
  • 96
  • It seems I did not properly expressed. I need to generate the SQL code from the visual presentation schduler chain in SQLDeveloper. But thanks for the proposed method of building query. – mad Apr 03 '13 at 11:50