Bonjour,
Je souhaite créer un job qui s'exécutera le matin à 04h00 du genre
Le problème est que je ne vois pas comment utiliser la commande spool et spool off pour récupérer dans un fichier le plan d'exécution affiché par DBMS_XPLAN.display_cursor.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 BEGIN DBMS_SCHEDULER.create_job ( job_name => 'Generation_Plan_Execution', job_type => 'PLSQL_BLOCK', job_action => 'BEGIN SELECT * FROM TABLE(DBMS_XPLAN.display_cursor(sql_id=>'*****',format=>'ALLSTATS LAST +cost +bytes +outline +peeked_binds'));END;', start_date => '02-JAN-2022 06:40:00 AM', repeat_interval => 'freq=daily', end_date => '31-JAN-2022 06:40:00 AM', enabled => TRUE, comments => 'Generation Plan Execution'); end; /
Merci pour votre aide.
Partager