In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
A large number of running logs are generated when Job is running for a long time, which can be cleared in the following ways:
1. Create a job:
Create job links to previous job class. DBMS_SCHEDULER.create_job (job_name = > 'test_log_job', job_type = >' PLSQL_BLOCK', job_action = > 'BEGIN NULL; END;', job_class = >' no_logging_class', enabled = > FALSE, auto_drop = > FALSE, comments = > 'Job used to job logs.')
2. Log level of job:
-- the job log level is determined by two factors, one is the job log level, and the other is the log level of the job cloass used. Take the highest of the two.
-when job is created, the log level defaults to DBMS_SCHEDULER.LOGGING_RUNS
When creating a job, if you do not specify job class, the default is DEFAULT_JOB_CLASS, while the default logging level for DEFAULT_JOB_CLASS is DBMS_SCHEDULER.LOGGING_RUNS
-- so the logging level of the job created is at least LOGGING_RUNS.
If you do not generate logs, you must disable job's own log level, and you cannot use the default default of DEFAULT_JOB_CLASS.
-- re-establish a no-log job class:
Begin DBMS_SCHEDULER.create_job_class (job_class_name = > 'no_logging_class', resource_consumer_group = >' default_consumer_group', logging_level = > DBMS_SCHEDULER.LOGGING_OFF); end
-- disable job's own log and modify log-level LOGGING_LEVEL attribute:
BEGIN dbms_scheduler.set_attribute ('JOB_NAME','LOGGING_LEVEL',DBMS_SCHEDULER.LOGGING_OFF); END
-- 1) DBMS_SCHEDULER.LOGGING_OFF: turn off logging
-- 2) DBMS_SCHEDULER.LOGGING_RUNS: record the running information of the task
-- 3) DBMS_SCHEDULER.LOGGING_FULL: record all relevant information about the task, including not only the operation of the task, but also the creation and modification of the task.
3. Query and delete Job Log:
-- logs generated by SCHEDULER_JOBS can be viewed in both current ordinary users and SYS users (names are all in uppercase)
Select * from all_scheduler_job_log where owner='USERNAME' and job_name='XXX'select * from all_scheduler_job_run_details where owner='USERNAME' and job_name='XXX'and job_name='XXX'
-- Log in as a SYS user and delete the running information of a job under a user:
Delete from all_scheduler_job_run_details where owner='USERNAME' and job_name='XXX'
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.